registerWidgetdef input file

Use a registerWidgetdef input file to register a new widget or container for use in the Commerce Composer tool. This input file supports registration at either the site level or the store level.

After you use this input file to register the widget or container, you must use the subscribeWidgetdef input file to subscribe one or more stores to the widget or container.

You can extract widget registration data with the Data Extract utility to create a registerWidgetdef.csv file that you can load with the Data Load utility. For example, if you want to copy or move widgets between stores or instances, such as for creating one or more test environments.

The sample configuration files that are provided for you to use with the Data Extract utility, extract widget registration data from the following database tables:For more information about extracting Commerce Composer data, see:

Definitions

UniqueID
(Integer) The internal reference number for the widget or container definition, for example, 10001. The UniqueID is automatically generated when you register the widget. 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 a widget.
Maps to:
  • PLWIDGETDEF.PLWIDGETDEF_ID
  • PLWIDGETDEFDESC.PLWIDGETDEF_ID
WidgetDefIdentifier
(String) The external reference name for the widget or container definition, for example, ContentRecommendation. You can use any name, but the name must be unique for the store. In Insert or Replace mode, this field cannot be null and the name must be unique. In Delete mode, either this field or the UniqueID field (see previous column) is required.

Maps to: PLWIDGETDEF.IDENTIFIER

WidgetStoreIdentifier
(String) The unique reference name of the store in which you want to register the widget or container, for example, Aurora.
Important: If you are registering a site-level widget, set the WidgetStoreUniqueID column to 0 (see next column) and leave this column empty.
Note: The sample CSV file does not include this column; the sample demonstrates the use of the WidgetStoreUniqueID to identify the store in which to register the widget.

Maps to: STOREENT.IDENTIFIER

WidgetStoreUniqueID
(Integer) The unique reference number of the store in which you want to register the widget or container. Valid values are:
storeId
Register this widget or container in a specific store. As a result, the widget or container cannot be shared with other stores. The storeId value is defined in the STORE_ID column of the STORE table. An example storeId value is 12345.
0
Register this widget or container at the site level. As a result, the widget or container can be shared across stores in the site.

If you do not specify a value, the widget is registered at the store level to the store that is specified in your environment configuration file (wc-dataload-env.xml).

Maps to: PLWIDGETDEF.STOREENT_ID

WidgetUIObjectName
(String) A name that identifies the Management Center definition of this widget, for example, ContentRecommendationWidget. When you create the definition file that defines the widget for Management Center, you must specify this name for the ui_object_name attribute in the XML code.

Maps to: PLWIDGETDEF.UI_OBJECT_NAME

WidgetType
(Integer) The type of widget. Valid values are:
  • 1 (for a widget)
  • 2 (for a container)

Maps to: PLWIDGETDEF.WIDGETTYPE

WidgetVendor
(String) The name of the company or vendor that created the widget, for example, IBM.

Maps to: PLWIDGETDEF.VENDOR

WidgetPath
(String) The relative path to the entry point (top-level) JSP for the widget or container.
  • For site-level widgets or containers:
    • The path must be relative to the WCDE_installdir/workspace/Stores/WebContent directory.
    • Start the path with a slash.

    Example:/Widgets/com.ibm.commerce.store.widgets.ContentRecommendation/ContentRecommendation.jsp

  • For store-level widgets or containers:
    • The path must be relative to the WCDE_installdir/workspace/Stores/WebContent/storedir/ directory.
    • Start the path without a slash.

    Example:Widgets/com.ibm.commerce.store.widgets.ContentRecommendation/ContentRecommendation.jsp

Maps to: PLWIDGETDEF.JSPPATH

WidgetState
(Integer) A flag to indicate the state of the registration: Valid values are:
1
Active; this widget is used by one or more stores.
0
Deprecated; this widget is not used by any stores.

Maps to: PLWIDGETDEF.STATE

WidgetDefinitionxml
(CLOB) The XML definition for the widget or container. Copy the full XML code into this column.

Maps to: PLWIDGETDEF.DEFINITIONXML

LanguageId
(Integer) The language ID for the language-specific fields in this input file. If omitted, defaults to the language that is specified in the business context of the environment configuration file. Examples of valid values:
-1
English
-2
French

You can look up language ID values in the LANGUAGE table.

Maps to: PLWIDGETDEFDESC.LANGUAGE_ID

WidgetDisplayName
The language-specific display name for the widget, for example, Content Recommendation Widget. This name is displayed in the Commerce Composer tool in Management Center to help business users identify the widget. Use the UTF-8 character set.

Maps to: PLWIDGETDEFDESC.DISPLAYNAME

WidgetDescription
The language-specific description for the widget, for example, Displays content, such as images, text, static HTML, and videos. Supports web activities.. This description is displayed in the Commerce Composer tool in Management Center to help business users identify the widget. Use the UTF-8 character set.

Maps to: PLWIDGETDEFDESC.DESCRIPTION

Delete
(String) A flag that indicates whether to delete the widget or container definition. Specify 1 to delete the row.