Promotions XML input file

We can use an XML input file to create or change promotions for a store. When we are creating an input file to load promotion data, we can include various XML elements and values in your file. The XML elements that we must include in your input file depend on the properties, description, purchase conditions, rewards, and redemption methods for the promotions that we are loading. Tip: We can create a promotion in the Promotions tool and then export the promotion with the Data Extract utility to quickly get a sample Promotion XML file. We can use as this XML file as the input file for the Data Load utility to import the promotion into other environments, such as multiple test environments. The promotion input XML file must be composed of three sections:

When you create your input file for loading promotion data, we must use the correct name for the child XML elements in the <Base> and <Description> elements. You do not need to set a value for every one of the following elements. When you do not set a value for one of the following elements, the Data Load utility sets the value for the corresponding database column to be NULL.


XML elements within the <Base> section

When you create your input file for loading promotion data, we must use the correct name for the child XML elements in the <Base> section. You do not need to set a value for every one of the following elements. When you do not set a value for one of the following elements, the Data Load utility sets the value for the corresponding database column to be NULL.


XML elements within the <Description> section

When you create your input file for loading promotion data, we must use the correct name for the child XML elements in the <Description> section. You do not need to set a value for every one of the following elements. When you do not set a value for one of the following elements, the Data Load utility sets the value for the corresponding database column to be NULL.


XML elements within the <Elements> section

The naming of child elements for the <Elements> section is different from the <Base> and <Description> sections. Inside the <Elements> element, we must use the correct name for only the <SubType>, <Sequence>, and <Data> child elements. For the <Type> and <Name> elements, which we can include multiple times for a promotion, we must replace the element names with the appropriate identifying name. The following code demonstrates the structure for the child elements in the <Elements> section of the input file.