Skip to main content

Rules - Basic examples

Updated yesterday

The editor of attribute Rules 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 Rule editor.

Attribute merge

You can merge any selected attributes and strings. For example, optimization of URL for better SEO & enrich the titles exported.

Example 1:

Use multiple attributes as input to the Rule:

  • 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 Rule:

  • 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 Rule available.


◉ Increase the final price by 20 % for all products.

  1. Default Rule: Export sale price +20%

For more details, please check the following:

Increase price by 25

You can increase the price by a specific amount.

Increase the sale price by 25 for all products.

  1. Default Rule: Export sale price plus 25

For more details, please check the following:

Using Conditional Rules

You can apply different conditions for different groups of products.


◉ Increase the sale price by 20% when the sale price is greater than 100

  1. Default Rule: Export the sale price

  2. Conditional Rule: Export sale price +20% for products priced above 100

Using Multiple Conditions I

You can apply multiple Conditional Rules for different product groups in addition to the Default Rule.

Increase the sale price by 25% when it is below 100, by 15% when it is between 100 and 500, and by 5% when it is above 500.

  1. Default Rule: Export sale price +25% for products priced below 100 (rest)

  2. Conditional Rule #1: Export sale price +15% products priced between 100-500

  3. Conditional Rule #2: Export sale price +5% for products priced above 500.

Using Multiple Conditions II

You can apply multiple Conditional Rules for different product groups in addition to the Default Rule & use a different conditional attribute in each rule.

◉ Increase the sale price by 20% if the SKU contains a specified value and by 10% when only a few units remain in stock.

  1. Default Rule: Export sale price

  2. Conditional Rule #1: Export sale price +20% when SKU contains 'PREMIUM'

  3. Conditional Rule #2: Export sale price +10% when QTY is less than 5

Return the first non-empty value

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

Set operation to first non-empty item as text.

For more details, please check the following:

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

In case your EANs do not have 13 digits, you can use the Fill To Length operation to set the desired number of characters (length) and specify how to fill them, by adding characters at the beginning or at the end.

Convert currency & round up price

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

For more details, please check the following:

Did this answer your question?