Skip to main content

Authorization

Follow this guide to create a new Salesforce B2B Commerce Cloud credential that will allow Nexla to authenticate to and exchange data with your Salesforce B2B Commerce Cloud account.
salesforce_cc_api_auth.png

Salesforce B2B Commerce Cloud

Prerequisites

Before creating a Salesforce B2B Commerce Cloud credential, you need to obtain your OAuth2 Client ID and Client Secret from your Salesforce account. Salesforce B2B Commerce Cloud uses OAuth2 3-legged authentication, which requires user authorization to access your Salesforce account.

To obtain your Salesforce OAuth2 credentials, follow these steps:

  1. Sign in to your Salesforce account using your administrator credentials.

  2. Navigate to Setup in your Salesforce account by clicking the gear icon in the top right corner and selecting Setup.

  3. In the Setup menu, use the Quick Find box to search for App Manager or navigate to Platform Tools > Apps > App Manager.

  4. Click New Connected App to create a new connected app for API access.

  5. Configure your connected app settings:

    • Enter a name for the connected app (e.g., "Nexla Integration")
    • Enter a contact email address
    • Enable Enable OAuth Settings
    • Enter a callback URL (e.g., https://dataops.nexla.io/cors/https://login.salesforce.com/services/oauth2/callback)
    • Select the OAuth scopes you need (e.g., Full access (full), Perform requests on your behalf at any time (refresh_token, offline_access))
  6. Click Save to create the connected app.

  7. After saving, you will be redirected to the connected app details page. Your Consumer Key (Client ID) will be displayed. Copy the Consumer Key.

  8. Click Click to reveal next to the Consumer Secret to reveal your Consumer Secret (Client Secret). Copy the Consumer Secret immediately, as it may not be accessible again after you navigate away from the page.

  9. Store both credentials securely, as you will need them to configure your Nexla credential. The Consumer Key and Consumer Secret are sensitive information and should be kept confidential.

The Consumer Key (Client ID) and Consumer Secret are used to authenticate with the Salesforce OAuth2 authorization endpoint. The OAuth2 flow requires user authorization to obtain an access token, which is then sent in the Authorization header with the Bearer prefix for all subsequent API requests to the Salesforce B2B Commerce Cloud API. The access token is automatically obtained and refreshed by Nexla as needed. If your credentials are compromised, you should immediately revoke them in your Salesforce account settings and generate new ones. For detailed information about Salesforce OAuth2 authentication, API access, and available endpoints, refer to the Salesforce API documentation.

Create a Salesforce B2B Commerce Cloud Credential

  • To create a new Salesforce B2B Commerce Cloud credential, after selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Salesforce B2B Commerce Cloud

SalesforceB2BCCCred.png

Credential Name & Description

  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

    Resource descriptions are recommended but are not required. They should be used provide information about the resource purpose, data freshness, etc. that can help the owner and other users efficiently understand and utilize the resource.

OAuth2 3-Legged Authentication

Salesforce B2B Commerce Cloud uses OAuth2 3-legged authentication for all API requests. Your Consumer Key (Client ID) and Consumer Secret are used to authenticate with the Salesforce OAuth2 authorization endpoint to obtain an access token, which is then used for all subsequent API requests.

  1. Click the Authorize button to begin the OAuth2 authorization flow. You will be redirected to the Salesforce authorization page where you will need to sign in and grant permissions to Nexla to access your Salesforce account.

  2. After granting permissions, you will be redirected back to Nexla, and the authorization will be completed automatically. The access token and refresh token will be stored securely in your credential.

    Your Salesforce OAuth2 credentials can be found in your Salesforce account under Setup > App Manager > Your Connected App. The Consumer Key (Client ID) and Consumer Secret are used to authenticate with the Salesforce OAuth2 authorization endpoint to obtain an access token. The access token is then automatically sent in the Authorization: Bearer {token} header for all subsequent API requests to the Salesforce B2B Commerce Cloud API.

    The access token is automatically obtained and refreshed by Nexla as needed. If your credentials are compromised, you should immediately revoke them in your Salesforce account settings and generate new ones. The Consumer Key and Consumer Secret provide access to your Salesforce account data and should be treated as sensitive information. Keep your credentials secure and do not share them publicly.

    For detailed information about Salesforce OAuth2 authentication, API access, and available endpoints, see the Salesforce API documentation.

Save the Credential

  1. Once all of the relevant steps in the above sections have been completed, click the Save button at the bottom of the overlay to save the configured credential.

  2. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation and can be selected for use with a new data source or destination.