Skip to main content

Get connection string values from Salesforce

Abstract

How to obtain Salesforce values to use in the Sitecore connection string.

Before you can configure the connection string, you must collect the following values from Salesforce:

  • User ID - the ID that Sitecore uses to call the Salesforce API. This user ID does not have to have administrator rights, but it must have sufficient rights to perform the activities you expect to be able to from Sitecore. For example:

    • To have Salesforce contacts created in Sitecore, the user must have read-access on contacts and campaigns.

    • To push contact data from Sitecore into Salesforce, the user must have write-access on contacts.

  • Password - the password for the Salesforce user that Sitecore uses to call the Salesforce API.

    Note

    The password must not contain the semicolon ( ; ) character.

  • Security token

  • Client ID and secret key

The security token value comes from the Salesforce user who used the connected app.

To get the security token:

  1. In Salesforce, log in with the user ID you plan to use in the connection string.

  2. In the top menu, click the user name.

    Salesforce top menu after log in with the user name pointed out
  3. Click My Settings.

    Salesforce user menu with My Settings option pointed out
  4. In the left menu, click Personal, Reset My Security Token.

    Salesforce user settings menu with Reset my security token pointed out
  5. Read the warning on the screen carefully and then click Reset Security Token.

    Salesforce Reset my security token dialog

    Salesforce informs you that it has mailed the new security token to you.

    Salesforce Check your email message
  6. Check your inbox to find the email message with the new security token value.

    Excerpt of email from Salesforce about new security token

The client key and secret key values come from the Salesforce connected app.

To get these values:

  1. In Salesforce, in the left menu, in the Build section, expand Create and the click Apps.

    Salesforce Build menu with Create - Apps pointed out
  2. In the Connected Apps section, click the name of the connected app you created.

    The app list in the Connected Apps dialog, with the name of the connected app pointed out
  3. In the  API (Enable OAuth Settings) section, copy the values for the Consumer Key and Consumer Secret

    Note

    In the connection string, the Consumer Key value is called the client ID, and the Consumer Secret value is called the secret key.