Troubleshoot Common Salesforce Errors

Last Updated: July 1, 2022

For pricing information, please fill out the demo-request form on our pricing page to get in touch with a sales representative.

Exceptions come with the territory in Salesforce, and it’s not always easy to determine their causes. This guide will help you troubleshoot the most common Clearbit errors. Keep in mind that a System Administrator is required to make most of the changes below. 

📝  Please note: Many of the steps below assume you are using Salesforce Classic. If you are using Lightning Experience, you may find some settings in slightly different places, particularly those related to account/lead/contact/etc. objects.

Skip Ahead to:

If you see an INSUFFICIENT_ACCESS_OR_READONLY error

The most common cause of this error is that the user triggering it does not have access to edit the record specified in the error. Typically, you can resolve this exception by simply adding the correct permissions to the user. Here's where to start:

  1. Check that the affected user has Clearbit User Permissions assigned
    1. Head to Setup.
    2. In the Quick Find search bar, type Permission Set.
    3. Click Clearbit User Permissions.
    4. Click Manage Assignments.
    5. Select the user that needs these permissions.
    6. Click Add Assignments to grant the user permissions.
  2. If the previous step did not resolve the issue, your user may not have permission to edit the lead/contact/account in question.
    1. Head to Setup.
    2. In the Quick Find search bar, type Profiles.
    3. Click Profiles.
    4. Select the profile of the user triggering the exception.
    5. Make sure both field level permissions and standard object permissions allow the user to edit the object in question.

If you see a CANNOT_EXECUTE_FLOW_TRIGGER error

This error typically occurs when a workflow isn't properly implemented - most commonly when a flow is trying to request a field from an object that doesn’t exist.

  1. Double check your processes in Salesforce's Process Builder
    1. Head to Setup.
    2. Type in the Quick Find search bar: Process Builder.
    3. Check through the processes that are in place. Specifically, check each component of your custom processes closely to double check that the Criteria portion has referenced everything correctly and in the specified order.
  2. Double check the workflows built with Workflow Rules
    1. Head to Setup.
    2. Type in the Quick Find search bar: Workflow Rules
    3. Check all workflow rules in place that reference cbit_Clearbit_r.cbit. Specifically, make sure to validate that cbit_Clearbit_r.cbit exists before referencing it in your workflows. 

If you see a FIELD_CUSTOM_VALIDATION_EXCEPTION error

This error is thrown when a validation rule blocks a record from being automatically updated by clearbit.

  1. Head to Setup.
  2. In the Quick Find search bar, type Validation Rules.
  3. Click Validation Rules under Leads.
  4. Select the Validation Rule that is triggering the exception.
  5. If the exception is thrown by enrichment: add the following to the beginning of your formula:  cbit__ClearbitReady__c == True &&
  6. If the exception is thrown by prospector: add the following to the beginning of your formula:  cbit__CreatedByClearbit__c == False && 

If you see a DUPLICATES_DETECTED error

This exception is typically triggered when Salesforce is set to allow duplicate records to be created, but not to be edited. When Clearbit attempts to update the record, it is blocked from doing so.

  1. Head to Setup.
  2. In the Quick Find search bar, type Duplicate Rules.
  3. Click into the Duplicate Rule that is throwing the exception
  4. Make sure that Action on Edit is set to Allow and that Alert (in the same row) is unchecked.

📝  Please note: This essentially disables the duplicate rule on edit, which is the only way to reliably allow Clearbit to update the record. Alternatively, you can use the criteria at the bottom of the page to set the Rule to selectively run if ClearbitReady == True. This will allow Clearbit to update the first time while keeping the duplicate rule intact but will block Clearbit from updating in the future.

If you see a FIELD_INTEGRITY_EXCEPTION error

This exception is triggered when Clearbit tries to write to a picklist enabled field with a value that is not included on the picklist. The error message will indicate which field is triggering the error.

If a state or country picklist triggered the error, we recommend disabling your State and Country/Territory picklists completely. If you need to keep State and Country/Territory picklists enabled, our tool will only be able to enrich addresses in the United States. With these picklists disabled, we can enrich any address we have available.

If any other picklist triggered the error, follow these steps:

  1. Head to Setup.
  2. In the Quick Find search bar, type the name of the object the picklist field belongs to (e.g. lead, contact, account).
  3. Click Fields under the object name.
  4. Click the name of the picklist field that caused the exception.
  5. Next to Picklist Values, click New.
  6. Add the value that was not in the picklist when the exception occurred.

If you see a System.LimitException: CPU time limit exceeded error

This error is rarely caused by Clearbit as we don’t use many long running Apex jobs. Most often if you see Clearbit-related info with this exception it is because you are referencing a Clearbit field, like ClearbitReady, in a Process Builder process or an SFDC flow that ran too long and failed with this exception. If this is the case, please troubleshoot your own process or flow to figure out where it is getting stuck, as finding the hangup in your own custom process or flow is usually the solution as opposed to troubleshooting an issue caused by our package. That said, in rare cases this exception will be caused by a process that is triggered by a Clearbit update. 

If you see a UNABLE_TO_LOCK_ROW error

This error is triggered when Clearbit tries to save a record that is currently being edited by another package or user. In most cases this can be safely ignored, as Clearbit will update the record in a future enrichment.

If you see a "Create" Permission to Field "LeadSource" on Object "Contact" is not allowed for the current user. error

This error is most likely caused due to User Profile permissions not being set to allow for editing on the Field Level.

  1. Head to Setup.
  2. Click Contacts.
  3. Click Fields.
  4. Click on Lead Source.
  5. View Field Accessibility.
  6. Click on Editable for System Administrator.
  7. Checking the first Visible checkbox for Field-Level Security turns it from Hidden to Editable, so that you are able to add Contacts successfully.