Template types

The “freemarker” script language is used for changes by the mapping type “Template”. Text and computing functions, as well as logical operators and conditions, can be used. The full documentation is in http://freemarker.org/docs. Some commonly used functions are listed in the following table:

Name Value (template key) Description
Product number ${product.productNo} The product number can be displayed. Also available as standard information.
Item number <#if item??>${item.articleNo}</#if> Also available as standard information.
   ${product.articleNo}

Applies for products

For export area “Products and 1st dimension”, this item number is complimented by a space character and the name of the 1st dimension in the datafeed language.

PRODUCTPATH ${PRODUCTPATH}

Display of the description of the sales category including path.

The category filter of the datafeed is taken into account.

PRODUCTPATHIDS ${PRODUCTPATHIDS}

Display of the category ID of the sales category including path.

The category filter of the datafeed is taken into account.

ALLPRODUCTPATH ${ALLPRODUCTPATH}

Display of the descriptions of all sales categories to which the product is assigned in the version
(including path).

If a product is assigned to multiple sales categories, they are
separated by “/”. The category filter of the datafeed is taken into account.

ALLPRODUCTPATHIDS ${ALLPRODUCTPATHIDS}

Display of the category IDs of all sales categories to which the product is assigned in the version
(including path).

If a product is assigned to multiple sales categories, they are
separated by “/”. The category filter of the datafeed is taken into account.

PURCHASEPRODUCTPATH ${PURCHASEPRODUCTPATH }. Display of the description of the purchase category including path.
For this, PURCHASEPRODUCTPATH must be entered in the Datafeed tab
as a template key.
PURCHASEPRODUCTPATHIDS {PURCHASEPRODUCTPATHIDS} Display of the category ID of the purchase category including path.
KOMBINATIONSARTIKEL ${KOMBINATIONSARTIKEL} The product numbers of product relations belonging to the product (or item) are listed,
separated by commas. (configurable with system parameter
datafeed.export.related.products.delimiter)
Boolean values

Example

<#if NEWARTICLE??>J<#else>N</#if>

For attributes of type “Boolean value” (such as NEWARTICLE), what is shown in the .csv file can be
specified: e.g. Yes/No, True/False, 0/1 or Y/N.

Here the identification code of the attribute must be entered as a template key in the Datafeed
tab.

If the attribute can be passed down and is only updated on item level, this template also always returns this way a value for the product.

This is of interest for datafeeds with export area “Products and 1st dimension”.

If the attribute can be passed down and has only been updated on item level, this template.

INFO
Depending on the version that was selected when creating a datafeed you can either use the templates *PRODUCTPATH* or PURCHASEPRODUCTPATH*. If a sales version was selected, you can export sales categories as well as purchase categories. If a purchase version was selected, only purchase categories will be exported. When carrying out a datafeed export via a worklist, the version selected in the datafeed is taken into account.