Configuring the SmartLabel Template

Selecting the SmartLabel format in Export Manager or on an OIEP displays the default template, which includes required and voluntary attributes for both food and non-food products. This template is intended to be modified to include only the attributes you require and any additional comments to best meet your needs.

Additional comments can be added to your modified template as needed. The following text identifies comments:

<!-- shows where a comment begins
--> indicates the end of comment

The modified template is saved with the export configuration or in an OIEP output template. For information about saving a configuration for Export Manager, refer to Running a Data Export here. For information about an OIEP output template, refer to OIEP - Event-Based - Output Templates Section here or OIEP - Select Objects - Output Templates Section here.

Note: To restore the default template once it has been modified, create a new export using Export Manager or a new output template using OIEP, and select the SmartLabel format.

SmartLabel Attributes

SmartLabel landing pages split the product attribution into the following sections: header, footer, attribute tabs, and sub-sections within attribute tabs. The export template uses these same groupings.

To make analysis and mapping easier, all attributes have been grouped into six possible categories. These indicate whether an attribute is required or voluntary for food and non-food products. Attribute groupings are identified within the XML by the following six elements:

  • RequiredAttributes - Defined by SmartLabel as 'Required' for both Food and Non-Food products
  • FoodRequiredAttributes - Defined by SmartLabel as 'Required' for only Food products
  • NonFoodRequiredAttributes - Defined by SmartLabel as 'Required' for only Non-Food products
  • VoluntaryAttributes - Defined by SmartLabel as 'Voluntary' for both Food and Non-Food products
  • FoodVoluntaryAttributes - Defined by SmartLabel as 'Voluntary' for Food products
  • NonFoodVoluntaryAttributes - Defined by SmartLabel as 'Voluntary' for Non-Food products

The default template values are meant to assist during the mapping process in STEP and the client SmartLabel solution. These values should be changed based on business requirements. It is not required that the values used exist as attribute names or IDs within STEP.

Required Attributes

For all required attributes, the default template includes the following predefined details:

  1. SmartLabel Attribute Number - Defined in FOOD_ATTRIBUTES-Smartlabel_V_1-5 and NON-FOOD_ATTRIBUTES-Smartlabel_V_1-5.
  2. Attribute id - Value that will be included in the export.
  3. Attribute description - Value will be displayed during mapping process.

For example, the following image shows the required attribute 3.1 is included in the default template as a comment, along with the appropriate attribute ID and attribute description. The numbers correspond to the list above.

Voluntary Attributes

Although voluntary attributes have not been defined in the default template, a placeholder is included as well as the SmartLabel attribute numbers.

For example, a placeholder for voluntary attribute number 1.7 is included as a comment in the default template, but the ID and description are not provided.

Modifying the SmartLabel Template

Modification to the template should be expected so that it will fit each unique data model. Attributes may need to be added, removed, or renamed. In addition, template changes may be required for attributes that have multiple values or exist on a referenced object.

Note: To quickly find the examples shown in this topic, it is helpful to display the unmodified default template in STEP, use Ctrl+A to select all text, and then paste it into an XML editor tool that includes a search feature.

MultiValues

The default template has been predefined with MultiTarget values based on GS1 attribute standards.

If an attribute has multiple values that will get sent to SmartLabel, MultiTarget must be used:

<Attribute id="ingredientPurpose"><?MultiTarget Ingredient Purpose?></Attribute>

If an attribute has a single value, Target would be used instead:

<Attribute id="ingredientPurpose"><?Target Ingredient Purpose?></Attribute>

Attributes on Repeating Referenced Objects

If attributes are to be captured from repeating referenced objects, a MultiTarget to the reference must be included in the template.

For example, the template includes this syntax on the ingredients sections, which can be found for other attribution as well.

In this example, if ingredient information was not stored on a referenced object then the <?MultiTarget Ingredient Reference?> section (indicated by the arrow above) would be removed and additional attribution added within the <Ingredients> tag as necessary.

Attributes on Nested Repeating Referenced Objects

If attributes are to be captured from nested repeating referenced objects, a MultiTarget to each reference must be added to the template.

An example of this is included in the template and can be used for other attribution.

In this example, data is stored on a repeating ‘Nutrient Info’ reference and additional data nested below this on a repeating ‘Nutrient Detail’ reference. To use this example section, the closing comment tag around the nutrient section (indicated by the arrow on the last row) should be moved to the end of first line of the section.

Additionally, the comment tags surrounding the SmartLabel attribute numbers are incomplete (two dashes are required) and must be modified as required.

More nested levels can be added following the same formatting.

Empty Tags

The default template includes <?RemoveIfEmpty recursive?> defined above all attribute groups. This will ensure no tags for empty attributes or attribute groups are included in the export. If empty tags are required, then this should be placed within specific attribute groups or removed all together from the template.