Setup Guide
Get SFCC Copilot running in your Business Manager in under 5 minutes.
Requirements
- Google Chrome or Microsoft Edge browser
- Access to your SFCC Business Manager (any sandbox or production)
- Ability to edit OCAPI Settings in Business Manager
- Access to account.demandware.com to create an API client
- SFCC Data API version
v24_1or higher
1. Install the Chrome Extension
*.commercecloud.salesforce.com or *.demandware.net.
2. Configure OCAPI Settings (Site-scoped)
SFCC Copilot uses the OCAPI Data API to create promotions, campaigns, coupons, and customer groups. These resources are site-scoped and must be configured per site.
RefArch) from the Context dropdown.
clients array.
| Resource | Methods | Purpose |
|---|---|---|
/sites/*/campaigns/* |
GET PUT | Create & read campaigns |
/sites/*/campaigns/*/promotions/* |
PUT | Link promotions to campaigns |
/sites/*/campaigns/*/customer_groups/* |
PUT DELETE | Assign & remove customer groups |
/sites/*/campaigns/*/coupons/* |
PUT | Link coupons to campaigns |
/sites/*/promotions/* |
GET PUT | Create & read promotions |
/sites/*/coupons/* |
GET PUT | Create coupons |
/sites/*/customer_groups/* |
GET PUT | Create customer groups |
3. System Object Attributes (optional)
Creating custom attributes on system objects (Profile, Order, Product, etc.) requires an additional OCAPI permission. This is a global resource — it must be configured in the Global context, not the site context.
{
"_v": "24.1",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/system_object_definitions/**",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
/s/-/dw/data/v24_1/system_object_definitions/...) — it does not include a site ID. This is why it must be configured in the Global context, separate from your site-scoped resources.
| Resource | Context Global | Methods | Purpose |
|---|---|---|---|
/system_object_definitions/** |
Global | GET PUT | Create & read custom attributes on any system object |
4. Configure Export (optional)
The export feature allows you to download orders, customers, products, promotions, campaigns and coupons as CSV files directly from the Copilot chat.
Enable order export (Shop API)
Orders use the Shop API and require a separate configuration.
Climate_US).
{
"_v": "21.3",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/order_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
Enable other exports (Data API — site context)
Add these to Data → your site. These use search endpoints — not simple list endpoints.
{
"_v": "21.3",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/sites/*/promotion_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/campaign_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/coupon_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/customer_lists/*/customer_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
Enable product export (Data API — Global context)
Products use the global catalog. Add these to Data → Global (organization-wide).
{
"_v": "21.3",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/product_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
Supported export objects
| Object | API / Context | Example command |
|---|---|---|
| Orders | Shop API — site | "export orders from July" |
| Customers | Data API — Global | "export all customers" |
| Products | Data API — Global | "export all products" |
| Promotions | Data API — site | "export all promotions" |
| Campaigns | Data API — site | "export all campaigns" |
| Coupons | Data API — site | "export all coupons" |
5. Create an API Client in Account Manager
If you don't have an API client yet, create one at account.demandware.com.
bjjp_004).
6. Enter Credentials in the Extension
https://xxxx-001.dx.commercecloud.salesforce.com), Client ID, Client Secret, API Version (v24_1), and License Key.
Full OCAPI JSON Reference
Replace YOUR_CLIENT_ID with your actual API client ID.
Site-scoped (Data → your site)
Add this to Administration → Site Development → Open Commerce API Settings → Data → [your site].
{
"_v": "24.1",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/sites/*/campaigns/*",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/campaigns/*/promotions/*",
"methods": ["put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/campaigns/*/customer_groups/*",
"methods": ["put", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/campaigns/*/coupons/*",
"methods": ["put", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/promotions/*",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/coupons/*",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/customer_groups/*",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
Global (Data → Global) — required for System Object Attributes only
Add this separately in Administration → Site Development → Open Commerce API Settings → Data → Global.
{
"_v": "24.1",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/system_object_definitions/**",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
"clients": [...] array — do not replace the entire JSON.
Full OCAPI JSON — Copy & Paste Reference
Replace YOUR_CLIENT_ID with your API client ID throughout. Apply each block in the corresponding context.
1. Data API — your site context
Administration → Site Development → Open Commerce API Settings → Data → [your site]
{
"_v": "21.3",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{ "resource_id": "/sites/*/campaigns/*", "methods": ["get","put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/campaigns/*/promotions/*", "methods": ["put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/campaigns/*/customer_groups/*", "methods": ["put","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/campaigns/*/coupons/*", "methods": ["put","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/promotions/*", "methods": ["get","put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/coupons/*", "methods": ["get","put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/customer_groups/*", "methods": ["get","put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/promotion_search", "methods": ["post"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/campaign_search", "methods": ["post"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/coupon_search", "methods": ["post"], "read_attributes": "(**)", "write_attributes": "(**)" }
]
}
]
}
2. Data API — Global context
Administration → Site Development → Open Commerce API Settings → Data → Global (organization-wide)
Customer groups and system object attributes require Global context in addition to site context.
{
"_v": "21.3",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{ "resource_id": "/system_object_definitions/**", "methods": ["get","put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/sites/*/customer_groups/*", "methods": ["get","put","patch","delete"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/product_search", "methods": ["post"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/products/*", "methods": ["get"], "read_attributes": "(**)", "write_attributes": "(**)" },
{ "resource_id": "/customer_lists/*/customer_search", "methods": ["post"], "read_attributes": "(**)", "write_attributes": "(**)" }
]
}
]
}
3. Shop API — your site context
Administration → Site Development → Open Commerce API Settings → Shop → [your site]
{
"_v": "21.3",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{ "resource_id": "/order_search", "methods": ["post"], "read_attributes": "(**)", "write_attributes": "(**)" }
]
}
]
}
"clients": [...] array — do not replace the entire JSON.
Troubleshooting
Error: ClientAccessForbiddenException
Your API client doesn't have permission for the requested resource. Check that:
- The site-scoped OCAPI resources were added to the correct site context (not Global)
- The system_object_definitions resource was added to the Global context (not site-scoped)
- The correct roles were added in Account Manager for your tenant
- You waited ~3 minutes after saving OCAPI settings for changes to propagate
Error: OCAPI auth failed
Authentication with the Salesforce Account Manager failed. Check that:
- Your Client ID and Client Secret are correct
- The API client is enabled in Account Manager
- The tenant roles include Sandbox API User for your environment
Copilot button not appearing
The extension only injects on Business Manager URLs matching *.commercecloud.salesforce.com or *.demandware.net. Make sure you're on a BM page and the extension is enabled in chrome://extensions.
Still having issues?
Contact us at thiago@bloomcreate.com.br and include the error message from the Copilot chat.