Rule: Bulk Copy Values#

This rule allows you to copy values from one element to another within Mergado Editor. Values are transferred from the source element to the target element. The rule can be used to copy multiple elements at once within a single rule.

Extra features#

  • Bulk copy values, for example from Google Sheets
  • Bulk structure copy
  • Left side prefill
  • Option to add multiple rows
    • Row order matters – they are applied from top to bottom

Practical examples#

Example 1: Swapping values between two elements#

This example shows how to use bulk copy values to swap values between two elements (e.g., between image and image_alternative).

1. Creating a helper element:

  • On the Elements page, click the “New element” button in the top right corner.
  • Create a helper element, for example “helper_element”.
  • Hide this element using the toggle at the end of the row.

2. Creating a new rule:

  • Open the “Rules” page.
  • Click the New rule button.

3. Selecting the rule type:

  • In the Rule type field, select the Bulk Copy Values option.

4. Selecting products:

  • In the Query field, choose either All products or create your own Product query for specific products you want the rule to apply to.

5. Choosing the source element:

  • In the left column Source element, select the element you want to copy values from.
  • You can search for the element by typing part of its name in the Source element field. For example: image or image_alternative.

6. Choosing the target element:

  • In the right column Target element, select the element you want to paste values into.

7. Adding another row:

  • If you need to copy multiple elements at once, you can add more rows.
  • Row order matters – the rule is applied from top to bottom.

8. Naming the rule:

  • In the last step, enter the rule name, for example “Swap values between two elements”.

Example 2: Copy multiple elements to different target elements#

This example shows how to use bulk copy values to copy multiple elements (e.g., title, description, price) to different target elements (e.g., g:title, g:description, g:price).

1. Creating a new rule:

  • Open the “Rules” page.
  • Click the New rule button.

2. Selecting the rule type:

  • In the Rule type field, select the Bulk Copy Values option.

3. Selecting products:

  • In the Query field, choose either All products or create your own Product query for specific products you want the rule to apply to.

4. Choosing the source element:

  • In the Source element field, select the element you want to copy values from.
  • For example: title, description, price.

5. Choosing the target element:

  • In the Target element field, select the element you want to copy values to.
  • For example: g:title, g:description, g:price.

6. Adding another row:

  • If you need to copy multiple elements at once, add more rows for each source-target element pair.
  • Row order matters, as they are applied from top to bottom.

7. Naming the rule:

  • In the last step, enter the rule name, for example “Copy elements”.

Example 3: Copy selected parameters to other elements#

This example shows how to use bulk copy values to transfer parameters from one element to another.

1. Creating a new rule:

  • Open the “Rules” page.
  • Click the New rule button.

2. Selecting the rule type:

  • In the Rule type field, select the Bulk Copy Values option.

3. Selecting products:

  • In the Query field, choose either All products or create your own Product query for specific products you want the rule to apply to.

4. Choosing the source element:

  • In the Source element field, select the parameter whose values you want to copy.

5. Choosing the target element:

  • In the Target element field, select the element (or enter the element path) you want to copy the parameter values to.

6. Adding another row:

  • If you need to copy multiple parameters at once, you can add more rows to set up bulk copying of multiple parameters within a single rule.
  • Row order matters - they are applied from top to bottom.

7. Naming the rule:

  • In the last step, enter the rule name, for example “Copy parameters”.

Example 4: Copy all parameters to other elements while preserving the name-value structure#

This example shows how to copy all parameters to target elements while preserving the structure, i.e., the parameter name-value pairs.

1. Creating a new rule:

  • Open the “Rules” page.
  • Click the New rule button.

2. Selecting the rule type:

  • In the Rule type field, select the Bulk Copy Values option.

3. Selecting products:

  • In the Query field, choose either All products or create your own Product query for specific products you want the rule to apply to.

4. Using the special structure copy behavior:

  • To copy all parameters to different elements, we use a special behavior called “bulk structure copy”. You do not need to list all parameter names individually – just fill in three rows:
    • Row 1: Name of the wrapper (parent) element for parameters.
    • Row 2: Name of the element containing parameter names.
    • Row 3: Name of the element containing parameter values.

5. Choosing the source element on the first row:

  • In the Source element field, select the wrapper (parent) element of the parameters you want to copy, e.g., PARAM

6. Choosing the target element on the first row:

  • In the Target element field, select the wrapper (parent) element of the parameters you want to copy to, e.g., g:attribute_detail

7. Choosing the source element on the second row:

  • In the Source element field, select the element containing parameter names you want to copy, e.g., PARAM | PARAM_NAME

