Connect your Salesforce B2C Commerce Cloud instance to EcomCentral using the legacy Open Commerce API (OCAPI) with Account Manager client-credentials authentication.
| Property | OCAPI (this integration) | SCAPI (not used) |
|---|---|---|
| Full name | Open Commerce API | Shopper APIs / Commerce APIs |
| Base URL pattern | /s/{site}/dw/shop/{version} | /s/{site}/dw/shop/{version} or ECOM CDN |
| Auth | Account Manager client-credentials Bearer token | PKCE / Shopper login tokens |
| Order write | Yes (limited) | No (read-optimised) |
| Inventory write | No — use OCI / Inventory Lists | No |
| Tracking push | No — use Business Manager | No |
client_id granting access to /orders/** and /products/**POST https://account.demandware.com/dw/oauth2/access_token?client_id={id}&client_secret={secret}&grant_type=client_credentials| Key | Required | Description | Example |
|---|---|---|---|
host |
Required | Instance hostname — the full subdomain of your B2C Commerce instance | abc-001.dx.commercecloud.salesforce.com |
site |
Required | Site ID from Business Manager (Administration → Sites → Manage Sites) | RefArch |
client_id |
Required | Account Manager API client ID used for identifying the caller and for authentication | aaaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
access_token |
Required | OAuth2 Bearer token obtained via client-credentials grant from Account Manager. Short-lived (typically 30 min). | eyJ0eXAiOiJKV1Qi… |
version |
Optional | OCAPI version string. Defaults to v23_2 if omitted. Use the version supported by your instance. |
v23_2 |
instance for host; site_id for site; clientId for client_id; token for access_token.
| Operation | Method | Shop API Path |
|---|---|---|
| Test connection | GET | /s/{site}/dw/shop/{ver}/site |
| List orders | POST | /s/{site}/dw/shop/{ver}/order_search — match_all_query, sorted creation_date desc |
| Order detail | GET | /s/{site}/dw/shop/{ver}/orders/{order_no} |
| List products | GET | /s/{site}/dw/shop/{ver}/product_search?q=&refine_1=cgid=root&expand=prices,availability |
| Product detail + availability | GET | /s/{site}/dw/shop/{ver}/products/{product_id}?expand=availability |
Authorization: Bearer {access_token} and
x-dw-client-id: {client_id} headers, plus ?client_id={client_id}
on the URL as required by OCAPI client-application identification rules.
OCAPI is a shopper-facing API: it exposes product availability and order placement for storefront use. It was not designed for back-office write operations. Salesforce intentionally separates inventory management (Inventory Lists / OCI) and fulfillment (Business Manager / OMS) from the commerce-facing Shop API to enforce data integrity and audit controls.
| Feature | Supported | Notes |
|---|---|---|
| View orders (paginated) | ✅ | Order number, date, status, total, currency via order_search |
| View order detail | ✅ | Customer info, billing address, shipping address + method, shipment status, product items with qty and price |
| View products (paginated) | ✅ | Product ID, name, price, ATS (available to sell) via product_search with expand=prices,availability |
| View product detail (availability) | ✅ | Inventory ATS, stock_level, orderable flag; first product image; category; prices per currency |
| Test connection | ✅ | Returns host, site ID, API version from the /site endpoint |
| Add tracking / push shipment | ❌ | Not supported by OCAPI. Use Business Manager or an OMS integration. |
| Update stock quantity | ❌ | Not supported by OCAPI. Use Inventory Lists / OCI API in Business Manager. |
The access_token has expired (typically 30-minute lifetime) or the client_id
is incorrect. Request a fresh token from Account Manager using the client-credentials grant and
update the credential in EcomCentral via Rotate Keys.
The OCAPI Shop API permission for /orders/** has not been granted to your client_id
in Business Manager. Navigate to Administration → Site Development → Open Commerce API Settings → Shop
and add the client_id entry with the required resources.
One or more required fields (host, client_id, access_token) are empty.
Verify all five credential fields are populated in your EcomCentral connection.
The Shop API product search uses refine_1=cgid=root to enumerate from the catalog root.
If your site has a different root category ID, you may need to adjust the refinement. Also ensure
the storefront catalog is published and the API client has product read access.