ChannelEngine: replacement tags and advanced rules
About this article
This article describes the use of replacement tags to map product content and offers.
Table of contents
Introduction
Certain marketplaces allow you to change the data exported using mapping rules and values. To change these values, go to the marketplace's Mappings page on ChannelEngine. You can set Offer and Content attributes, and both support the usage of mapping rules and replacement tags.
Select a category to see the attributes that can be mapped. Most attributes may already have a default value. These values can be changed for all products, either by editing them directly or by using smart rules, which can be done using the dropdown menu at the top of each column. Select Advanced rule to set smart rules.
Advanced rules
You can add your own advanced rules with the And and Or buttons. Rules can be based on built-in ChannelEngine attributes or your own custom attributes. The value displayed at the bottom of the page is the same default value that can be set in the mappings overview.
Wildcard search
The wildcard search feature in the attribute mapping allows you to quickly find the attribute you are looking for. This feature works for both custom attributes and default ChannelEngine attributes.
To use the wildcard search feature, go to a page with a dropdown related to attributes, such as the Mappings or Advanced rules pages. Click a dropdown menu and enter the wildcard character (%), preceded and/or followed by the characters from the attribute you seek. The (%) character replaces zero or more characters of any kind. E.g.: to search for all attributes that have the letters 'e' and 't', such as Height and Length, enter 'e%t' in the search bar.
Replacement tags
It is possible to combine multiple attributes and static text in one value when defining the mapping, either using advanced rules or the default value. This can be done with replacement tags.
Replacement tags have the format {CE:AttributeName} or {MY:AttributeName}, where CE and MY define the kind of attribute (default and custom, respectively), while AttributeName is the name of the attribute you want to use.
ChannelEngine's standard attributes, which are called on by ChannelEngine, have distinct names. You can find the names listed below. Your own custom attributes keep the names they are imported with.
Replacement tag | Name of the attribute on ChannelEngine |
{CE:Name} | Name/Title |
{CE:Description} | Description |
{CE:Details} | Details |
{CE:MerchantProductNo} | Merchant product number |
{CE:VendorProductNo} | Vendor product number |
{CE:Ean} | GTIN (e.g.: EAN, UPC, etc.) |
{CE:Brand} | Brand |
{CE:Stock} | Stock |
{CE:Size} | Size |
{CE:GroupNo} | Parent SKU |
{CE:GroupNo2} | Grandparent SKU |
{CE:Color} | Color |
{CE:CategoryTrail} | Category |
{CE:Price} | Price |
{CE:ListPrice} | Catalog price |
{CE:PurchasePrice} | Purchase price |
{CE:MinPrice} | Minimum price |
{CE:MaxPrice} | Maximum price |
{CE:VatRate} | VAT % |
{CE:DiscountRate} | Discount |
{CE:Margin} | Margin % |
{CE:ShippingCost} | Shipping cost |
{CE:ShippingTime} | Shipping time (days) |
{CE:Url} | Product URL |
{CE:ImageUrl} | Image URL |
{CE:ExtraImageUrl1},{CE:ExtraImageUrl2}, {CE:ExtraImageUrl3}, etc. | Extra image URL 1, Extra image URL 2, Extra image URL 3, etc. |
Special characters
If the name of your custom attribute contains special characters, such as { } or |, make sure to properly escape them using double quotation marks (""). To do so, place the entire name of your custom attribute inside double quotation marks. E.g.: "Description|Amazon|Full" or "Weight{kg}".
Unless special characters are properly escaped, ChannelEngine interprets them incorrectly – which can result in errors.
Using translated attributes
If you use ChannelEngine's translation feature to translate attributes like Description, make sure to use the correct structure: MY:NameOfOriginalField|Origin:2-LetterLanguageCode.
The Origin is where the attribute comes from. Description, for example, is a default ChannelEngine field, so the appropriate input is |CE:. However, translated attributes are considered custom attributes – so |MY: is the correct input. Note that the translation feature changes the NameOfOriginalField to all capitals, if it is a ChannelEngine field.
E.g.:
- {MY:COLOR|CE:FR} - takes the French-translated value of the Color attribute.
- {MY:DESCRIPTION|CE:DE|Ellipsize{2000}} - takes the German-translated value of the Description attribute, uses it, and limits its number of characters to 2,000.
- {MY:Gender|MY:NL|ToUpper} - takes the Dutch-translated value of the Gender attribute and changes it to uppercase.
Advanced replacement tags
Besides replacing the value of an attribute using replacement tags, it is possible to apply advanced actions to the content of the replacement tag. The following actions are 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 uppercase* | {MY:"Description|for|Amazon"|ToUpper} | Red Shoes | RED SHOES |
To lowercase | {CE:Description|ToLower} | Red Shoes | red shoes |
To title case | {CE:Description|ToTitle} | reD sHoes | Red Shoes |
To EAN13 | {CE:Ean|ToEan13} | 050743174049 | 0050743174049 |
Trim spaces | {CE:Description|Trim} | Red Shoes | Red Shoes |
Extract text | {CE:Description|Extract{^(w+)|$1||}} | Red Shoes | Red |
Remove text | {CE:Description|Remove{Red}} | Red Shoes | Shoes |
Take left section of text | {CE:Description|Left{5}} | Red Shoes | Red S |
Take right section of text | {CE:Description|Right{5}} | Red Shoes | Shoes |
Ellipsize text | {CE:Description|Ellipsize{6}} | Red Shoes | Red S… |
Wordwrap text | {CE:Description|Wordwrap{6}} | Red Shoes | Red |
Round number | {CE:DiscountRate|Round{1}} | 22.48 | 22.5 |
Round number to ceiling (up) | {CE:DiscountRate|RoundCeiling} | 8.46 | 9 |
Round number to floor (down) | {CE:DiscountRate|RoundFloor} | 2.96 | 2 |
Multiply number | {MY:Weight|Multiply{1000}} | 0.125 | 125 |
Divide number | {MY:Weight|Divide{1000}} | 12740 | 12.74 |
Divide number* | {MY:"Weight|in|kg"|Divide{1000}} | 1875 | 18.75 |
It is also possible to chain multiple actions together. The output of the previous action is then used as the input for the next action.
E.g.:
- Replacement tag {CE:Description|Replace{shoes|sneakers}|ToUpper}
- Take ChannelEngine Description ? ' New red shoes
- Replace shoes with sneakers ? ' New red sneakers
- Convert to uppercase ? ' NEW RED SNEAKERS
A detailed explanation of the main actions available can be seen below:
- ToTitle - transforms the inputted text to title case. Unlike ToLower and ToUpper, it only capitalizes the first letter of each word – which is useful for titles. If you input 'red shoes', it converts it to 'Red Shoes'. Note that any word in all capitals is considered an acronym, therefore it is not converted. If the description value is 'RED SHOES', {CE:Description|ToTitle} still outputs RED SHOES. In these cases, consider chaining it with ToLower first using ({CE:Description|ToLower|ToTitle}).
- ToEan13 - converts any valid EAN input to the EAN13 format. 12-digit EANs receive a 0 as a prefix, 14-digit EANs that start with a 0 have it removed. If you submit an invalid EAN, the output is empty, so only use this replacement tag on a valid EAN input. Note that you could use this to significantly change the EAN of a product, which may have consequences if you have offers online.
-
Extract - extracts the text section that complies with the regular expression used. {CE:Description|Extract{^(w+)|$1}}, for example, extracts the first word of the Description field.
NB: extracting and altering text requires knowledge of regular expressions. Every capture group is represented by a dollar sign ($) and the number of the group. This allows you to place the extracted values in an adjusted order. To create and test regular expressions, check out RegExr.
- Remove - removes all the occurrences of the specified parameters. It can be used to remove specific, disallowed words from descriptions for marketplaces. However, as this may result in incorrect or odd sentences, it is preferred to alter texts in the source system.
- Left - breaks the text at a set number of characters, submitted between brackets – starting from the left-hand side of the input. While the use of this option is not advised, it can be used to create short descriptions with a maximum number of characters you might not have as a separate attribute.
- Right - breaks the text at a set number of characters, submitted between brackets, starting from the right-hand side of the input. While the use of this option is not advised, it can be used to create short descriptions with a maximum number of characters you might not have as a separate attribute.
- Ellipsize - breaks the text at a set number of characters, submitted between brackets, and adds an ellipsis (...) at its end to make clear that the text has been cut off. While the use of this option is not advised, it can be used to create short descriptions with a maximum number of characters you might not have as a separate attribute.
- Wordwrap - breaks the text at a set number of characters, submitted between the brackets, and breaks the text at the last white space (thus word) – before reaching the maximum number of characters. It can be used to shorten long titles or short descriptions, for which most marketplaces have fixed character limits.
- Round - rounds any numeric value with the number of decimals you provide between brackets, with a maximum of 2 decimal points. E.g.: if you input 4, the output is still 2 decimals points. Note that if the value is ambiguous (e.g.: .5), it is rounded up. So {CE:DiscountRate|Round{0}} with a DiscountRate of 22.50 results in 23 as the output.
- RoundCeiling - rounds up any numeric value to the nearest integer that is equal or higher than the input. E.g.: if you have 2.11 as the input and apply RoundCeiling to it, the output is 3.
- RoundFloor - rounds down any numeric value to the nearest integer that is equal or lower than the input. E.g.: if you have 2.99 as the input and apply RoundFloor to it, the output is 2.
- Multiply - multiplies a numeric value with a numeric input (whole numbers only!), submitted between brackets. E.g.: if you have 1.125 as the input and apply Multiply{1000} to it, the output is 1,125. The maximum input value allowed is 1,000,000, and any out-of-bounds or non-numeric value results in the input returning unchanged.
- Divide - divides a numeric value with a numeric input (whole numbers only!), submitted between the brackets. E.g.: if you have 12,500 as the input and apply Divide{2000} to it, the output is 6.25. The maximum input value allowed is 1,000,000, and any out-of-bounds or non-numeric value results in the input returning unchanged.
Advanced date/time rules
With advanced date/time rules, you can replace values according to specific calendar dates or times. This feature automates offer and content adjustments on a schedule that suits you - without having to configure an ERP.
You can currently only configure date/time rules for the following marketplaces and attributes:
Channel | Marketplace field(s) |
Amazon.de Amazon.com Amazon.nl |
|
bol. |
|
Via this feature, you can do the following:
- Apply rules on a recurring basis, during fixed time periods, and on chosen days of the week (e.g.: Saturdays).
- Implement rules for unique occasions. E.g.: specific date ranges or individual days.
- Adapt rules for special events. E.g.: public holidays.
- Set dynamic start and end dates, defining custom dates and times. If no time is selected, the default value is 00:00. E.g.: 15:20.
- Establish multiple periods within a single rule, each with its replacement values based on the sequential rule order.
Below you can find some examples of how to make the most of advanced rules.
Set up shipping times
This rule replaces the default shipping time with a specific value. This adjustment comes into effect during weekends – when longer pick-and-pack deadlines, Monday shipping, or weight-based shipping methods are factors. You can use multiple timeframes within a single rule to provide using the 'OR' condition.
Attribute |
Condition |
||
If |
Then use |
Else | |
Shipping time |
If start date = Friday & start time = 16:00 & End date = Sunday & end time = 23:59 |
“2-4 Days” |
Default attribute: “1-2 Days” |
OR |
If start date = Friday & start time = 16:00 & End date = Sunday & end time = 23:59 |
Then use “3-4” |
Default attribute: {MY:ShippingTime|Remove{Days}} |
Comments
0 comments
Please sign in to leave a comment.