Using replacement tags (for mapping)

Some channels have the possibility to change the data that will be exported using mapping rules and values. To change these values, go to the channel dashboard and click on the Mappings tab. You can set both 'Offer' and 'Content' mappings here, but both support the usage of 'mapping rules' and 'replacement tags'.

Select a category to open it and see the available attributes that can be mapped. 'All products' will always contain the shared attributes such as 'description' or 'name', so this is usually where you want manipulate fields. Once a category is opened you will see an overview of the mappable fields. Most fields will already have a default value. The values can be changed for all products by changing them directly, or changed based on smart rules by selecting the dropdown menu on the top of each column. Select 'Advanced Rule' to set smart rules. 

Smart Rules

You can easily add your own smart rules by using the + Condition and + Rule buttons. Rules can be based on built-in ChannelEngine fields and your own custom fields. The value displayed on the bottom of the page is the same default value that can be set in the mappings overview.

Replacement Tags

It’s possible to combine multiple fields and static text together in one value when defining the mapping (either using the smart rules or using the default value). This can be done by using replacement tags. Replacement tags have the format {CE:FieldName} or {MY:FieldName} Where FieldName is the name of the field you would like to use. To use the built-in description field, for example, you can use the replacement tag {CE:Description}.To use a field that has been mapped to a custom field during the ChannelEngine product import, use {MY:my_custom_field}.

ChannelEngine standard fields (which are called on by CE:) have a distinct name, for which you can find the names listed below. Your own custom field will always have the name it's imported with.

Replacement tag Name of field in ChannelEngine
{CE:Name} Name / Title
{CE:Description} Description
{CE:Details} Details
{CE:MerchantProductNo} Merchant product no
{CE:VendorProductNo} Vendor product no
{CE:Ean} EAN
{CE:Brand} Brand
{CE:Stock} Stock
{CE:Size} Size
{CE:GroupNo} Parent sku
{CE:Color} Color
{CE:Price} Price
{CE:ListPrice} Catalog price
{CE:PurchasePrice} Purchase price
{CE:VatRate} VAT %
{CE:ShippingCost} Shipping cost
{CE:ShippingTime} Shipping time (days)
{CE:Url} Product Url
{CE:ImageUrl} Image Link
{CE:ExtraImageUrl1},{CE:ExtraImageUrl2}, {CE:ExtraImageUrl3}, etc   Extra Image Link 1, Extra Image Link 2, Extra Image Link 3, etc

Advanced Replacement Tags

Besides replacing the value of a field using replacement tags, it’s also possible to apply advanced actions on the replacement tag’s content. The following actions are currently supported:

Action Example Value Result
Replace text {CE:Description|Replace{Shoes|Sneakers}} Red Shoes Red Sneakers
To uppercase {CE:Description|ToUpper} Red Shoes RED SHOES
To lowercase {CE:Description|ToLower} Red Shoes red shoes
Trim spaces {CE:Description|Trim}  Red Shoes Red Shoes
Extract text {CE:Description|Extract{^(\w+)|$1}} Red Shoes Red

It’s also possible to chain multiple actions together. The output of the previous action will then be used as the input for the next action, for example:

  1. Replacement tag {CE:Description|Replace{shoes|sneakers}|ToUpper}
  2. Take ChannelEngine description → New red shoes
  3. Replace shoes with sneakers → New red sneakers
  4. Convert to uppercase → NEW RED SNEAKERS

WARNING! Extracting and manipulating text requires knowledge of regular expressions. Every capture group will be represented by a dollar sign and the number of the group. This allows you to place the extracted values in an adjusted order. For creating and testing correct regular expression we advice