WebStoreTemplate

Represents a configuration for creating commerce stores.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

WebStoreTemplate components have the suffix .webstoretemplate and are stored in the webstoretemplate folder.

Version 

Introduced in API version 49.0.

Special Access Rules 

A B2B Commerce or D2C Commerce license and access to Commerce objects is required.

Fields 

autoFacetingEnabled 

  • Type: boolean
  • Required: No
  • Introduced: API version 50.0
  • Description: Indicates whether auto faceting is enabled (true) or not (false). If enabled (True), the most relevant search facets are automatically returned, in addition to the configured search facets, in the product search results. If disabled (False), only the configured search facets are returned. The default is False. See Add Product Search Filters (Facets) for more information.

cartAsyncProcessingEnabled 

  • Type: boolean
  • Required: No
  • Introduced: API version 59.0
  • Description: Indicates whether add-to-cart requests are processed asynchronously (True) or not (False). The default value is True.

cartCalculateEnabled 

  • Type: boolean
  • Required: No
  • Introduced: API version 59.0
  • Description: Indicates whether the cart calculate extension is enabled (True) or not (False). The default value is False.

cartToOrderAutoCustomFieldMapping 

  • Type: boolean
  • Required: No
  • Introduced: API version 57.0
  • Description: Indicates whether custom field mapping for cart and order objects is enabled (True) or not (False). The default value is True.

checkoutTimeToLive 

  • Type: int
  • Required: No
  • Introduced: API version 52.0
  • Description: Amount of time in minutes that a checkout stays active and doesn’t expire.

checkoutValidAfterDate 

  • Type: dateTime
  • Required: No
  • Introduced: API version 52.0
  • Description: A timestamp in the default server timezone (GMT). All checkouts that start before this date are considered expired.

commerceEinsteinActivitiesTracked 

  • Type: boolean
  • Required: No
  • Description: Indicates whether Commerce Einstein activities tracking is enabled (true) or not (false).

commerceEinsteinDeployed 

  • Type: boolean
  • Required: No
  • Description: Indicates whether Commerce Einstein is deployed (true) or not (false).

country 

  • Type: CountryIsoCode (enumeration of type string)
  • Required: No
  • Introduced: API version 56.0
  • Description: Two-digit ISO code of the store’s country. Purchases can be shipped only to the country assigned to the store. Valid for only D2C stores.

defaultCurrency 

  • Type: string
  • Required: No
  • Description: The template’s default currency setting for new records.

defaultLanguage 

  • Type: string
  • Required: Yes
  • Description: Required. The template’s default language setting for new records.

defaultTaxLocaleType 

  • Type: TaxLocaleType (enumeration of type string)
  • Required: Yes
  • Description: Required. The template’s default tax type for your webstore. Possible values include:
  • Possible values:
    • Automatic
    • Gross
    • Net

description 

  • Type: string
  • Required: No
  • Description: The description of the template.

duplicateCartItemsEnabled 

  • Type: boolean
  • Required: No
  • Introduced: API version 59.0
  • Description: Indicates whether a cart can include multiple items with the same product ID (True) or not (False). The default value is False.

guestBrowsingEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates whether guest browsing is enabled for this store. Set the option to True to allow guest buyers access to products in the store.

guestCartEnabled 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 58.0
  • Description: Required. Indicates whether guest cart access is enabled for a store created with an LWR template. Set the option to True to allow guest buyers access to products in the store.

guestCartTimeToLive 

  • Type: int
  • Required: No

guestCheckoutEnabled 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 58.0
  • Description: Required. Indicates whether guest checkout access is enabled for a store created with an LWR template. Set the option to True to allow guest buyers access to products in the store.

masterLabel 

  • Type: string
  • Required: Yes
  • Description: Required. The original (untranslated) name of a label. Each translated label is paired with its original untranslated version.

maxValuesPerFacet 

  • Type: int
  • Required: No
  • Description: Maximum number of values that can be added to a facet.

orderActivationStatus 

  • Type: string (enumeration of type string)
  • Required: No
  • Introduced: API version 55.0
  • Description: Status of the order. Possible values include:
  • Possible values:
    • Activated
    • Draft

orderLifeCycleType 

  • Type: OrderLifeCycleType (enumeration of type string)
  • Required: No
  • Introduced: API version 55.0
  • Description: The order life cycle type. Possible values include:
  • Possible values:
    • MANAGED
    • UNMANAGED

paginationSize 

  • Type: int
  • Required: No
  • Description: Number of results displayed per search results page.

