Salesforce Error Troubleshooting

Salesforce is a configurable platform that allows you to configure custom fields, rules, and workflows. Unfortunately, those custom configurations can sometimes cause errors that will make the integration fail. Below are some common errors you may see and some solutions for each so that you can troubleshoot your Salesforce integration with confidence.

There is an error with your Salesforce authentication. 

If you see this, the integration needs to be reauthorized. You will need to log out of Salesforce in your browser before reauthorizing the integration in CallRail.

This can also happen when you exceed the number of authorizations allowed for your user.  Salesforce only allows each user to authorize five third-party applications (measured by the number of tokens, so five tokens). If you authorize six Salesforce integrations in CallRail (or five in CallRail and one in another application) with the same Salesforce user, one of those integrations will fail and this error will appear. 

As a workaround, you can create an additional Salesforce user to authorize integrations. Make sure the integrations are limited to no more than five per Salesforce user.

Restforce::ErrorCode::UnknownException

We can't save this record because the "{Process Name}" process failed. Give your Salesforce admin these details. An error occurred when executing a flow interview. 

CANNOT_EXECUTE_FLOW_TRIGGER

This error occurred when the flow tried to update records: CANNOT_EXECUTE_FLOW_TRIGGER: We can't save this record because the “{Process Name}” process failed. Give your Salesforce admin these details.

These errors often mean that there is a custom workflow configured within Salesforce that can’t run for whatever object it’s related to. A common cause is that a field value the workflow relies on is not present in the Lead and/or Activity record we created. This can occur if the field is not mapped or is mapped to something that doesn’t always have a value. Your Salesforce administrator should be able to determine what is preventing the workflow from running successfully. 

STORAGE_LIMIT_EXCEEDED

Restforce::ErrorCode::StorageLimitExceeded: STORAGE_LIMIT_EXCEEDED: storage limit exceeded

This means your Salesforce instance has exceeded its storage limit for either uploaded files or data in custom objects and fields.

REQUIRED_FIELD_MISSING

Restforce::ErrorCode::RequiredFieldMissing: REQUIRED_FIELD_MISSING: Required fields are missing: [custom field name]

This means there is a custom field in your Lead or Activity that is marked as Required, but does not have a value in the record we created. This can happen if the field is not mapped or is mapped to something that doesn’t always have a value. 

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY

Restforce::ErrorCode::InsufficientAccessOnCrossReferenceEntity: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY: insufficient access rights on object id

 

INVALID_CROSS_REFERENCE_KEY

This error occurred when the flow tried to create records: INVALID_CROSS_REFERENCE_KEY: Task Record Type ID: this ID value isn't valid for the user: {User ID}.

These errors mean the user who authorized the integration does not have access to the record that we are trying to update. You can either update the user’s access or have a user with the correct access reauthorize the integration.

STRING_TOO_LONG

STRING_TOO_LONG: {field name}: data value too large: {field data} (max length=255)

This error occurs when the value we are trying to pass for the listed field exceeds the maximum length. To fix this, update the field’s maximum length. If the field length is already at the maximum length, you may need to change the field type.

FIELD_CUSTOM_VALIDATION_EXCEPTION

FIELD_CUSTOM_VALIDATION_EXCEPTION: {some text}

This error often means a required or conditionally required field isn’t set, or that some combination of fields aren’t set to the right values (i.e., Field A can’t have a value of 1 if Field B has a value of 1). You will need to either edit or remove your custom validation in Salesforce, or adjust your field mapping in the CallRail/Salesforce integration accordingly.

JSON_PARSER_ERROR

JSON_PARSER_ERROR: Cannot deserialize instance of {field type} from VALUE_STRING value {field value} or request may be missing a required field.: Cannot deserialize instance of {field type} from VALUE_STRING value {field value} or request may be missing a required field.

This error means the record that we are trying to update is missing a required field. This can happen when the field is not mapped or it is mapped to something that doesn’t always have a value.

FIELD_INTEGRITY_EXCEPTION

FIELD_INTEGRITY_EXCEPTION: There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states.: State/Province

This can happen when Salesforce State picklists are enabled and the State field from CallRail contains a value that is not compatible with the Salesforce picklists. We offer two different fields for short and long form State values: full_customer_state and abbr_customer_state. This error can be resolved by switching your mapping to whichever map form your picklist is expecting.

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: The formula in the "{process name}" rule or process is invalid due to the following: Could not access the following field: {field name}. Contact your administrator.

This error occurs when the update we are trying to make (posting a Lead or an Activity) cannot be completed because a custom rule or process applied to that object cannot run due to a missing dependent field.

Below are three additional common explanations for these errors:

  1. The user who authorized the integration does not have access to the field (the one in the {field name} part of the error). In that case, make sure that the user has edit access to that field.

  2. The field no longer exists or has been renamed. To fix this, update the rule to remove or reselect the field.

  3. If the field with the error is some form of Address, you will need to reference the specific address field (address line 1 / 2 / city / state / zip, etc.) instead of just the generic “address”.