Sanity Connect for SFCC configuration reference
Reference for all configuration options in Sanity Connect for Salesforce Commerce Cloud, including preferences, mappings, and jobs.
This page documents all configuration options for Sanity Connect for Salesforce Commerce Cloud (SFCC). For installation and setup instructions, see Sanity Connect for Salesforce Commerce Cloud.
Site preferences
After importing the cartridge metadata, a Sanity custom preference group is available under Merchant Tools > Site Preferences > Custom Preferences. Each preference has a built-in description in Business Manager.
| Preference ID | Type | Notes |
|---|---|---|
| isSanityIntegrationEnabled | Boolean | Turns the integration on or off. Default: false |
| sanityApiHostUrl | String | Default: api.sanity.io |
| sanityBearerToken | Password | API token with write access; masked in Business Manager |
| sanityProjectId | String | Found in sanity.io/manage |
| sanityDataset | String | For example: staging, development, or production |
| sanityVersion | String | API version, including the leading v. For example: v2025-11-28 |
| sanityApiQueryParams | String | Default: returnIds=true&autoGenerateArrayKeys=true&visibility=deferred&tag=sanity.sfcc |
| isExternalImage | Boolean | Enable if your catalog uses externally hosted product images. When disabled, image URLs are built from siteBaseUrlForImages. Default: false |
| siteBaseUrlForImages | String | Hostname of your SFCC instance, used to build absolute product image URLs when isExternalImage is disabled |
| pwaSanityBaseUrl | String | Hostname of your PWA Kit storefront, used to build product page URLs (https://HOSTNAME/product/PRODUCT_ID) for a productUrl entry in the product mapping |
| sfccToSanityCategoryAttributeMappings | Text | JSON object that maps SFCC category attributes to Sanity fields. See Category attribute mappings. |
| sfccToSanityProductAttributeMappings | Text | JSON object that maps SFCC product attributes to Sanity fields. See Product attribute mappings. |
Attribute mappings
The two mapping preferences (sfccToSanityCategoryAttributeMappings and sfccToSanityProductAttributeMappings) are JSON configuration objects. They define which SFCC attributes the sync sends to Sanity, and the field names those attributes get under the store object in each Sanity document.
They're designed to be extended without code changes. To add a custom attribute, add a new key to the JSON in the preference value. Each job step reads the preferences when it starts, so the next sync run picks up the change without a redeploy.
Each attribute entry follows this shape:
"SFCC_ATTRIBUTE_ID": {
"sanityName": "SANITY_FIELD_NAME",
"localized": true | false,
"dataType": "String" | "Text" | "HTML" | "Boolean" | "Date" | "Image" |
"enum" | "Set" | "Array"
}Replace SFCC_ATTRIBUTE_ID with the ID of an SFCC system or custom attribute, and SANITY_FIELD_NAME with the field name to write under store in the Sanity document. If you omit sanityName, the sync uses the SFCC attribute ID. If you omit dataType, it defaults to String. dataType values are case-insensitive, and any value not in this list is sent as a string. Entries with localized: true are written as internationalized array values for the job step's locale.
Category attribute mappings
The metadata import leaves sfccToSanityCategoryAttributeMappings empty, and the category sync sends no mapped attributes until you set it. Use this value as a starting point:
{
"ID": {
"sanityName": "categoryId",
"localized": false,
"dataType": "String"
},
"creationDate": {
"sanityName": "creationDate",
"localized": false,
"dataType": "Date"
},
"description": {
"sanityName": "description",
"localized": true,
"dataType": "String"
},
"displayName": {
"sanityName": "displayName",
"localized": true,
"dataType": "String"
},
"online": {
"sanityName": "online",
"localized": false,
"dataType": "Boolean"
},
"onlineFrom": {
"sanityName": "onlineFrom",
"localized": false,
"dataType": "Date"
},
"onlineTo": {
"sanityName": "onlineTo",
"localized": false,
"dataType": "Date"
},
"thumbnail": {
"sanityName": "thumbnailImage",
"localized": false,
"dataType": "Image"
}
}Product attribute mappings
The metadata import leaves sfccToSanityProductAttributeMappings empty, and the product sync sends no mapped attributes until you set it. Use this value as a starting point:
{
"ID": {
"sanityName": "productId",
"localized": false,
"dataType": "String"
},
"brand": {
"sanityName": "brand",
"localized": false,
"dataType": "String"
},
"color": {
"sanityName": "color",
"localized": false,
"dataType": "String"
},
"creationDate": {
"sanityName": "creationDate",
"localized": false,
"dataType": "Date"
},
"isNew": {
"sanityName": "isNew",
"localized": false,
"dataType": "Boolean"
},
"isSale": {
"sanityName": "isSale",
"localized": false,
"dataType": "Boolean"
},
"lastModified": {
"sanityName": "lastModified",
"localized": false,
"dataType": "Date"
},
"longDescription": {
"sanityName": "longDescription",
"localized": true,
"dataType": "HTML"
},
"manufacturerName": {
"sanityName": "manufacturerName",
"localized": false,
"dataType": "String"
},
"manufacturerSKU": {
"sanityName": "manufacturerSKU",
"localized": false,
"dataType": "String"
},
"name": {
"sanityName": "name",
"localized": true,
"dataType": "String"
},
"onlineFlag": {
"sanityName": "onlineFlag",
"localized": false,
"dataType": "Boolean"
},
"onlineFrom": {
"sanityName": "onlineFrom",
"localized": false,
"dataType": "Date"
},
"onlineTo": {
"sanityName": "onlineTo",
"localized": false,
"dataType": "Date"
},
"pageDescription": {
"sanityName": "pageDescription",
"localized": true,
"dataType": "String"
},
"pageKeywords": {
"sanityName": "pageKeywords",
"localized": true,
"dataType": "String"
},
"pageTitle": {
"sanityName": "pageTitle",
"localized": true,
"dataType": "String"
},
"pageURL": {
"sanityName": "pageURL",
"localized": true,
"dataType": "String"
},
"refinementColor": {
"sanityName": "refinementColor",
"localized": false,
"dataType": "enum"
},
"searchable": {
"sanityName": "searchable",
"localized": false,
"dataType": "Boolean"
},
"searchableIfUnavailable": {
"sanityName": "searchableIfUnavailable",
"localized": false,
"dataType": "Boolean"
},
"shortDescription": {
"sanityName": "shortDescription",
"localized": true,
"dataType": "HTML"
},
"size": {
"sanityName": "size",
"localized": false,
"dataType": "String"
},
"productType": {
"sanityName": "productType",
"localized": false,
"dataType": "String"
},
"variationAttributes": {
"sanityName": "variationAttributes",
"localized": false,
"dataType": "Array"
},
"image": {
"sanityName": "productImage",
"localized": false,
"dataType": "String"
}
}Job step parameters
Both sync jobs (FULL_Sanity_Export_Categories_and_Products and DELTA_Sanity_Export_Categories_and_Products) use the same step-level parameters. Each locale your storefront supports needs its own category step and product step in each job.
Category sync step
| Parameter | Description | Values |
|---|---|---|
| isEnabled | Enable or disable this step for the given locale | true / false (default: true) |
| locale | Locale to sync. Required. | A Business Manager locale ID, for example en_US, fr, or de (default: en_US) |
| sendLocalizedAttributesOnly | When true, sends only attributes mapped with localized: true. The default jobs set this to false on the first locale's step and true on each additional locale's step. | true / false (default: false) |
Product sync step
| Parameter | Description | Values |
|---|---|---|
| isEnabled | Enable or disable this step for the given locale | true / false (default: true) |
| locale | Locale to sync. Required. | A Business Manager locale ID, for example en_US, fr, or de (default: en_US) |
| sendLocalizedAttributesOnly | When true, sends only attributes mapped with localized: true, and skips variants. The default jobs set this to false on the first locale's step and true on each additional locale's step. | true / false (default: false) |
| ingestionStrategy | FULL sends all products. DELTA sends only products modified since the last successful product sync. Required. | FULL / DELTA (default: FULL) |
| includeMasterProductsOutOfStock | Include master products that have no variants in stock. When false, only orderable products are synced. | true / false (default: true) |
Further reading
- Sanity Connect for SFCC: installation guide
@sanity/sfccon npm: full plugin API and exports reference- Connector repository
Was this page helpful?
Feedback submitted, thanks for helping us improve the docs. Have you tried these alternatives?