Add a custom 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.
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:
-
Log in to your Salesforce account. On the top menu, click Setup.
-
In the left menu, open the
Build/Customize/Contactsnode. Click Fields.
-
In the Contact Custom Fields & Relationships section, click New. In the New Custom Field dialog, select Text as the data type. Click Next.
-
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
-
-
Click Next. In the Establish field-level security dialog, click Next. In the Add to page layouts dialog, click Save.
-
In the left menu, open the
Build/Customize/Activitiesnode. Click Activity Custom Fields. -
In the Activity Custom Fields section, click New. In the New Custom Field dialog, select Text as the data type. Click Next.
-
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
-
-
Click Next. In the Establish field-level security dialog, click Next. In the Add to page layouts dialog, click Save.