Connect a Salesforce Commerce Cloud store to FeedOps

How to connect a Salesforce Commerce Cloud store to FeedOps via API

Before starting this process, you will need to create a FeedOps account.

Step 1 will help you generate an API Client ID.

Step 2 will help update your Open Commerce API (OCAPI) settings.

Step 1 - Generating an API Client ID

To connect your Salesforce Commerce Cloud website to FeedOps you will need to generate an API Client ID.

Account administrators can use Salesforce Account Manager to create API client IDs. To add an API Client and get the API Client ID, perform the following steps:

  1. Log into Account Manager.
  2. Click API Client.

    The API Clients page opens, showing a list of client IDs and, for each ID, a related display name. The display name is a human readable value that identifies the client.

  3. Click Add API Client.
  4. Enter the display name of the client e.g. "FeedOps" in the Display Name field. 
  5. Click Add.

    Account Manager creates a client ID for the display name you provided.

  6. Click Add.

    The API Clients page opens showing a list of Client IDs and, for each ID, a related display name.

  7. Copy your Client ID and enter it in the FeedOps.

From here, you can proceed to updating your Open Client API (OCAPI) settings.

Step 2 - Updating your Open Commerce API (OCAPI) settings

To enable FeedOps to access the required information from your Salesforce Commerce Cloud website you will need to update your Open Commerce API (OCAPI) settings.

Business Managers can use Salesforce Commerce Cloud Business Manager to update your OCAPI settings. To make the required updates, perform the following steps:

  1. Log into the Salesforce Commerce Cloud Business Manager.
  2. Click Administration.
  3. Under Site Development, Click Open Commerce API settings.
  4. From the Select Type selector, select Shop.
  5. From the Select Context selector, select your store.
  6. Depending on whether you have existing OCAPI settings you wish to keep or not, either add an entry to the clients list of your existing OCAPI settings or create new OCAPI settings.

Add an entry to the clients list of your existing OCAPI settings

Your existing OCAPI settings will look something like as follows:

Add a comma after the last } before the ] which ends your clients list, and paste the contents shown under New client entry below. Update the client_id fleld (shown as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) with the value of your API Client ID from Step 1 - Generating an API Client ID from above. 

Create new OCAPI settings

Create new OCAPI settings as follows:

Between the lines with a [ and a ], paste the contents shown under New client entry below.

New client entry

When using this entry, update the client_id fleld (shown as xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) with the value of your API Client ID from  Step 1 - Generating an API Client ID from above

{
  "_v" : "21.4",
  "clients":
  [
    {
    "client_id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "resources":
      [
        {
          "resource_id":"/categories/*",
          "methods":["get"],
          "read_attributes":"(**)"
        },
        {
          "resource_id":"/product_search",
          "methods":["get"],
          "read_attributes":"(**)"
        },
        {
          "resource_id":"/products/*",
          "methods":["get"],
          "read_attributes":"(**)"
        },
        {
          "resource_id":"/promotions/*",
          "methods":["get"],
          "read_attributes":"(**)"
        },
        {
          "resource_id":"/site",
          "methods":["get"],
          "read_attributes":"(**)"
        }
      ]
    }
  ]
}