The SFCC Content Sync plugin connects Builder to your Salesforce B2C Commerce storefront using OCAPI (Open Commerce API), enabling Builder to create, update, and delete HTML Content Assets directly in your SFCC content library. This is an API-only integration and requires no cartridge installation.
When content is created or changed in Builder, a webhook fires and creates, updates, or deletes the HTML equivalent as a Content Asset in your SFCC library. Builder's HTML API transforms content from Builder's format into HTML before saving it to your library.
Before connecting the plugin, you need to grant your OCAPI client ID the correct Data API permissions.
- In SFCC Business Manager, go to Administration → Site Development → Open Commerce API Settings.
- From the Select Type field, choose Data.
- From the Select Context field, choose Global.
- Paste the following JSON into the text field, replacing
Change this to match your API Client IDwith your actual client ID:
{
"_v": "20.4",
"clients": [
{
"client_id": "Change this to match your API Client ID",
"resources": [
{
"resource_id": "/libraries/{library_id}/content/{content_id}",
"methods": ["get", "put", "patch", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/libraries/{library_id}/content/{content_id}/folders",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/libraries/{library_id}/folders/{folder_id}",
"methods": ["get", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/libraries/{library_id}/folders/{folder_id}/content",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/libraries/{library_id}/folder_assignments/{content_id}/{folder_id}",
"methods": ["get", "put", "delete"],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/libraries/{library_id}/folders/{folder_id}/sub_folders",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}- In Builder, go to Plugins.
- Find the Salesforce SFRA/Site Genesis tile and toggle it to On. If the page does not refresh automatically, refresh it manually.
- Click the Settings button on the tile to open the configuration modal.
- Fill in the fields as described below.
- Click the Connect button.
Client ID
Your SFCC OCAPI client ID. This is the credential used to authenticate against your Business Manager's Open Commerce API settings, and is typically an email address, such as, your-login@your-domain.com.
Password The password associated with your OCAPI client ID above.
Library name
The ID of your SFCC Content Library. For Reference Architecture sites (SFRA or SiteGenesis), this is RefArchGlobal by default. If your site uses a custom content library, use that ID instead. You can find this in Business Manager under Content → Libraries.
Force use qa api (toggle) When enabled, Builder uses its own QA API instead of the production API. Leave this off unless you are explicitly testing against Builder's QA environment.
Preview library name (optional) Only required if your preview or staging environment uses a different content library than your production site. Leave blank if both environments share the same library.
Api path
Your SFCC instance hostname, for example, mysandbox.mydomain.com. Do not include a trailing slash, a protocol (https://), or any subpath.
Preview path prefix (optional)
A URL prefix for the preview area, use if your storefront uses locale-based routing. For example: /us/en/. Leave blank if your storefront does not use a URL path prefix.
Content assets in SFCC map to a Section model in Builder. To create one:
- Go to Content Models.
- Click + Create Model.
- Select Section from the list.
- Enter
Content Assetas the name, or any name that fits your use case, and click Create.
- On the new model, click on the Advanced tab.
- Click on the Edit button next to Sync To SFCC.
- In the modal that opens, confirm syncing model entries by clicking Ok.
Your setup is complete. When you create and publish a new entry on this model, it appears as a Content Asset in your SFCC content library.