Are you wondering what are those errors MadKudu runs into preventing your records to be scored? You're on the right page!
Before we start...
MadKudu scores records in Salesforce in Realtime and in Batch, subject to different Salesforce limitations (like Governor limits) and shared resources with other third party apps, workflows and process builder flows.
To make sure your records get updated successfully, consider investigating the Salesforce errors returned to MadKudu and resolving them. Please submit a support ticket to our support team who will be able to inform you if we have faced any errors when trying to push scores.
In batch, MadKudu sends batches of records in the form of multiple CSVs to Salesforce Batch API which will then be processed by Salesforce to update each record with the data MadKudu sent.
MadKudu may get errors from Salesforce during that process alerting that the record cannot be updated by Salesforce. By design, MadKudu will only update records where there is a new value to update (not all records at every sync) and will attempt 10 times to update a record before putting it aside until there is a new score to update the record with.
Below are some of the most frequent Salesforce errors encountered and some suggested solutions.
Record cannot be updated because of an internal rule
- Error message: Validation_
- Description: A validation rule prevents MadKudu from updating the record
- Solutions:
- Or remove the validation rule
- Error message: REQUIRED_FIELD_MISSING
- Description: An internal rule requiring that a field must have a value in order to be updated prevents MadKudu from updating the record
- Solution: In the custom field edition page, uncheck the option to "always require a value in this field to save a record"
- Error message: Required fields are missing: [OwnerId]
- Description: the MadKudu user does not see the ownerID, and the internal rule on ownerID prevents MadKudu from updating the record. It may happen for only Lead with a specific Lead Owner
- Solution: Change permission to the MadKudu user to allow it to see Leads from this Lead Owner
- Error message: Required_Picklist
- Description: An internal rule requiring that a field must have certain values in order to be updated prevents MadKudu from updating the record
- Solution: consider cleaning up your picklist values to match the values restricted by the following option
- Error message: insufficient access rights on object id / INSUFFICIENT_ACCESS_OR_READONLY
- Description: the MadKudu user doesn’t have access to that object from a record type perspective (e.g. partner record id)
- Solution: Allow the MadKudu user to edit the object for all record type
Record cannot be updated because of a concurrent process
- Error message: Unable to Obtain Exclusive Access / UNABLE_TO_LOCK_ROW
- Description: or automation and therefore this record can't access the record to score
Whenever a record is in the process of being created or updated in Salesforce, the record is temporarily locked by Salesforce so that no other processes will modify the record simultaneously to avoid data inconsistencies. This error happens when MadKudu is trying to update a record at the same time as some other processes, which are out of MadKudu control. MadKudu will retry 10 times within 2 hours to score the records.
For more information on this error, please refert to Salesforce Knowledge Article:
Saleforce Knowledge Article - Unable to lock row - Record currently unavailable error -
Solution: If this happens often / for a lot of records, consider reviewing your process automation. You can submit a support ticket to our support team to try re-scoring these records later.
- Description: or automation and therefore this record can't access the record to score
- Error message: Apex CPU time limit exceeded / CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
- Description: Salesforce CPU is shared by all processes running in the trigger code, so Apex CPU timeouts happen when several processes are running at the same time. The package that happens to be running at the moment when the time limit is exceeded gets called out on the error, regardless of how much or how little of the CPU limit it may have consumed.
If MadKudu sync to Salesforce contributes to Apex CPU timeouts, there are other processes involved which may be consuming a much greater portion of the CPU time.
-
Solutions:
- Since MadKudu scores records by batch of 10,000 records by default, consider submitting a support ticket to our support team, asking to reduce the batch size.
- Disable any unnecessary Process Builder or other automation flow if possible.
- Audit the Apex code running to ensure it is efficient
- Description: Salesforce CPU is shared by all processes running in the trigger code, so Apex CPU timeouts happen when several processes are running at the same time. The package that happens to be running at the moment when the time limit is exceeded gets called out on the error, regardless of how much or how little of the CPU limit it may have consumed.
- Error message: Polling timeout / ECONRESET
- Description: When MadKudu creates a job in Salesforce to load the CSV we push,
it then opens a connection with Salesforce to ask the status of the job (polling), in order to know if the job (of updating the records) is done or not. A polling timeout would occur while waiting for this answer from Salesforce when this connection closes (since it can only stay open for a given duration). This error essentially means that Salesforce was too busy to answer MadKudu, and MadKudu doesn't know if the records were successfully updated by Salesforce or not. it does not necessarily mean the records failed to be scored. - Solution: Consider increasing the timeout duration or decreasing the number of connections open.
- Description: When MadKudu creates a job in Salesforce to load the CSV we push,