Skip to main content
Macro Editor - Basic examples
Updated over 10 months ago

Macro Editor allows you to export different values for different groups of products based on specific rules. Here are some basic examples of how to use the Macro editor.

Attribute merge

You can merge any selected attributes and strings. For example, optimization of URL for better SEO.

Example 1:

Use multiple attributes as input to the macro:

  • 'Vendor' - attribute value 'ADIDAS'

  • 'Size' - attribute value 'L'

  • 'Price final include tax' - attribute value '55'

  • 'Store currency' - attribute value 'EUR'

Define the following operations:

  • 'remove empty elements'

  • 'convert collection into text'

  • join with set to ' - '

As a result, you get the following:

  • ADIDAS - L - 55.00 - EUR

ME-basic_1.png

Example 2:

Use multiple attributes as input to the macro:

  • 'Vendor' - attribute value 'ADIDAS'

  • 'Size' - attribute value 'L'

  • Add text - ' - only - '

  • 'Price final include tax' - attribute value '55'

  • 'Store currency' - attribute value 'EUR'

Define the following operations:

  • 'remove empty elements'

  • 'convert collection into text'

  • join with set to ' - '

  • 'append sufix'

  • 'remove empty elements'

  • 'convert collection into text'

  • join with set to ' - '

As a result, you get the following:

  • ADIDAS - L - only - 55.00 - EUR

ME-basic_2.png

For more details, please check the following:

Increase Price by 20 %

You can increase the price by a specific percentage. There is a predefined macro available.

Required result: Increase the final price by 20 % for all products.

Macro_Editor_Basic_Price_Increase.png

For more details, please check the following:

Increase price by 25

You can increase the price by a specific amount.

Required result: Increase the final price by 25 for all products.

Macro_Editor_Basic_Price_Increase_with_25.png

For more details, please check the following:

Using Rules

You can apply different rules for different groups of products. For example, increase the final price by 20% if the final price is less than 100.

Rule #1: Increase the final price by 20% for products below 100

Rule #2: Export the final price for the rest of the products

Macro_Editor_Basic_Price_Increase_by_20_below_100.png

Using Multiple Rules

You can apply different rules for different groups of products.

Rule #1: Increase the final price by 25 % for products below the final price of 20

Rule #2: Increase the final price by 15 % for products above the final price of 20 and below 40

Rule #3: Export the final price for the rest of the products

Macro_Editor_Basic_Price_Increase_by_20_between_20_40.png

Return the first non-empty value

You can check several attribute values and export the first non-empty value to the profile. Select TAKE MULTILE. List all attributes you'd like to check - e.g. 'Description', 'Category description', and 'Tags'.

Set operation to 'first non-empty item'.

ME-basic_3.png

For more details, please check the following:

Return value after first TRUE condition

You can check several conditions and export a value for the first 'true' condition.

Rule #1: For the product SKU values that contain 'AD', return the final price increased by 20 %

Rule #2: For the product SKU values that contain 'CD', return the final price increased by 10 %

Rule #3: Export the final price for the rest of the products

Macro_Editor_Basic_Price_true_condition.png

Set up capital letters in the title

You can set each letter in the Title value to be a capital letter easily

Macro_Editor_Examples_Capital_letter.png

For more details, please check the following:

Fix EAN code value

The EAN code value should be a 13-digit number. You can add a '0' at the beginning of the EAN code if it is removed during the import.

Macro_Editor_Examples_EAN.png

Convert price and round up

You can convert the price to different currencies and round it up to the whole number.

Macro_Editor_Examples_Convert_Round.png

For more details, please check the following:

Did this answer your question?