Skip to main content

Salesforce Commerce Cloud Setup Guide

Prerequisites

  • An Administrator user in Salesforce Commerce Cloud.

  • Your account must be able to use these Admin API authorization scopes:

    • sfcc.catalogs
    • sfcc.customerlists
    • sfcc.gift-certificates
    • sfcc.orders
    • sfcc.products
    • sfcc.promotions
    • sfcc.source-codes
  • For OCAPI tables only: a second API client. Open Commerce API (OCAPI) calls reject a client ID created for the Salesforce Commerce API (SCAPI), so each API gets its own client.

Setup Guide

  • Step 1: Create a Salesforce Commerce API client

    1. Log in to your Salesforce Commerce Cloud account.

    2. Open API Client from the left-hand menu.

    3. Click Add API Client.

    4. Give the client a Display Name.

    5. Choose a password and type it in Password and Confirm Password. Keep a copy: this password is the client secret.

    6. Under Organizations, click Add, pick the organizations this client should cover, and click Add to confirm.

    7. Under Roles:

      1. Click Add.
      2. Choose the Salesforce Commerce API category.
      3. Click Add.
      4. Click the filter button, then pick the organization to show its instances.
      5. Search for each instance the client should reach, select them all, and click Add.
    8. Paste the scopes from the Prerequisites section into Allowed Scopes, one per line.

    9. Set Token Endpoint Auth Method to client_secret_post.

    10. Set Access Token Format to JWT.

    11. Click Save.

    12. Copy the API Client ID that appears. In Step 5 it goes into Client ID, and the password into Client Secret.

  • Step 2: Find your organization ID and short code

    1. Under Administration > Site Development, open Salesforce Commerce API Settings.
    2. Copy the Organization ID and Short Code from this page. In Step 5 they go into the fields of the same name.
  • Step 3: Find your site ID

    1. Under Administration > Sites, open Manage Sites.
    2. Copy the Site ID from this page. In Step 5 it goes into Site ID.
  • Step 4: Find your customer list ID

    1. Under Administration > Sites, open Customer Lists.
    2. Copy the Customer List ID from this page. In Step 5 it goes into Customer List ID.
  • (Optional) Create an Open Commerce API client

    Skip this section unless you want to sync OCAPI tables. Create a new client here, because the one from Step 1 won't work for OCAPI.

    1. Open API Client from the left-hand menu.
    2. Click Add API Client.
    3. Give the client a Display Name.
    4. Choose a password and type it in Password and Confirm Password. Keep a copy: this password is the OCAPI client secret.
    5. Under Organizations, click Add, pick the organizations this client should cover, and click Add to confirm.
    6. Skip the Roles section.
    7. Set Token Endpoint Auth Method to client_secret_post.
    8. Set Access Token Format to JWT.
    9. Click Save.
    10. Copy the API Client ID that appears. In Step 5 it goes into OCAPI Client ID, and the password into OCAPI Client Secret.
  • (Optional) Add permissions for OCAPI endpoints

    1. Under Administration > Site Development, open Open Commerce API Settings.
    2. Set Select Type to Data.
    3. Set Select Context to Global.
    4. Paste the permissions code below into the editor. Entries for tables you won't sync can be left out. Each table you sync needs its resource_id, methods, and attributes.
{
"_v": "23.0",
"clients": [
{
"client_id": "<OCAPI Client ID>",
"resources": [
{
"resource_id": "/sites/*/customer_group_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/custom_objects_search/*",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/custom_object_definitions/*/attribute_definition_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/custom_object_definitions/*/attribute_group_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/stores",
"methods": [
"get"
],
"read_attributes": "(**)"
},
{
"resource_id": "/inventory_lists",
"methods": [
"get"
],
"read_attributes": "(**)"
},
{
"resource_id": "/inventory_lists/*/product_inventory_records",
"methods": [
"get"
],
"read_attributes": "(**)"
},
{
"resource_id": "/catalogs/*/shared_product_options",
"methods": [
"get"
],
"read_attributes": "(**)"
}
]
}
]
}
  • (Optional) Find your OCAPI hostname

    1. Under Administration > Sites, open Manage Sites.
    2. Open Manage Business Manager site.
    3. Copy the Hostname from the Hostnames tab. Step 5 asks for it as the OCAPI Hostname.
  • (Optional) Find your custom object types

    1. Under Administration > Site Development, open Custom Object Types.
    2. Step 5 takes custom object type names as a comma-separated list, so copy the ones Matia should sync.
  • Step 5: Connect Salesforce Commerce Cloud in Matia

    1. Type in the Client ID and Client Secret of the API client from Step 1.
    2. For Organization ID and Short Code, use the values from Step 2.
    3. For Site ID, use the value from Step 3.
    4. For Customer List ID, use the value from Step 4.
    5. (Optional) If you created the OCAPI client, switch on Sync OCAPI Endpoints, then fill in:
      • OCAPI Client ID and OCAPI Client Secret from your OCAPI client.
      • OCAPI Hostname from the Hostnames tab.
      • (Optional) List of Custom Object Types, with the names separated by commas.
    6. Enter an Asset Name.
    7. (Optional) Enter a Description.
    8. (Optional) Assign Tags.
    9. Select an Owner.
    10. Verify that your Salesforce Commerce Cloud account is successfully connected by clicking Test Connection.
    11. Click Connect.

ON THIS PAGE

Need Help?

Get help and support on all things Matia.

Contact Us