Mergado 2: The Rules page

MERGADO 2: The Rules page

On the Rules page, you can find a change when working with multi-value elements. The original MERGADO assumed that each element has just one value for writing and reading. In MERGADO 2, this number is 0 to X. MERGADO 2 has thus simplified the reading and writing of multi-value element values.

:woman_technologist: Working with multi-value elements

What is a multi-value element?

:green_book: Definition

An element that has more than one value for a single product and at least 2 of those values share the same wrapper value when it is an immersed element.

A typical example of a multi-value element is an element containing an image URL:

<IMAGES>
<IMAGE>url1</IMAGE>
<IMAGE>url2</IMAGE>
</IMAGES>

where the <IMAGE> element is a multiple element.

We cover multi-value elements in more detail in our Help, where you can find more practical examples.

:new: New rule Add a value to a multi-value element

A new Add a value to a multi-value element rule has been added to the application to create new (multi-value) values for an existing element in the product.

:point_right: How does the Add a value to a multi-value element rule work?

Check out our Help - you can find a tutorial on how to work with the new rule.

:hammer_and_wrench: How to work with multi-value elements

All rules can work with multi-value elements, not just the new one. You can overwrite, replace, count, round, etc. the values of multi-value elements. However, you must always be careful whether you want to :one: edit all values of a multi-value element or :two: a specific value in a specific position.

:computer: How to edit a specific value of a multi-value element at a specific position

You must specify such a value within the path to the value of an element using POSITION.

Example

<IMAGES>
    <IMAGE>url1</IMAGE>
    <IMAGE>url2</IMAGE>
</IMAGES>

I want to modify the value of url2. So in the rules I define the path to the value like this: IMAGES | IMAGE { @@POSITION = 2 }.

:desktop_computer: How to edit all values of a multi-value element

You use the path to the element to indicate a multiple element, but NOT to define the position of the value.

Example

<IMAGES>
    <IMAGE>url1</IMAGE>
    <IMAGE>url2</IMAGE>
</IMAGES>

I want to edit all the values of theIMAGE (url1, url2). So I define the path to the element in the rules as follows: IMAGES | IMAGE.

:question: How do the rules behave when editing all values of a multi-value element

The following situation applies when any rule is applied to all values of a multi-value element (without specifying the position of a particular value):

Rule Behavior
Overwrite writes to all values
Find and replace writes to all values, finds and replaces each one separately
Hide product unchanged
Overwrite by queries in bulk writes to all values
Overwrite by value in bulk if at least one element contains the desired expression, writes to all values
Copy values in bulk takes the value from the first one and writes it to all
Rename categories in bulk unchanged
Shipping rates setting unchanged
Shorten value writes to all values, truncates each one separately
Change font size unchanged
Round number writes to all values, rounds each separately
Remove diacritics writes to all values, removes diacritics individually
Set UTM parameters unchanged
Remove HTML tags writes to all values, removes HTML tags individually
Product parameters setting unchanged
Calculation writes to all values, calculates each value separately
Data file import writes to all values

When using multi-value elements in MERGADO rules, new warnings have been added. They appear after applying the rules in various places:

:warning: You can find the warnings:

  • on the History & Details page
  • on the Dashboard
  • on the Products page
  • mql modifier + UI checkbox
  • stripe in the product tab
  • during rule application
  • on the Products page, you can filter the products that show warnings in the application of the rules

:person_tipping_hand: Displaying warnings in the project history

:keyboard: Displaying warnings on the project dashboard

:computer_mouse: Displaying warnings during rule application

Warnings alone do not necessarily mean an error in the rules/queries settings and that the application has not worked. They are β€œonly” warnings of possible places where either there is a potential for error, and the rule works differently than you think, or it’s a place where optimization results in faster regeneration, easier setup, etc.

If you have questions about setting up MERGADO 2, please contact our support, or follow the forum category.

Thank you for continuing to help us improve MERGADO.