Checkout Metadata Integration

Add customer and shopper experience level metadata

Previously, the ESW SFCC plugin only supported product/line-item metadata. This integration adds customer- and shopper-experience–level metadata that can be mapped to the ESW Checkout data layer. Retailers can expose these attributes to tag managers (e.g., Google Tag Manager, Tealium) and configure them directly in SFCC, reducing or eliminating retailer-specific code customizations.

Benefits

  • Reduced integration effort: Metadata can be passed automatically in preorder requests from SFCC.
  • Flexible configuration: Attributes can be defined at multiple levels (customer, cart, experience) using native SFCC structures.
  • Improved control: Business users can manage metadata within SFCC, reducing the need for code changes.

Pre-requisites

  • For customer-level metadata, the shopper must be registered and logged in before being redirected to ESW Checkout.

Checkout Metadata Integration Configuration

Site Preferences

You can manage ESW-specific metadata configurations through Custom Preferences in SFCC Business Manager.

Access Path Merchant Tools → Site Preferences → Custom Preferences → ESW Checkout Configuration

Available Configuration Options

Preference Name Description
ESW Customer Meta DataDefines the key-value pairs to be included as customer-level metadata.
ESW Basket Meta DataDefines the key-value pairs to be included as basket-level metadata.

These preferences allow retailers to easily include additional metadata in the preorder request to ESW, enabling richer tracking and analytics via platforms like GTM or Tealium.

Testing in Sandbox and Staging Environment

ESW recommends validating both basket-level and customer-level metadata attributes in a staging environment before going live.

Customer-Level Metadata

Step 1: Define Custom Attributes in Business Manager

  • Navigate to:
    Business Manager → Customers → Profiles
  • Add the necessary custom attributes to the customer profile.

Step 2: Configure Metadata Mapping

  • Go to:
    Merchant Tools → Site Preferences → Custom Preferences → ESW Checkout Configuration
  • For customer metadata items, add the customer metadata preference under ESW in the checkout configuration group with values in key-value format for the metadata custom attributes in the business manager.
  • Perform similar steps for product line item metadata in the checkout preference group

Step 3: Validate Metadata in the preOrder Payload

{
  "contactDetailType": "IsPayment",
  "contactDetailsNickName": "",
  "firstName": "Test",
  "lastName": "User",
  "gender": "None",
  "address1": "654 Fulham Road",
  "address2": "",
  "city": "London",
  "postalCode": "SW6 5RU",
  "country": "GB",
  "email": "sguk@eshopworld.com",
  "telephone": "+447400123456",
  "metadataItems": [
    {      "name": "eswMarketingOptIn",      "value": "true"    }  ] 
}

Basket-Level Metadata

Step 1: Define Custom Basket Attributes

Create and assign the required custom attributes at the basket level.

Step 2: Configure Metadata Preferences

  • Navigate to Merchant Tools > Site Preferences > Custom Preferences > ESW Checkout Configuration
  • For basket-level metadata items, add the basket metadata preference under the ESW checkout configuration group with values in key-value format for the metadata custom attributes in the business manager.

Step 3: Validate Metadata in the preOrder Payload

"shopperCheckoutExperience": {
  "shopperCultureLanguageIso": "en-IE",
  "emailMarketingOptIn": true,
  "registeredProfileId": "00001501",
  "metadataItems": [    {      "name": "eswBasketTestAttribute",      "value": "esw basket metadata"    }  ]}