Add a custom field in Salesforce

Abstract

How to add a custom contact data field in Salesforce

If you plan to write contact data from Sitecore to Salesforce, you must add a custom field in Salesforce. This field is used to associate the Salesforce contact with the corresponding Sitecore contact.

Note

These instructions assume you are using the Salesforce Classic user interface. The same configuration is available using the Salesforce Lightning user interface. We recommend you switch to the Salesforce Classic user interface temporarily to complete these steps.

To add a custom field in Salesforce:

  1. Log in to your Salesforce account. On the top menu, click Setup.

    Setup option in the Salesforce top menu
  2. In the left menu, open the Build/Customize/Contacts node. Click Fields.

    The Fields node in the Build menu in Salesforce
  3. In the Contact Custom Fields & Relationships section, click New. In the New Custom Field dialog, select Text as the data type. Click Next.

    The New Custom Field dialog in Salesforce
  4. In the Enter the details dialog, enter the following values:

    • Data Type - Text

    • Field Label - Sitecore Id

    • Length - 36

    • Field Name - SitecoreId

    • External ID - selected

    The Enter the details dialog for a new custom field in Salesforce
  5. Click Next. In the Establish field-level security dialog, click Next. In the Add to page layouts dialog, click Save.

  6. In the left menu, open the Build/Customize/Activities node. Click Activity Custom Fields.

  7. In the Activity Custom Fields section, click New. In the New Custom Field dialog, select Text as the data type. Click Next.

  8. In the Enter the details dialog, enter the following values:

    • Data Type - Text

    • Field Label - SitecoreId

    • Length - 36

    • Field Name - SitecoreId

    • Unique - selected

    • Treat "ABC" and "abc" as duplicate values (case insensitive) - selected

    • External ID - selected

  9. Click Next. In the Establish field-level security dialog, click Next. In the Add to page layouts dialog, click Save.