preserveGuestCartEnabled 

  • Type: boolean
  • Required: Yes
  • Introduced: API version 60.0
  • Description: Required. Indicates whether cart contents are preserved when a guest logs in to the store. Set the option to True to preserve guest carts.

pricingStrategy 

  • Type: PricingStrategy (enumeration of type string)
  • Required: Yes
  • Description: Required. The price selected to display to buyers. Possible values include: The default value is LowestPrice.
  • Possible values:
    • LowestPrice
    • Priority

productGrouping 

  • Type: ProductGrouping (enumeration of type string)
  • Required: No
  • Introduced: API version 52.0
  • Description: Determines whether product variations are listed individually in search results or are represented by the parent product, which links to its children. The default value is VariationParent.
  • Possible values:
    • NoGrouping — Variations are listed individually in search results.
    • VariationParent — The parent product is returned in search results with a link to its children.

skipAdditionalEntitlementCheckForSearch 

  • Type: boolean
  • Required: No
  • Introduced: API version 52.0
  • Description: By default, user entitlement checks are run as part of a search index rebuild and again when product search results are returned. Skips the second check to promote faster search performance. Set the option to True to skip additional entitlement checks on a search.

skuDetectionEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates whether SKU detection is enabled (true) or not (false).

splitShipmentEnabled 

  • Type: boolean
  • Required: Yes
  • Description: Required. Indicates whether split shipments are enabled (true) or not (false).

supportedCurrencies 

  • Type: string
  • Required: No
  • Description: Currencies supported for store template.

supportedLanguages 

  • Type: string
  • Required: Yes
  • Description: Required. Languages supported for store template.

supportedShipToCountries 

  • Type: string
  • Required: No
  • Description: Countries that a store created from the template can ship to.

type 

  • Type: WebStoreType (enumeration of type string)
  • Required: Yes
  • Description: Required. The type of store configuration, B2C, B2B, or B2CE. Default is B2B.

Declarative Metadata Sample Definition 

The following is an example of a web store template component.

1<?xml version="1.0" encoding="UTF-8"?>
2<WebStoreTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
3    <autoFacetingEnabled>true</autoFacetingEnabled>
4    <cartAsyncProcessingEnabled>true</cartAsyncProcessingEnabled>
5    <cartCalculateEnabled>false</cartCalculateEnabled>
6    <cartToOrderAutoCustomFieldMapping>true</cartToOrderAutoCustomFieldMapping>
7    <checkoutTimeToLive>10</checkoutTimeToLive>
8    <checkoutValidAfterDate>2020-08-10T09:26:50</checkoutValidAfterDate>
9    <commerceEinsteinActivitiesTracked>false</commerceEinsteinActivitiesTracked>
10    <commerceEinsteinDeployed>false</commerceEinsteinDeployed>
11    <country>US</country>
12    <defaultCurrency>USD</defaultCurrency>
13    <defaultLanguage>ENGLISH</defaultLanguage>
14    <defaultTaxLocaleType>Net</defaultTaxLocaleType>
15    <description>WebStore description</description>
16    <duplicateCartItemsEnabled>false</duplicateCartItemsEnabled>
17    <guestBrowsingEnabled>true</guestBrowsingEnabled>
18    <guestCartEnabled>false</guestCartEnabled>
19    <guestCartTimeToLive>10</guestCartTimeToLive>
20    <guestCheckoutEnabled>false</guestCheckoutEnabled>
21    <masterLabel>WebStore</masterLabel>
22    <maxValuesPerFacet>99</maxValuesPerFacet>
23    <orderActivationStatus>Activated</orderActivationStatus>
24    <orderLifeCycleType>MANAGED</orderLifeCycleType>
25    <paginationSize>9</paginationSize>
26    <preserveGuestCartEnabled>false</preserveGuestCartEnabled>
27    <pricingStrategy>Priority</pricingStrategy>
28    <productGrouping>VariationParent</productGrouping>
29    <skipAdditionalEntitlementCheckForSearch>true</skipAdditionalEntitlementCheckForSearch>
30    <skuDetectionEnabled>false</skuDetectionEnabled>
31    <supportedCurrencies>USD</supportedCurrencies>
32    <supportedLanguages>en_us</supportedLanguages>
33    <supportedShipToCountries>CA;US</supportedShipToCountries>
34    <splitShipmentEnabled>false</splitShipmentEnabled>
35    <type>B2B</type>
36</WebStoreTemplate>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>WebStoreTemplate</name>
6    </types>
7    <version>60.0</version>
8</Package>

Wildcard Support in the Manifest File 

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.