APIs and SDKs

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 IDTypeNotes
isSanityIntegrationEnabledBooleanTurns the integration on or off. Default: false
sanityApiHostUrlStringDefault: api.sanity.io
sanityBearerTokenPasswordAPI token with write access; masked in Business Manager
sanityProjectIdStringFound in sanity.io/manage
sanityDatasetStringFor example: staging, development, or production
sanityVersionStringAPI version, including the leading v. For example: v2025-11-28
sanityApiQueryParamsStringDefault: returnIds=true&autoGenerateArrayKeys=true&visibility=deferred&tag=sanity.sfcc
isExternalImageBooleanEnable if your catalog uses externally hosted product images. When disabled, image URLs are built from siteBaseUrlForImages. Default: false
siteBaseUrlForImagesStringHostname of your SFCC instance, used to build absolute product image URLs when isExternalImage is disabled
pwaSanityBaseUrlStringHostname of your PWA Kit storefront, used to build product page URLs (https://HOSTNAME/product/PRODUCT_ID) for a productUrl entry in the product mapping
sfccToSanityCategoryAttributeMappingsTextJSON object that maps SFCC category attributes to Sanity fields. See Category attribute mappings.
sfccToSanityProductAttributeMappingsTextJSON 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

ParameterDescriptionValues
isEnabledEnable or disable this step for the given localetrue / false (default: true)
localeLocale to sync. Required.A Business Manager locale ID, for example en_US, fr, or de (default: en_US)
sendLocalizedAttributesOnlyWhen 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

ParameterDescriptionValues
isEnabledEnable or disable this step for the given localetrue / false (default: true)
localeLocale to sync. Required.A Business Manager locale ID, for example en_US, fr, or de (default: en_US)
sendLocalizedAttributesOnlyWhen 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)
ingestionStrategyFULL sends all products. DELTA sends only products modified since the last successful product sync. Required.FULL / DELTA (default: FULL)
includeMasterProductsOutOfStockInclude master products that have no variants in stock. When false, only orderable products are synced.true / false (default: true)

Further reading

Was this page helpful?

Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change site theme