subscribeWidgetdef input file
After you register a widget or container, use a subscribeWidgetdef input file to subscribe one or more stores to the widget or container. A store must subscribe to specific widgets and containers so that these objects can be used in the Commerce Composer tool for that store. For samples that demonstrate how to use this input file in different load scenarios, see:
- Sample: Loading Commerce Composer widgets
- Sample: Loading Commerce Composer layout templates
- Sample: Loading Commerce Composer layouts
We can extract widget subscription data with the Data Extract utility to create a subscribewidgetdef.csv file that we can load with the Data Load utility. For example, to copy or move widgets between stores or instances, such as for creating one or more test environments. The sample configuration files provided for you to use with the Data Extract utility, extract widget subscription data from the following database tables:
For more information about extracting Commerce Composer data, see:
- Extracting Commerce Composer data with the Data Extract utility
- Sample: Extracting Commerce Composer widgets
- Sample: Extracting Commerce Composer layouts
- Sample: Extracting Commerce Composer layout templates
- Sample: Extracting Commerce Composer pages
Definitions
- UniqueID
- (Integer) The internal reference number to identify the relationship between this widget or container and the store, for example, 30001. The UniqueID is automatically generated when you subscribe a widget to a store. In Delete mode, either this field or the WidgetDefIdentifier field (see next column) is required.
Note: The sample CSV file does not include this column; the sample demonstrates the use of the WidgetDefIdentifier to uniquely identify the widget or container. Maps to:
- PLSTOREWIDGET.PLSTOREWIDGET_ID
- WidgetDefIdentifier
- (String) The external reference name for the widget or container definition, for example, ContentRecommendation. This name is defined in the registerWidgetdef input file. In Delete mode, either this field or the UniqueID field (see previous column) is required.
Maps to: PLWIDGETDEF.IDENTIFIER
- WidgetDefinitionxml
- (CLOB) The XML definition for the widget.Important: Use this column only to override the site-level XML definition of the widget for this store. The site-level XML definition is defined in the registerWidgetdef input file. Leave this column empty if you do not want to override the site-level XML definition.
Maps to: PLSTOREWIDGET.DEFINITIONXML
- WidgetState
- (Integer) The state of the subscription. Valid values are:
- 0 (inactive)
- 1 (active)
Maps to: PLSTOREWIDGET.STATE
- Delete
- (String) A flag that indicates whether to delete the widget or container subscription. Specify 1 to delete the row.
Related concepts
Widgets for Commerce Composer
Commerce Composer widget library
Related tasks
Creating Commerce Composer widgets
Extracting Commerce Composer data with the Data Extract utility
Related reference
Commerce Composer samples
Sample: Extracting Commerce Composer widgets
Sample: Extracting Commerce Composer layout templates
Sample: Extracting Commerce Composer layouts
Sample: Extracting Commerce Composer pages
Sample: Extracting Commerce Composer data
Commerce Composer object input file definitions