Newer Version Available

This content describes an older version of this product. View Latest

WebStoreTemplate

Represents a configuration for creating commerce stores. This type extends the Metadata metadata type and inherits its fullName field.

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

File Suffix and Directory Location

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

Version

WebStoreTemplate components are available in API version 49.0 and later.

Special Access Rules

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

Fields

Field Name Field Type Description
checkoutTimeToLive int Amount of time in minutes that a checkout stays active and doesn’t expire. This field is available in API version 52.0 and later.
checkoutValidAfterDate dateTime A timestamp in the default server timezone (GMT). All checkouts that start before this date are considered expired. This field is available in API version 52.0 and later.
country string Two-digit ISO code of the store's country. Purchases can be shipped only to the country assigned to the store. Valid for only B2C stores. This field is available in API version 56.0 and later.
defaultCurrency string The template’s default currency setting for new records.
defaultLanguage string Required. The template’s default language setting for new records.
description string The description of the template.
masterLabel string Required. The original (untranslated) name of a label. Each translated label is paired with its original untranslated version.
maxValuesPerFacet int Maximum number of values that can be added to a facet.
paginationSize int Number of results displayed per search results page.
pricingStrategy PricingStrategy​(enumeration of type string) Required. The price selected to display to buyers. Possible values include:
  • LowestPrice
  • Priority
The default value is LowestPrice.
productGrouping ProductGrouping​(enumeration of type string) Determines whether product variations are listed individually in search results or are represented by the parent product, which links to its children. Possible values are:
  • NoGrouping—Variations are listed individually in search results.
  • VariationParent—The parent product is returned in search results with a link to its children.
The default value is VariationParent. This field is available in API version 52.0 and later.
supportedCurrencies string Currencies supported for store template.
supportedLanguages string Required. Languages supported for store template.
type WebStoreType​(enumeration of type string) 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   <checkoutTimeToLive>60</checkoutTimeToLive>
4   <country>US</country>
5   <defaultCurrency>SEK</defaultCurrency>
6   <defaultLanguage>en_US</defaultLanguage>
7   <description>Store that is configured for Swedish customers</description>
8   <guestCartTimeToLive>60</guestCartTimeToLive>
9   <masterLabel>Tucker Sverige</masterLabel>
10   <maxValuesPerFacet>10</maxValuesPerFacet>
11   <paginationSize>20</paginationSize>
12   <pricingStrategy>LowestPrice</pricingStrategy>
13   <productGrouping>NoGrouping</productGrouping>
14   <supportedCurrencies>SEK;USD</supportedCurrencies>
15   <supportedLanguages>en_US</supportedLanguages>
16   <type>B2C</type>
17</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>56.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.