8. Choosing the target element on the second row:

  • In the Target element field, select the element you want to copy parameter names to, e.g., g:attribute_detail | g:attribute_name

9. Choosing the source element on the third row:

  • In the Source element field, select the element containing parameter values you want to copy, e.g., PARAM | PARAM_VALUE

10. Choosing the target element on the third row:

  • In the Target element field, select the element you want to copy parameter values to, e.g., g:attribute_detail | g:attribute_value

11: Naming the rule:

  • In the last step, enter the rule name, for example “Copy all parameters”.

Additional uses#

  • Remapping elements that the Converter did not handle.

FAQ#

What is the “Bulk Copy Values” rule for?#

This rule allows you to copy values from one element to another. You can set up multiple copy operations within a single rule.

You can use it for:

  • transferring values between elements (e.g., titleg:title),
  • duplicating content across multiple elements,
  • copying parameters into the structure required by a specific comparison shopping engine,
  • or bulk data transfer between feeds.

Can I copy multiple elements at once?#

Yes. You can add multiple rows to a single rule, where each row represents a source → target element pair. 💡 Row order is important – Mergado applies them from top to bottom.

What do “source” and “target” element mean?#

  • Source element – the value is copied from it (e.g., title)
  • Target element – the value is pasted into it (e.g., g:title)

If the target element does not exist yet, you need to create it on the Elements page using the “New element” button.

Can I use this rule to swap values?#

Yes. To swap values between two elements (e.g., image and image_alternative), follow these steps:

  1. On the Elements page, create a helper element (e.g., helper_element) and then hide it.
  2. Copy imagehelper_element,
  3. image_alternativeimage,
  4. and finally helper_elementimage_alternative.

💡 After regenerating the feed, the values will have been “swapped”.

Can this rule also do bulk structure copy?#

The rule allows you to copy entire sets of elements while preserving their hierarchy (e.g., parameter names and values). Just enter three rows:

  1. wrapper element (PARAMg:product_detail),
  2. element with names (PARAM | PARAM_NAMEg:product_detail | g:attribute_name),
  3. element with values (PARAM | PARAM_VALUEg:product_detail | g:attribute_value).

Mergado automatically creates the corresponding structure in the target format.

When is structure copy useful?#

For example, when exporting a feed to a platform that uses a different element format (e.g., Google vs. Heureka) and Mergado does not create it automatically. With structure copy, you do not have to manually map dozens of parameters – the system does it automatically.

Can I copy product parameters with this rule?#

Yes. The rule can transfer values between parameters, for example: PARAM | PARAM_NAMEg:product_detail | g:attribute_name. This is useful when converting a feed to another format or adding parameters missing in the target XML.

What happens if the target element already contains a value?#

By default, the existing value is rewritten by the value from the source element. If you need to preserve values and only add new ones, use a different rule, such as Add multi-value element value.

Can I use variables or text edits when copying?#

Not directly in this rule. The rule copies values without modification. If you need to edit values (e.g., add text, remove characters), use a combination with the Rewrite or Find and Replace rule.

Can the rule be applied only to certain products?#

Yes. In the “Query” field, you can use saved queries or create new ones, e.g., for specific brands, price ranges, or categories. This allows you to copy values selectively for only part of the feed.

What if I want to copy only specific rows of an element (e.g., a specific parameter)?#

In that case, you can use the element path with a condition, e.g.:

PARAM {PARAM_NAME="Color"} | VAL

This way, Mergado will copy only values that match the “Color” parameter.

How do I check if the copy was done correctly?#

After saving and applying the rules:

  • go to the Products page and check a product that is part of the query in the copy rule,
  • or run the “Rule walkthrough” for a specific product – you will see how the value was copied.

or after regenerating the feed:

  • open the output feed and check the target element.

Can I use this rule to fix incompletely mapped elements after the Converter?#

Yes, this is one of the most common uses. If the Converter did not create all elements as expected, you can use this rule to supplement missing elements or remap those that were not converted correctly.

Can the rule be scheduled (timer)?#

Yes, you can enable a timer and have the rule run only on specific days or at specific times.

What are the most common mistakes when using this rule?#

  • Mixing up the copy direction (source and target element).
  • Using a non-existent element.
  • Not regenerating the feed after applying rules – changes are not yet visible in the feed itself.
  • Row order – copying is evaluated from top to bottom.

💡 Recommendation: Test the rule on a small sample of products first using the Rule walkthrough.

What if I need to transfer the structure of attributes or parameter names?#

Use bulk structure copy (see Example 4). Mergado allows you to transfer even nested elements with their names and values, preserving the original name -- value relationship.

🇨🇿 🇬🇧 🇩🇪 🇭🇺