Skip to main content

Salesforce Commerce Cloud

Connect Salesforce Commerce Cloud to Billy Grace for insight in new & returning customers and a total overview of e-com metrics

Tim Schouten avatar
Written by Tim Schouten
Updated this week

Introduction to Salesforce Commerce Cloud

This guide will walk you through connecting your Salesforce Commerce Cloud store to Billy Grace. By connecting your store to Billy Grace, you will get insights into extra metrics like:

  • New Customers

  • Returning Customers

  • New Customer Revenue

  • Returning Customer Revenue

  • Customer Lifetime metrics

Syncing the total number of orders also increases tracking and attribution accuracy.

Step 1: Connect Salesforce Commerce Cloud

Navigate to Settings > Integrations and search for the E-commerce & CRM integration.

Navigate to E-commerce - Salesforce Commerce Cloud

Here, we expect multiple fields:

For the Salesforce cloud connection, we need the client ID and client secret (password). The instructions to create this can be found here. You need to follow the steps for 'Create an API client' and then share the client ID and client secret (password) in the above fields. For the allowed scopes, you can enter the following:

  • sfcc.catalogs

  • sfcc.inventory.availability

  • sfcc.inventory.reservations

  • sfcc.orders

  • sfcc.products

  • sfcc.promotions

Please note that a developer is required to set up the API client.

Step 2: Add Permissions to your OCAPI client ID.

Go to Salesforce Cloud β†’ Administration > Site Development > Open Commerce API Settings

Here, you will configure data and shop permissions, using the JSON below.

To set up this configuration, a call between a developer from your company and a developer from Billy Grace is required. You can email onboarding@billygrace.com to make an appointment.

Remember to replace the client ID in the example with your own newly created client ID. This will assign the permissions to your client.
​

sfc-data.json:

{
"_v": "18.1",
"clients": [
{
"client_id": "TO-FILL-IN",
"resources": [
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/sites"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/sites/*/locale_info/locales"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/catalogs"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/catalogs/*/categories"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/inventory_lists"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/inventory_lists/*/product_inventory_records"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/products/*"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/code_versions"
},
{
"methods": [
"patch",
"delete"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/code_versions/*"
},
{
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/jobs/*/executions"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/jobs/*/executions/*"
},
{
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/sites/*/cartridges"
}
]
}
]
}

sfc-shop.json:

{
"_v": "18.1",
"clients": [
{
"client_id": "TO-FILL-IN",
"resources": [
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/products/*"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/products/*/variations"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/products/*/prices",
"config": {
"product.prices.price_book_ids": "usd-sale-prices,usd-list-prices,eur-sale-prices,eur-list-prices,gbp-sale-prices,gbp-list-prices"
}
},
{
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/baskets"
},
{
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/orders"
},
{
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/order_search"
},
{
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)",
"resource_id": "/orders/*/notes"
}
]
}
]
}

Fetch your Site ID and Hostname.

  • Go to Administration > Sites > Manage Sites.

  • Here you can fetch the Site ID and Business Manager Hostname to use.

After you fill in the credentials, press Connect your data, and we will start the sync. Depending on the amount of data, this can take up to one day.

Did this answer your question?