Install and set up the Salesforce Commerce Cloud connector

Learn to install and set up the Salesforce Commerce Cloud connector.

Overview

Our integration with Salesforce Commerce Cloud includes two components that work together:

  • A Dotdigital connector to sync all the commerce data powering our Commerce intelligence (using OCAPI)
  • An officially certified SFCC cartridge that pre-installs the Dotdigital tracking and transactional email capability

This integration allows you to synchronise your store customers' information and purchase data as well as your product catalogue. You can choose which of your Commerce Cloud data fields get mapped to your Dotdigital contact data fields, allowing you to utilise their order information for better campaign targeting. You can also enrol new customer accounts and first-time buyers into your programs.

Install the Salesforce Commerce Cloud connector

Step 1: Install the cartridge

To start your installation, select the guide you need to use:

Step 2: Create a Demandware API client 

  1. Log in to your Demandware account management console, API Client section: https://account.demandware.com/dw/account/APIAdmin
  2. Select Add API Client
  3. Give your API client a display name and a password, whilst leaving the JWT and OpenID Connect fields as they are in their default state (with 'Default Scopes' set as 'mail'), and save them

    Demandware_add_API_client.png
  4. Once created, copy the generated API client ID and given password and go to the next step below

Step 3: Connect your store in Dotdigital

  1. Go to the page https://login.dotdigital.com/commerce-cloud
  2. Log in to your Dotdigital account (if you haven't done so already)
  3. Enter your store URL

    From April 2022, Salesforce Commerce Cloud are introducing changes which mean hyphenated host names will no longer be supported.

  4. Enter your site ID (go to Administration > Sites > Manage Sites and copy the ID of the site you wish to connect to)
    If connecting multiple storefronts to the same Dotdigital account you'll need to append the Site ID to the Store URL (https://www.example.com/s/site_id_here).
  5. Enter the API client ID and password and authorise the connection

    auth-connection.png

Before finally connecting to your store, you need to set the API permissions (at Shop and Data level) in your store's Business Manager:

  1. Copy the JSON for the Shop permission and paste it into your instance's Business Manager: Administration > Site development > Open Commerce API settings, select type 'Shop' and set the context to 'Global'
  2. Copy the JSON for the Data permission and paste it into your instance's Business Manager: Administration > Site development > Open Commerce API settings, select type 'Data' and set the context to 'Global'
  3. Once you're all set, select the Authorise

Working with your Commerce Cloud store settings

Once you've successfully installed the connector, you can start working with your general Commerce Cloud connector settings in Dotdigital. They're accessed by selecting Commerce Cloud in the settings menu.

This takes you to the 'Store' tab, where you can access data synchronisation, contact synchronisation and program enrolment settings. You can also remove your Commerce Cloud connection completely if you wish.

Remember to select Save after making any changes here.

Enabling subscriber synchronisation

To enable subscriber synchronisation, you need to create the 'Accepts Marketing' field in Salesforce Commerce Cloud.

  1. Go to Business Manager > Administration > Site Development > System Object Types > Profile > Attribute Definitions > New
  2. Set the ID as acceptsMarketing, set the display name as Accepts Marketing, set the value type as Boolean and select Apply
  3. In the Attribute Grouping tab, set both the ID and name as Marketing and select Add.
  4. Select Edit next to your newly created grouping
  5. Set the ID as acceptsMarketing and select Add

Customers

New Commerce Cloud customers are synced when the next synchronisation takes place. We attempt synchronisation five minutes after the last sync process finishes. Depending on the amount of data you're processing, the time each sync takes to complete might be between a few seconds to many hours.

A full synchronisation is also done every 24 hours to pick up any customer’s data modifications.

Please note

  • The first synchronisation will sync the entire customer list. New or modified customers will only be processed once the initial sync job has fully caught up with the old ones.
  • Customers are the users that have an account in your store, including those who aren't opted into your marketing. We also sync contacts placing orders as guests, as part of the 'Customers' group.

Please note, contacts can be re-enrolled into the program selected for Enrol new subscribers to if they are removed from the Sync subscribers to address book, and then become a subscriber in your store.

The customer fields we support for Commerce Cloud are (with data types in parentheses):

  • First name (text)
  • Last name (text)
  • Login (text)
  • Created date (date)
  • Last visit time (datetime)
  • Last login time (datetime)
  • Birthday (date)
  • Has account (text)
  • Preferred locale (text)
  • Shipping address 1 (text)
  • Shipping address 2 (text)
  • Shipping phone (text)
  • Shipping city (text)
  • Shipping postcode (text)
  • Shipping state (text)
  • Shipping country (text)
  • Shipping company (text)

Orders

New and modified orders sync every five minutes.

Please note

The first synchronisation will sync the order history. New or modified orders will only be processed once the initial sync job has fully caught up with the old ones.

Orders will be stored against Dotdigital contacts as Insight data.

Products

New products in the product catalogue of your site are synced when the next synchronisation takes place.

Full synchronisation is done every 24 hours to pick up any products data modifications or stock updates.

Please note

The first synchronisation will sync the entire site’s product catalog. New or modified products will only be processed once the initial sync job has fully caught up with the old ones.

Products are stored at the Dotdigital account level (known as AccountInsight). These are accessible by opening the settings menu in the bottom left corner of the screen, selecting Insight data, and then selecting the collection called 'Catalog_Default'.

Recording consent for your contacts

Consent is an agreement between you and your contacts about your intentions with their personal data.

We let you to store this consent in a free Insight data collection called ConsentInsight.

You can capture consent for your contacts, using one of the following:

  • A signup form
  • An embeded form (surveys and forms)
  • The API
  • The manual in-app importer

Data schema

Order Insight data schema

Attribute

   

Type

id

   

text

order_total

   

numerical

payment

   

text

delivery_method

   

text

delivery_total

   

numerical

currency

   

text

order_status

   

text

email

   

text

quote_id

   

text

purchase_date

   

date

billing_address

     
 

billing_address_1

 

text

 

billing_address_2

 

text

 

billing_city

 

text

 

billing_country

 

text

 

billing_postcode

 

text

delivery_address

     
 

Id

 

numerical

 

type

 

text

 

first_name

 

text

 

last_name

 

text

 

delivery_postcode

 

text

 

delivery_address_1

 

text

 

delivery_address_2

 

text

 

phone

 

numerical

 

delivery_city

 

text

 

delivery_country

 

text

 

state

 

text

 

company

 

text

 

fax

 

numerical

 

region

 

text

 

default

 

boolean

 

email

 

text

products

   

array

 

Product #1

   
 

name

 

text

 

price

 

numerical

 

sku

 

text

 

qty

 

numerical

       
 

Product #2

   
 

...

   

order_subtotal

   

numerical

base_subtotal_incl_tax

   

numerical

discount_amount *

   

numerical

coupon_code

   

text

payment_status    

text

store_name    

text

* The discount amount that's deducted from the order total. This should be a positive value.

Product Insight data (AccountInsight) schema

Attribute

Type

id

numerical

parent_id

numerical

name

string

price

numerical

type

string (variant, single, and configurable)

url

string

sku

string

stock

numerical

status

string

image_path

string

specialPrice

numerical

price_books

array

attributes

list

categories

array

Did you find this article helpful?

Can we help?

Thanks for using Dotdigital. If you need more help or support, then contact our support team.