Uh oh! You just received an email from us with a subject line containing "SFDC API Error" and need to figure out the source of this error immediately, right?
Don't worry, we got you and here you'll find some common API errors from Salesforce and how to address them.
These notifications are sent from Salesforce to Chili Piper during the Lead/Contact creation or update process, pointing out that something unexpected happened during these processes.
They should be received by your org's global integration user, but we do have a suggestion that can be found here to ensure that a larger audience will have access to these errors.
How to Identify the Error?
First, check the top part of the email for the statusCode, which can be found here:
We'll cover each error you may receive below.
Common Errors
statusCode='DUPLICATES_DETECTED'
This error was sent because Chili Piper attempted to update a Lead or Contact record, but there was an existing record with a matching email, so Salesforce threw us an error. You might be asking, if Chili Piper was only attempting to update the Salesforce record and not create a duplicate, why would we get this error?
Chili Piper will not create a duplicate; we will always update the existing one if there is an existing record match. However, the error tells us that your instance has some de-duplication Rule or logic implemented by your Salesforce admin, which also impacts our ability to update records:
duplicateRule='Standard_Lead_Duplicate_Rule'
The impact of this message='You're creating a duplicate record. We recommend you use an existing record instead.'
You will want to create some logic to disable this Rule for records that Chili Piper updates. We also have the two following suggestions to fix this issue:
- Excluding the Chili Piper Created by / sync user(s) from Duplicate / Validation Rules. If you would like to set up an exclusion, please follow the following steps:
- Go to Salesforce Setup and search for Duplicate Rules or find the validation Rule you wish to edit in your Object Manager.
- Click on the Duplicate / Validation Rule for which you want to add an exclusion.
- Click Edit.
- Under the Conditions section, create a condition that excludes your CP Created by / sync user(s) from the Rule.
-
- Under Field, select Current User: Username.
-
- You may select a different Current User: _____ field if desired, such as Current User: Alias or Current User: Email.
- Under Operator: select not equal to.
- You may select a different Current User: _____ field if desired, such as Current User: Alias or Current User: Email.
-
- Under Value: enter the Username for the CP Created by / sync user. This is typically in the form of an email address.
2. Change the matching criteria for the duplication rule in SFDC eg, email only. You can check this Salesforce article with the same criteria so you can know how to implement it on your instance.
statusCode='REQUIRED_FIELD_ MISSING'
Chili Piper creates Leads and/or Contacts when set by your CRM Actions or Router settings.
If we attempt to create a record in Salesforce, but your instance requires specific fields for which we did not receive data, we will fail to create the record and send this error.
You can see which fields are required on the message line:
message='Required fields are missing: [LastName, Company]'
If you have one or more required fields missing, consider updating these fields as not required or updating your website form or Chili Piper Guest Forms to include this data to ensure it is always submitted.
statusCode='INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST'
This scenario is most common when updating records that came through your Concierge flow, and you have Chili Piper ON to create the Lead/Contact under Salesforce Options. Since we update Salesforce with data received directly from your form, we will send an error if your form picklist values do not match what is in Salesforce. This only occurs if your SFDC picklist is restricted.
You can see which field and value threw the error in the message line:
message='Number of Employees: bad value for restricted picklist field: 10,000+'
The solution would be to update the picklist to make it not restricted or make the form and SFDC picklist values consistent.
statusCode='FIELD_CUSTOM_VALIDATION_EXCEPTION'
You may have a custom validation Rule that is not met when we attempt to create or update a record. If so, we will send this API error, letting you know that this validation Rule prevented us from saving the record in SFDC.
In the body of the error, look at the field line to see which field and Rule caused this error:
fields='{[1]Salesperson__c,}'
message='Salesperson is a required field.'
Blank Emails
You may also see this same validation exception when an email is missing from the request. The error will look like this:
Salesforce API Error. Can't update prospect None: [SaveResult errors='{[1][Error extendedErrorDetails='{[0]}'
fields='{[0]}'
message='Hi! Please add an email to the Lead prior to creating the new record.'
statusCode='FIELD_CUSTOM_VALIDATION_EXCEPTION'
You either don't have your email field mapped correctly within Chili Piper or have excluded an email entirely on your form.
statusCode='STRING_TOO_LONG'
In the error message ("message=") itself, you'll see something similar to "data value too large: ___ (max length:255)."
As the error suggests, the data provided in one (or more) form field(s) by the prospect/user crossed the max length set for these fields within Salesforce.
The data provided after "data value too large" will be the one provided by the prospect/user within the form and the one that crossed the field's max length (pointed right after the provided data with max length: xxx)
Here's one example:
message='Zip/Postal Code: data value too large: testtestertesting@testingtest.com (max length=20)'
In this case, the data provided in Zip/Postal code crossed the 20 characters max length defined within Salesforce.
Right below the error message, you'll be able to confirm which field was 'responsible' for the error too:
Raw prospect details used for creation:
NumberOfEmployees: 50
Meeting_Type_CP__c: Test
Country: United States
City: 09/24/1983
PostalCode: testtestertesting@testingtest.com
Something that can be evaluated is limiting your form fields not to accept more characters than the max length.
Double-checking if your form fields are correctly mapped might be a good call, especially if this error message is recurrent.
no config found for Individual(12345678)
This error indicates that the user responsible for creating/updating objects had no active Salesforce connection when they tried to perform the abovementioned operation.
Right next to the error, the userID (represented here by 12345678) indicates which user needs to connect or reconnect their Salesforce connection on their Integrations page.
Usually, the user is designated to update existing objects in your router, your global sync/integration user, or your workspace integration user.
You can reach out to Support to better confirm which user the error referred to!
statusCode='UNABLE_TO_LOCK_ROW'
This error message means that when Chili Piper was trying to create/update a record on your CRM, we got an error because there was another external system trying a similar operation with the same record:
[Error extendedErrorDetails='{[0]}'
fields='{[0]}'
message='unable to obtain exclusive access to this record'
statusCode='UNABLE_TO_LOCK_ROW'
]
For this scenario, we don't have to execute any manual steps as the retry mechanism in our backend should do the job for you but if you need further details, don't hesitate to reach out to Support.