Skip to main content

Salesforce Commerce Cloud

The following steps outline how to get the API credentials needed to integrate Content Studio with Salesforce Commerce Cloud to be able to browse and select products.

What you'll need
Link copied!

The following details are required:

  • Salesforce Client ID
  • Salesforce Site ID
  • Salesforce Catalog ID
  • Salesforce Shop API URL
  • Salesforce Shop API Version

The information on this page will explain how to set up a client ID in Salesforce Commerce Cloud with the Open Commerce API (OCAPI) permissions required to access the Shop API. You can also use the information from an existing API Client.

Creating an API Client
Link copied!

In order to allow Content Studio to integrate with you Salesforce instance, you need to create a new API client in the SFCC Account Manager.

  • Log in to the SFCC Account Manager as an admin user.
  • Select the API Client section and click "Add API Client"
  • Fill in the information in the API Client screen

Creating an API Client in Business Manager

  • In the organizations section, add an organization. In the example below we're adding an organization named "10CMS".

Assigning an organization

  • Assign some roles to the API Client. For the Content Studio integration choose "Salesforce Commerce API".

Assigning roles

You will get a warning saying that no role scopes are defined.

The no role scopes defined dialog is displayed

  • Choose a specific scope or "All sandboxes".

Choose a specific scope or choose All Sandboxes

  • From the "Token Endpoint Auth Method" menu choose "client_secret_basic" and click "Add".

The newly created API Client will be shown in the list.

Configuring your site
Link copied!

  • Log in to SFCC Business Manager and select the site you want to configure to use with Content Studio. In this case we're using RefArchGlobal.

In Business Manager, select the site you want to use with Content Studio

  • In SFCC Business Manager, go to Administration > Site Development > Open Commerce API Settings.
  • In the Shop API section choose your scope. In this example we have chosen organization wide scope.
  • Add the following in your OCAPI settings. Set the client_id to the one you created previously.
{
"_v": "21.3",
"clients": [
{
"client_id": "**********",
"allowed_origins": [],
"resources": [
{
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/product_search"
},
{
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/products/{id}"
}
]
}
]
}

Getting the information you need
Link copied!

When everything is set up, you can get the required information to set up the Content Studio integration as follows.

Salesforce Site ID
Link copied!

  • Go to Administration > Sites > Manage Sites
  • Copy the ID of the site (for example, RefArchGlobal)

Get the id of the site, in this case RefArchGlobal

Salesforce Catalog ID
Link copied!

  • Go to Merchant Tools > Products and Catalogs > Catalogs and copy the id of the catalog (for example, storefront-catalog-en)

You can find the catalog id in merchant tools

Salesforce Shop URL
Link copied!

This is the Salesforce Shop. It's the URL shown in the browser when you are in business manager. It will end with: commercecloud.salesforce.com)

The Salesforce Shop URL will be shown in the browser when you log in to Business Manager

Salesforce Shop API Version
Link copied!

  • This is the API version configured in the JSON of your OCAPI shop Settings.

In the Content Studio configuration dialog, you need to add it the format such as: v22_4.

You can get the Shop API version from the OCAPI settings

Setting up the integration in Content Studio
Link copied!

  • In Content Studio choose the Commerce Repositories icon and click "Add Commerce Repository".

  • Choose "Salesforce" from the dialog and add the integration.

Note you only need to enter:

  • Label
  • Description
  • Salesforce Site ID
  • Salesforce Catalog ID
  • Salesforce Shop API URL
  • Salesforce Shop API version
  • Salesforce Client ID

The other fields are not used and you can enter any values in these fields.

Adding the Salesforce integration in Content Studio

Once the integration is set up, your product data is available to browse and add when using Content Studio templates such as "Rewrite product description".

Product information is now available to use with Content Studio templates

Content Studio- generating content