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_listsresource
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 synccustomer_lists/{list_id}/customer_groups/{group_id}/members— Read/Write for customer group membership
Authentication
Salesforce Commerce Cloud supports two authentication methods.
Client Credentials (Recommended)
- In Account Manager, create or locate your API client
- Copy the Client ID and Client Secret
- In Zeotap, select Client Credentials as the authentication method
- Paste your Client ID and Client Secret
- Zeotap automatically obtains and refreshes access tokens using the
https://account.demandware.com/dwsso/oauth2/access_tokenendpoint
Access Token
- Obtain a valid OCAPI access token from Account Manager or via a token request
- In Zeotap, select Access Token as the authentication method
- Paste your access token
- Note: static tokens expire and must be manually refreshed
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
| Instance Hostname | Text | Yes | Your Commerce Cloud instance hostname (e.g., myinstance.dx.commercecloud.salesforce.com) |
| Site ID | Text | Yes | The B2C Commerce site identifier (e.g., SiteGenesis or RefArch) |
| OCAPI Version | Select | Yes | OCAPI Data API version. Options: v23.2, v23.1, v22.10. Default: v23.2 |
Target Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Object Type | Select | Yes | The Commerce Cloud object to sync data to: Customer or Customer Group |
| Customer List ID | Text | Yes | The customer list that contains the customers. Typically matches the site ID. |
| Customer Group ID | Text | Conditional | The ID of the customer group to manage membership for. Required only when Object Type is Customer Group. |
Supported Operations
Sync Modes
| Mode | Supported |
|---|---|
| Upsert | Yes |
| Insert | Yes |
| Update | Yes |
| Mirror | — |
Audience Sync Modes
| Mode | Supported |
|---|---|
| Add | Yes |
| Remove | Yes |
| Mirror | Yes |
| Upsert | — |
Features
- Field Mapping: Yes
- Schema Introspection: No — OCAPI does not expose a describe endpoint for customer field schemas
Required Mapping Fields
| Object Type | Required Fields | Description |
|---|---|---|
| Customer | customer_no | Unique customer identifier in Commerce Cloud |
| Customer Group | customer_no | Customer number for group membership operations |
Default Destination Fields
| Field | Type | Description |
|---|---|---|
customer_no | string | Unique customer identifier |
email | string | Customer email address |
first_name | string | Customer first name |
last_name | string | Customer last name |
phone_home | string | Home phone number |
birthday | string | Customer birthday |
gender | integer | Gender code (1 = Male, 2 = Female) |
company_name | string | Company 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
- Zeotap reads rows from your model query
- Rows are processed in chunks of up to 50
- The HTTP method sent to
/customer_lists/{list_id}/customers/{customer_no}depends on the sync mode:- Insert:
PUTcreates the customer. If the customer already exists, OCAPI returns HTTP 409 and the row is reported as failed. - Update:
PATCHupdates an existing customer. If the customer does not exist, OCAPI returns HTTP 404 and the row is reported as failed. - Upsert:
PATCHis tried first; if OCAPI returns HTTP 404 (customer does not exist), Zeotap automatically retries withPUTto create the customer.
- Insert:
- Per-row results are tracked and errors are reported with the customer number
Customer Group Membership
- Zeotap reads rows from your model query
- For add mode, a
POSTrequest adds each customer to the group - For remove mode, a
DELETErequest removes each customer from the group - 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-Afterheader - 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_noconsistently 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.