Configuration
The workflow requires configuration of both Salesforce Commerce Cloud and Fredhopper parameters. All configuration is centralized in the "Workflow configuration" node at the beginning of the workflow.
Workflow Configuration Node
The configuration node uses n8n's Set node to define all required parameters. These values are referenced throughout the workflow using expressions like $('Workflow configuration').item.json.salesforce.baseUrl.
Salesforce Commerce Cloud Parameters
salesforce.baseUrl
salesforce.baseUrlType: string
Required: Yes
Example: abcd-001.dx.commercecloud.salesforce.com
The base URL of your SFCC instance. This is typically in the format {realm}-{instance}.dx.commercecloud.salesforce.com for sandbox environments or your custom domain for production.
How to find:
Log into Business Manager
Check the URL in your browser
Use only the hostname without
https://or paths
salesforce.apiVersion
salesforce.apiVersionType: string
Required: Yes
Example: 24_1
The OCAPI version to use. This determines which API features are available. Use a version that is supported by your SFCC instance.
Available versions: Check the SFCC OCAPI documentation for supported versions.
Note: Using an older API version may limit available features. Using a version newer than your instance supports will result in errors.
salesforce.clientId
salesforce.clientIdType: string
Required: Yes
Example: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
The OCAPI client ID used for Shop API requests. This client must be configured in Business Manager with appropriate permissions.
How to configure:
In Business Manager, go to Administration → Site Development → Open Commerce API Settings
Add or update the Shop API configuration for your client ID
Ensure the client has permissions for the required resources
Required Shop API permissions:
salesforce.siteId
salesforce.siteIdType: string
Required: Yes
Example: RefArch
The SFCC site ID to use for Shop API requests. This determines which site's catalog and products are exported.
How to find:
In Business Manager, go to Administration → Sites → Manage Sites
The Site ID is displayed in the list
salesforce.catalog
salesforce.catalogType: string
Required: Yes
Example: storefront-catalog-en
The catalog ID to export categories from. This is used for the Data API categories endpoint.
How to find:
In Business Manager, go to Merchant Tools → Products and Catalogs → Catalogs
The Catalog ID is displayed in the list
salesforce.variationAttributes
salesforce.variationAttributesType: array
Required: Yes
Default: ["color", "size"]
Example: ["color", "size", "width"]
An array of attribute IDs that should be treated as variant-level attributes rather than product-level attributes. These attributes will be mapped to the nested item schema in Fredhopper.
Common variation attributes:
color- Product color variationssize- Size variations (S, M, L, XL, etc.)width- Width variations (for shoes, etc.)length- Length variations
Important: These must match the variation attribute IDs defined in your SFCC product model. The workflow converts these to snake_case for Fredhopper compatibility.
Fredhopper Parameters
fredhopper.tenantId
fredhopper.tenantIdType: string
Required: Yes
Example: my-tenant
Your Fredhopper tenant identifier. This is provided by Crownpeak when your Fredhopper environment is provisioned.
fredhopper.environment
fredhopper.environmentType: string
Required: Yes
Example: staging or production
The Fredhopper environment to use. Typically staging for testing and production for live data.
fredhopper.itemSchema
fredhopper.itemSchemaType: string
Required: Yes
Default: product
Example: product
The name of the item schema to create or update in Fredhopper. This schema defines the structure of your product data.
Note: If the schema already exists, the workflow will update it with any new attributes found in SFCC.
fredhopper.categoryTree
fredhopper.categoryTreeType: string
Required: Yes
Default: catalog01
Example: main-catalog
The name of the category tree in Fredhopper. This tree will be populated with categories from your SFCC catalog.
fredhopper.storeName
fredhopper.storeNameType: string
Required: Yes
Example: My Online Store
A human-readable name for your store. This is used as the localized name for the root of the category tree.
Credentials Configuration
SFCC OAuth2 Credentials
The workflow uses OAuth2 client credentials flow to authenticate with SFCC. Configure HTTP Basic Auth credentials in n8n:
User
Your SFCC API Client ID
Password
Your SFCC API Client Secret
These credentials are used by the "Get auth token" node to obtain an access token from https://account.demandware.com/dw/oauth2/access_token.
Creating API Client Credentials in SFCC:
Go to Account Manager (account.demandware.com)
Navigate to API Client section
Create a new API Client or use an existing one
Note the Client ID and Client Secret
Ensure the client has access to your organization and required roles
SFCC Data API Permissions
For the Data API endpoints used (categories and attribute definitions), configure OCAPI in Business Manager:
Go to Administration → Site Development → Open Commerce API Settings
Select Data API type
Add configuration for your client:
Fredhopper API Credentials
Configure the Crownpeak PD API credentials in n8n with your Fredhopper account details. The credential type is crownpeakPDApi.
Example Configuration
Here is a complete example configuration:
Environment-Specific Configuration
For different environments (development, staging, production), consider:
Using n8n variables: Store environment-specific values in n8n variables
Separate workflows: Clone the workflow for each environment
Conditional logic: Add IF nodes to switch configurations based on environment
Recommended Approach for Multiple Environments
Validation Checklist
Before running the workflow, verify:
Last updated

