Newer Version Available

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

WebStoreTemplate

Represents a configuration for creating B2B Commerce stores using Lightning ExperienceThis type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

Web Store Template components have the suffix .webstoretemplate and are stored in the webstoretemplate folder.

Version

Web Store Template components are available in API version 49.0 and later.

Special Access Rules

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

Fields

Field Name Field Type Description
DefaultCurrency string The template’s default currency setting for new records.
DefaultLanguage string 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 label has a masterLabel paired with its translation.
MaxValuesPerFacet int Maximum number of values that can be added to a facet.
PaginationSize int Amount of data per page.
PricingStrategy PricingStrategy[] The price selected to display to buyers. Possible values include:
  • LowestPrice
  • Priority
SupportedCurrencies string Currencies supported for store template.
SupportedLanguages string Languages supported for store template.
WebStoreType WebStoreType[] The type of store configuration. The only value is B2B.

PricingStrategy

Select the price to show to buyers: either the best price or the prices from the highest priority price book.

Field Name Field Type Description
PricingStrategy string Possible values include:
  • LowestPrice
  • Priority

WebStoreType

B2B Commerce store configuration, using Lightning Experience.
Field Name Field Type Description
WebStoreType string The only value 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   <defaultCurrency>SEK</defaultCurrency>
4   <defaultLanguage>en_US</defaultLanguage>
5   <description>Store that is configured for Swedish customers</description>
6   <masterLabel>Tucker Sverige</masterLabel>
7   <maxValuesPerFacet>10</maxValuesPerFacet>
8   <paginationSize>20</paginationSize>
9   <pricingStrategy>LowestPrice</pricingStrategy>
10   <supportedCurrencies>SEK;USD</supportedCurrencies>
11   <supportedLanguages>en_US</supportedLanguages>
12   <type>B2B</type>
13</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>49.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.