Skip to Content
DestinationsCRMSalesforce Commerce Cloud

Salesforce Commerce Cloud

Sync customer profiles and manage customer group membership in Salesforce Commerce Cloud (B2C). Use Zeotap to keep your Commerce Cloud customer data up to date with your latest warehouse data.

Prerequisites

  • A Salesforce Commerce Cloud B2C instance with OCAPI Data API enabled
  • An API client configured in Account Manager with Data API permissions
  • Client ID and Client Secret for the OCAPI API client
  • The customer list ID for your B2C Commerce site (typically the same as the site ID)
  • OCAPI Data API resource permissions configured in Business Manager for the customer_lists resource

Permissions

Your OCAPI API client must have the following Data API resource permissions configured in Business Manager under Administration > Site Development > Open Commerce API Settings:

  • customer_lists/{list_id}/customers — Read/Write for customer profile sync
  • customer_lists/{list_id}/customer_groups/{group_id}/members — Read/Write for customer group membership

Authentication

Salesforce Commerce Cloud supports two authentication methods.

  1. In Account Manager, create or locate your API client
  2. Copy the Client ID and Client Secret
  3. In Zeotap, select Client Credentials as the authentication method
  4. Paste your Client ID and Client Secret
  5. Zeotap automatically obtains and refreshes access tokens using the https://account.demandware.com/dwsso/oauth2/access_token endpoint

Access Token

  1. Obtain a valid OCAPI access token from Account Manager or via a token request
  2. In Zeotap, select Access Token as the authentication method
  3. Paste your access token
  4. Note: static tokens expire and must be manually refreshed

Configuration

FieldTypeRequiredDescription
Instance HostnameTextYesYour Commerce Cloud instance hostname (e.g., myinstance.dx.commercecloud.salesforce.com)
Site IDTextYesThe B2C Commerce site identifier (e.g., SiteGenesis or RefArch)
OCAPI VersionSelectYesOCAPI Data API version. Options: v23.2, v23.1, v22.10. Default: v23.2

Target Settings

FieldTypeRequiredDescription
Object TypeSelectYesThe Commerce Cloud object to sync data to: Customer or Customer Group
Customer List IDTextYesThe customer list that contains the customers. Typically matches the site ID.
Customer Group IDTextConditionalThe ID of the customer group to manage membership for. Required only when Object Type is Customer Group.

Supported Operations

Sync Modes

ModeSupported
UpsertYes
InsertYes
UpdateYes
Mirror

Audience Sync Modes

ModeSupported
AddYes
RemoveYes
MirrorYes
Upsert

Features

  • Field Mapping: Yes
  • Schema Introspection: No — OCAPI does not expose a describe endpoint for customer field schemas

Required Mapping Fields

Object TypeRequired FieldsDescription
Customercustomer_noUnique customer identifier in Commerce Cloud
Customer Groupcustomer_noCustomer number for group membership operations

Default Destination Fields

FieldTypeDescription
customer_nostringUnique customer identifier
emailstringCustomer email address
first_namestringCustomer first name
last_namestringCustomer last name
phone_homestringHome phone number
birthdaystringCustomer birthday
genderintegerGender code (1 = Male, 2 = Female)
company_namestringCompany name

How It Works

Zeotap uses the OCAPI Data API to sync customer data to Commerce Cloud. The exact behavior depends on the selected object type.

Customer Profile Sync

  1. Zeotap reads rows from your model query
  2. Rows are processed in chunks of up to 50
  3. The HTTP method sent to /customer_lists/{list_id}/customers/{customer_no} depends on the sync mode:
    • Insert: PUT creates the customer. If the customer already exists, OCAPI returns HTTP 409 and the row is reported as failed.
    • Update: PATCH updates an existing customer. If the customer does not exist, OCAPI returns HTTP 404 and the row is reported as failed.
    • Upsert: PATCH is tried first; if OCAPI returns HTTP 404 (customer does not exist), Zeotap automatically retries with PUT to create the customer.
  4. Per-row results are tracked and errors are reported with the customer number

Customer Group Membership

  1. Zeotap reads rows from your model query
  2. For add mode, a POST request adds each customer to the group
  3. For remove mode, a DELETE request removes each customer from the group
  4. For mirror mode, Zeotap compares the current sync with the previous one and adds new members while removing stale ones

Rate Limits

OCAPI batch requests support up to 50 sub-requests per call with a 5 MB body size limit. Rate limits vary by Commerce Cloud instance tier:

  • When rate limits are exceeded, the API returns HTTP 429 with a Retry-After header
  • Zeotap automatically retries with exponential backoff when rate-limited
  • Contact your Salesforce account team for specific rate limit thresholds for your instance

Best Practices

  • Use Client Credentials authentication for production syncs to avoid token expiration issues
  • Set the Customer List ID to match your site ID unless you use a shared customer list across sites
  • Map customer_no consistently between your warehouse data and Commerce Cloud to ensure correct upsert behavior
  • For audience use cases, use Customer Group as the object type with add/remove sync modes rather than syncing profile data
  • Keep sync batch sizes reasonable to stay within OCAPI rate limits — Zeotap handles chunking automatically

Troubleshooting

Authentication failed: token expired or invalid

Your access token has expired. If using Client Credentials, Zeotap refreshes tokens automatically. If using a static Access Token, generate a new token from Account Manager and update the destination credentials.

OCAPI error: access denied or 403

The API client does not have the required Data API resource permissions. In Business Manager, navigate to Administration > Site Development > Open Commerce API Settings and verify the Data API configuration includes read/write access to the customer_lists resource.

Customer not found when updating

The customer_no provided does not match an existing customer. Update mode uses PATCH, which requires the customer to already exist and returns HTTP 404 otherwise. Use upsert sync mode to automatically create customers that do not exist, or insert mode if you only want to create new customers.

Customer already exists on insert

Insert mode uses PUT with create-only semantics and returns HTTP 409 ResourceAlreadyExistsException when the customer_no is already present in the customer list. Switch to upsert or update mode to modify existing customers.

Customer group membership add fails with 404

The specified customer group does not exist. Verify the Customer Group ID in Business Manager under Merchant Tools > Customers > Customer Groups.

Missing customer_no error in sync logs

Every row must include a customer_no value in the field mapping. Ensure your model query includes a column mapped to the customer_no destination field.

Rate limited (HTTP 429)

Your Commerce Cloud instance has reached its API rate limit. Zeotap retries automatically with backoff, but sustained rate limiting may require reducing sync frequency or contacting Salesforce to increase your rate limit allocation.

OCAPI resource not configured

The OCAPI Data API resource path is not enabled for your API client. In Business Manager, navigate to Administration > Site Development > Open Commerce API Settings, select the Data API type, and add a resource configuration for customer_lists with read/write permissions for your API client ID.

Customer profile fields not updating

Ensure the field names in your mapping match the OCAPI field names exactly (e.g., first_name, last_name, email). OCAPI field names are case-sensitive and use underscore notation, not camelCase.

Last updated on