Salesforce Commerce Cloud Setup Guide
Prerequisites
-
A Salesforce Commerce Cloud account with Administrator permissions.
-
Access to the following authorization scopes for Salesforce Commerce Cloud's Admin API:
sfcc.productssfcc.promotionssfcc.customerlistssfcc.catalogssfcc.gift-certificatessfcc.source-codessfcc.orderssfcc.price-books
-
When using OCAPI: Two separate API client applications - one for Salesforce Commerce API (SCAPI) tables, and one for Open Commerce API (OCAPI) tables. A client ID created for SCAPI cannot be reused for OCAPI calls.
Setup Guide
-
Step 1: Create a Salesforce Commerce API client
-
Log in to your Salesforce Commerce Cloud account.
-
On the left navigation menu, click API Client.
-
Click Add API Client.
-
Enter a Display Name for the API Client.
-
Enter a Password and Confirm Password for the new client. Copy the password (client secret) — you'll need it to configure Matia.
-
Go to the Organizations section, click Add, select one or more organizations, then click Add again.
-
Go to the Roles section:
- Click Add.
- Find the Salesforce Commerce API category and select it.
- Click Add.
- Click the filter button and select an organization.
- Enter the name of each instance you want to access with the API client, select each one, and click Add.
-
In Allowed Scopes, enter the scopes listed in the Prerequisites section above. Enter each scope on its own line.
-
In Token Endpoint Auth Method, select client_secret_post.
-
In Access Token Format, select JWT.
-
Click Save.
-
Copy the new API Client ID — you'll need it to configure Matia.
-
-
Step 2: Find your organization ID and short code
- Go to Administration > Site Development > Salesforce Commerce API Settings.
- Copy the Organization ID and Short Code — you'll need both to configure Matia.
-
Step 3: Find your site ID
- Go to Administration > Sites > Manage Sites.
- Copy the Site ID — you'll need it to configure Matia.
-
Step 4: Find your customer list ID
- Go to Administration > Sites > Customer Lists.
- Copy the Customer List ID — you'll need it to configure Matia.
-
(Optional) Create an Open Commerce API client
Required only if you want to sync tables supported through OCAPI. This must be a separate client from the one created in Step 1.
- On the left navigation menu, click API Client.
- Click Add API Client.
- Enter a Display Name for the API Client.
- Enter a Password and Confirm Password for the new client. Copy the password (client secret) — you'll need it to configure Matia.
- Go to the Organizations section, click Add, select one or more organizations, then click Add again.
- Skip the Roles section.
- In Token Endpoint Auth Method, select client_secret_post.
- In Access Token Format, select JWT.
- Click Save.
- Copy the new API Client ID — you'll need it to configure Matia.
-
(Optional) Add permissions for OCAPI endpoints
- Go to Administration > Site Development > Open Commerce API Settings.
- In Select Type, select Data.
- In Select Context, select Global.
- In the editor, add the permissions code: you only need to add the resource_id, methods, and attributes for the tables that you want to sync.
{
"_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
- Go to Administration > Sites > Manage Sites.
- Go to Manage Business Manager site.
- Go to the Hostnames tab and copy the Hostname — you'll need it to configure Matia.
-
(Optional) Find your custom object types
- Go to Administration > Site Development > Custom Object Types.
- Make a note of the object types you want to sync through Matia.
-
Step 5: Connect Salesforce Commerce Cloud in Matia
- Enter the Client ID and Client Secret you created in Step 1.
- Enter the Organization ID and Short Code you found in Step 2.
- Enter the Site ID you found in Step 3.
- Enter the Customer List ID you found in Step 4.
- (Optional) To sync Open Commerce API endpoints, toggle Sync OCAPI Endpoints on and enter:
- The OCAPI Client ID and OCAPI Client Secret you created above.
- The OCAPI Hostname you found above.
- (Optional) A comma-separated List of Custom Object Types you found above.
- Enter an Asset Name.
- (Optional) Enter a Description.
- (Optional) Assign Tags.
- Select an Owner.
- Verify that your Salesforce Commerce Cloud account is successfully connected by clicking Test Connection.
- Click Connect.