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 right away. This often happens during the testing phase of a new onboarding or if changes are recently made to your SFDC instance if you have been a long-time customer.
Not to worry, we got you covered in this doc on how to troubleshoot 😎
First, check the top part of the email for the statusCode, which can be found here:
Look for the matching one below to jump to the relevant section:
- statusCode='DUPLICATES_DETECTED'
- statusCode='REQUIRED_FIELD_
MISSING' -
com.chilipiper.salesforce.api.FreeWorkspaceSalesforceAccessException$: Free cannot use SF
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.
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 has specific fields required 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 to limit your form fields not to accept more characters than the max length.
Double-check if your form fields are correctly mapped might be a good call, especially if this error message is recurrent.
com.chilipiper.salesforce.api.FreeWorkspaceSalesforceAccessException$: Free cannot use SF
Usually, this error indicates that one of the following users doesn't have a paid (Handoff/Concierge) license as free users currently can't integrate with Salesforce:
1. Global sync/integration user OR your workspace integration user.
Users with Super Admin roles can confirm which user is the global integration/sync user by navigating to Admin Center's Integration page. To check which user is the integration one within a Team Workspace level, please navigate to the desired workspace and then to CRM Actions.
2. The user designated to update existing objects in your router.
Users can navigate to the router responsible to create/update the failed object, expand "Salesforce Options" and confirm the user right next to "Created By:" field.
Users with Super Admin roles can assign a paid license in Admin Center's User List. You can always reach out to Support if any help is needed to verificate above steps
no config found for Individual(12345678)
This error indicates that the user responsible to create/update objects had no active Salesforce connection when they tried to perform the above mentioned operation.
Right next to the error, the userID (represented here by 12345678) indicates which user needs to connect or reconnect their Salesforce connection in their Integrations page.
Usually, the user is also the one designated to update existing objects in your router OR your global sync/integration user OR your workspace integration user.
Your can reach out to Support to better confirm which user the error referred to!