Skip to main content

Required Configuration to Connect the Salesforce Commerce Cloud Connector

Please note that this Connector is a paid product. For pricing information, please reach out to your Smartling Customer Success Manager.

To connect Smartling with your Salesforce Commerce Cloud account, you must first gather a set of configuration values related to that account. Once gathered, they should be copied and pasted into your Smartling project settings.

This article outlines the required values, how to access them in Salesforce, and configuration you need to complete in Salesforce.

Configuration Values

A typical set of configuration values looks like this:

Ocapi URL

Organization ID

f_ecom_zzte_053

Short Code

ap1mq53w

Tenant ID

zzte_053

Storefront Base URL

Client ID

cfccbd37-cccd-407b-ac60-5d6f9cd3ee2b

Client Secret

yGuGjts7!cobEW3xvqfT

This guide provides more details on each configuration value and shows you where to find them.

Ocapi URL

Base URL for Open Commerce API (OCAPI). The base URL has a different structure depending on whether you are using a production instance or a non-production instance (including staging, development, and sandboxes).

Production

For a production instance, the base URL has the following structure: http(s)://public_domain[/s/-]/dw/data/

public_domain is the DNS name mapped to the Commerce Cloud Digital site (for example, www.example.com).

Example

Non-Production

For a non-production instance, the base URL has the following structure: http(s)://<domain>/s/-/dw/data/

domain is usually the subdomain for the staging, development or sandbox instance.

Example

Organization ID

The organization ID is a short string that identifies a B2C Commerce instance. Each instance gets its own unique organization ID, such as f_ecom_zzte_053.

You can look up the organization ID for an instance through Business Manager. You must have the Business Manager Administrator role in Account Manager and know the Business Manager URL for the instance.

To look up the organization ID:

  1. Go to the Business Manager URL for your instance.

  2. Log in using your Account Manager credentials.

  3. Go to Administration > Site Development > Salesforce Commerce API Settings.

The organization ID is displayed on the page, as seen in the following image

Screenshot_2023-01-04_at_17.39.27.png

Short Code

The short code is an eight-character string that is assigned to a realm for routing purposes. The short code applies to your entire realm, across all instances.

The short code is in the same place as the organization ID. To look it up:

  1. Go to the Business Manager URL for your instance.

  2. Log in using your Account Manager credentials.

  3. Go to Administration > Site Development > Salesforce Commerce API Settings.

If you’ve never used the Commerce API in your realm, click Request Short Code to request one. It can take up to 24 hours for the short code to propagate through the CDN and all the routing systems in your configuration.

Screenshot_2023-01-04_at_17.41.02.png

Client ID and Secret

OAuth2 client ID and secret are used to call the Salesforce Commerce Cloud REST API:

An OAuth2 client can be created using Commerce Cloud Account Manager (https://account.demandware.com/).

Screenshot_2023-01-04_at_17.44.15.png
  1. Go to the API Client section

  2. Click Add API Client

  3. Fill Display Name, Password and Confirm Password fields

  4. Add the required organization under the Organizations section by clicking the Add

  5. Click the Add button under the Roles section

  6. In the Assign Roles dialog, select Salesforce Commerce API checkbox and click Add

    Screenshot_2023-01-04_at_17.44.52.png
  7. Define the role scope by clicking the filter icon

    Screenshot_2023-01-04_at_17.46.48.png
  8. In the Salesforce Commerce API - Filters dialog, choose your organization and the required sandbox
    ​

    Screenshot_2023-01-04_at_17.47.23.png
  9. Leave the Client JWT Bearer Public Key option blank

  10. For Default Scopes and Allowed Scopes options under the OpenID Connect section, enter the value sfcc.products.rw

  11. Leave the Redirect URIs option blank

  12. From the Token Endpoint Auth Method dropdown, choose client_secret_basic value

  13. From the Access Token Format dropdown, choose JWT
    ​

    Screenshot_2023-01-05_at_15.26.01.png
  14. Click Save

Your Client ID is generated.

Your Client Secret is the same as the client password entered in the Password field.

Configure the Open Commerce API Access

Now you need to configure the Open Commerce API access to your Salesforce Commerce Cloud resources:

  1. Go to the Business Manager URL for your instance

  2. Log in using your Account Manager credentials

  3. Go to Administration > Site Development > Open Commerce API Settings

  4. From the Select Type field, select Data

  5. From the Select Context field, select Global (organization-wide)

  6. In the text field, paste the JSON below, and ensure to replace cfccbd37-cccd-407b-ac60-5d6f9cd3ee2b with your client ID

  7. Click on the Save button

JSON script to be pasted in the text field:

{
  "_v": "22.6",
  "clients": [
    {
      "client_id": "cfccbd37-cccd-407b-ac60-5d6f9cd3ee2b",
      "resources": [
        {
          "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/catalog_search"
        },
        {
          "methods": [
            "get",
            "post",
            "patch"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/catalogs/**"
        },
        {
          "methods": [
            "get",
            "patch"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/libraries/**"
        },
        {
          "methods": [
            "get"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/locale_info/locales"
        },
        {
          "methods": [
            "get"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/sites/**"
        },
        {
          "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/site_search"
        },
        {
          "methods": [
            "get",
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "resource_id": "/system_object_definitions/**"
        }
      ]
    }
  ]
}

Next Steps

Next, read our documentation on setting up your Salesforce Commerce Cloud Connector to complete setup.

Did this answer your question?