Commerce Cloud connects the customer journey and drives success from anywhere with customer-centric commerce built for every industry.


What can you do with this Integration?

Include a bulleted list (at least two bullets) of what the customer can do with the integration. 

PRD Use Cases Example

Use Cases

  • As a marketing operator, I want to incrementally send segmented users attributes to Braze, where I can easily create the segments based on these information for targeting correct consumers.

  • As a data engineer, I want to automatically map the custom Ids of the consumers to Braze unidentified users so that I can facilitate multiple marketing tools on the marketing campaign

  • As a marketing operator, I want to remove opt-out consumers from the list on Braze to provide the matching privacy level for the target consumers.



Prerequisites

Limitation

About Incremental Data Loading <optional section>



Step 1. How to create API Client on Commerce Cloud Account Manager System

1. Go to Account Manager UI

2. Click on API Client

3. Click Add API Client button

4. Enter the Display Name, Password and Confirm Password fields

5. Check on Access Control is Enabled

6. On Organizations choose your organization

7. On Roles section, click Add button

8. In Assign Roles dialog, choose appropriate role (in this case is Sandbox API User) then click Add

9. After role is added, click on the marked icon in below image

10. Scroll down to Open ID Connect add Default Scopes as below in the box

mail
roles
tenantFilter
profile

11. Add Redirect URI: https://admin.us01.dx.commercecloud.salesforce.com/oauth2-redirect.html

12. In Token Endpoint Auth Method section and choose client_secret_basic

13. Choose JWT for Access Token Format

14. Click Save

15. You will be navigated back to the API Client screen

16. Please note down the API Client ID and Password. This will be used as Authentication credentials to integrate with your SFCC instance.


Step 2: How to enable API Client to access Data API

1. Go to Business Manager UI (https://{YOUR_INSTANCE_URL}.commercecloud.salesforce.com/on/demandware.store/Sites-Site/default/ViewApplication-DisplayWelcomePage)

2. Click on Administration then choose Open Commerce API Settings

3. On Open Commerce API Settings screen, Select Type as Data

4. The configuration for Data API appear, enter below texts to the text box. With Select Context choose Global (organization-wide). Then click Save.

{ "_v": "21.6", "clients": [ { "client_id": "your_api_client_id", "resources": [ { "methods": [ "get", "post", "put", "patch", "delete" ], "read_attributes": "(**)", "write_attributes": "(**)", "resource_id": "/**" } ] } ] }

5. Wait for 3 minutes then your API Client is ready to be used with Data API and Salesforce B2C Commerce Cloud connector.



Use the TD Console to Create Your Connection

Create a New Connection

In Treasure Data, you must create and configure the data connection prior to running your query. As part of the data connection, you provide authentication to access the integration.

Open TD Console.
Navigate to Integrations Hub  Catalog.
Search for and select Salesforce B2C Commerce Cloud

Choose Create Authentication
The following dialog opens:


Enter the required information:
ParameterDescription

API Client ID

Key which you got after create your application on Commerce Cloud's Account Manager Application.

API Client Password

The password for your API Client when you create on Commerce Cloud's Account Manager Application.

Base URI

URL for accessing your Business Manager Application. Example value https://xxxx.commercecloud.salesforce.com/

Enter a name for your connection.

Select Continue.



Transfer Your Data to Treasure Data


After creating the authenticated connection, you are automatically taken to Authentications.


Search for the connection you created. 

Select New Source.
Type a name for your Source in the Data Transfer field.

Select Next.

The Source Table dialog opens.

Edit the following parameters:

Parameters Description
Data Type*The data objects that you want to ingest into Treasure Data
Customer List IDThe customer List ID you want to import customer information from
Incremental loadingSelect to ingest only newly created data since the previous ingestion.
Created FromThe specific time you would like to ingest the data (YYYYMMDDHH format).
Select Next.

The Data Settings page can be modified for your needs or you can skip the page.

Optionally, edit the following parameters:


Select Next.


*All Available Data Types

Target

Description

Customers From List

The customer info from a specific customer list

Products

Product info of Salesforce Commerce Cloud account

Categories and Product Assignments

Product category info and products belong to each category

Inventory Lists and Product Inventories

Inventory list and product in each inventory list

StoresStore info, location and inventory belongs to stores
CatalogsProduct catalog info and count of products for each catalog 

Data Preview 

Limitation 

In preview mode, the connector does not support to generate the detailed data preview due to time restriction on fetching data preview.
An Inventory List with no product still inserted as one record, the properties belonged to Product Inventory List will be null.


Data Placement


Available Configuration

Configuration name

Type

Available when

Required

Sample value

Description

base_url

STRING

default

yes

https://xxxx.example.com

SFCC’s instance base url

catalog_id

STRING

target = categories

no

test

Catalog’s ID

client_id

STRING

default

yes

abcdef

Application’s ID

client_secret

STRING

default

yes

abcdef

Application’s Secret

customer_list_id

STRING

target = customers

yes if target = customers

test

Customer List Id

incremental

BOOLEAN

target = customers

target = products

target = catalog

no

true

Ingest incremental or not

initial_retry_wait

LONG

default

no

1

First wait time when retrying (in seconds)

inventory_list_id

STRING

target = inventory_lists

no

test

Inventory List’s ID

last_value

STRING

target = customers

target = products

target = catalog

no

2021-05-25T02:49:29.000Z

The timestamp to start ingest data

levels

LONG

target = categories

yes if target = categories

0

Level of sub-category to ingest when target = categories

maximum_retries

LONG

default

no

5

Maximum number of retry

maximum_retry_wait

LONG

default

no

120

Max wait time when retrying (in seconds)

site_id

STRING

target = products

target = stores

yes if target = stores

test

The Site ID

target

ENUM (customers , stores , categories , products , catalogs , inventory_lists )

default

yes

customers

Target data type to ingest


Sample Configuration

Customers

in:
  type: salesforce_commerce_cloud
  client_id: xxx
  client_secret: yyy
  base_url: https://{realm_id}-001.sandbox.us01.dx.commercecloud.salesforce.com/
  target: customers
  customer_list_id: phu_test
  last_value: 2021-05-25T02:49:29.000Z
  incremental: true

Products

in:
  type: salesforce_commerce_cloud
  client_id: xxx
  client_secret: yyy
  base_url: https://{realm_id}-001.sandbox.us01.dx.commercecloud.salesforce.com/
  target: products
  site_id: phu_test
  incremental: true
  last_value: 2021-05-25T02:55:28.000Z

Stores

in:
  type: salesforce_commerce_cloud
  client_id: xxx
  client_secret: yyy
  base_url: https://{realm_id}-001.sandbox.us01.dx.commercecloud.salesforce.com/
  target: stores
  site_id: phu_test2

Inventory Lists and Product Assignments

in:
  type: salesforce_commerce_cloud
  client_id: xxx
  client_secret: yyy
  base_url: https://{realm_id}-001.sandbox.us01.dx.commercecloud.salesforce.com/
  target: INVENTORY_LISTS

Categories

in:
  type: salesforce_commerce_cloud
  client_id: xxx
  client_secret: yyy
  base_url: https://{realm_id}-001.sandbox.us01.dx.commercecloud.salesforce.com/
  target: categories
  catalog_id: phu_cat

Catalogs

in:
  type: salesforce_commerce_cloud
  client_id: xxx
  client_secret: yyy
  base_url: https://{realm_id}-001.sandbox.us01.dx.commercecloud.salesforce.com/
  target: catalogs
  incremental: true
  last_value: 2021-05-26T02:55:28.000Z