Rules
In this post we will learn:
- What are rules?
- What do I see on the Rules page?
- How to create a new rule
- List of rules and their most common uses
- What is good to know
- Summary
What are rules?
Our smart rules are one of the most important tools of the Mergado Editor. Using specific rules, queries and elements, you can adjust the data according to your needs or the needs of product comparison sites, marketplaces, websites, supplier applications or other platforms.
We divide the rules into four groups:
- Rules created by the Editor (e.g. Mergado XML [CZ] → Heureka.cz – product [CZ] conversion)
- Rules made within our extension apps (e.g. Bidding Fox - INPUT)
- User rules (e.g. Change the color parameter)
- Manual change rule
Examples are in the image below.
Different types of rules can then be changed. For example, rules created by Mergado cannot be copied, you can only delete them. On the other hand, you can disable, duplicate or delete user rules.
What do I see on the Rules page?
The Rules page can be divided into several sections:
- Search
Here you can search for rules by name, specific type or element they work with. Alternatively, search only for active rules. - Rules List
Here you can see the rules that are constantly applied in your project. Some rules are created by us or by extension apps. - Apply rules / Regenerate changed
A button that allows you to apply the rules or regenerate changes. See the difference here. - New rule
You can create a new rule using this button. If you already have a rule created in another project, you can import it using the - import rule option. - Rule editing options
Sort – Allows you to sort the rules. Note that the order matters. See below.
Disable – Disables a specific rule
Edit – Takes you to the rule editing screen
Duplicate – Copies the rule. The duplicate is below the original.
Delete – Deletes the rule
Schedule – Schedules the rule for a specific time
How to create a new rule?
- Select a rule type
- Select query(ies)
- Select the element to be modified
- Enter new content
- Name the rule.
Note: The rule form changes depending on the rule type. For example, “Rewrite” rule looks different than a data import rule or a shipping price setting rule.
List of rules
Mergado offers a large number of rule types. The names indicate what you actually need to do with a given element or query. For example, you need to hide a product because the supplier no longer supplies it - I will use the rule Hide product. I need to set up shipping - I will use the rule Set shipping price.
TIP: We will gradually add new rule types.
List of rules:
- Rewrite
- Find and replace
- Hide product
- Bulk rewriting by query
- Bulk rewriting by values
- Bulk copy values
- Rename categories in bulk
- Set product parameters
- Set shipping rates
- Truncate value
- Letter case converter
- Round number
- Remove accents and diacritics
- Cost per click pricing
- Set UTM parameters
- Strip HTML tags
- Calculation
- Data file import
What is good to know?
Order
The order of the rules matters. Rules are applied from top to bottom. You can find a number next to the rule that shows how many times it is in the order of application of the rules. So you can work with modified data.
Extension apps
The apps from the Mergado Store creates rules. You cannot turn off, edit or duplicate these rules. You can only delete them. In case you need to first process the data in the application and then work with them in the Editor, you can change the order of the rules of the given application.
A new rule can be imported
A rule can also be imported from another project. Using the button – Import rule in a simple form, you can choose which e-shop and project you want to import from. This is useful if you already have a sophisticated rule created in another e-shop and you don’t want to create it from scratch.
Apply rules
Rules application is only part of the entire data regeneration. The application only changes the data in Mergado. This data will only reach the output feed after complete regeneration. Rules application is suitable, for example, for cases when you need to check or test your modifications before generating them in the output feed.
Regenerate changed
Unlike “apply rules”, regeneration of changed items will apply the changes also in in the output feed.
Applying rules only to traced items
Mergado also allows you to apply rules only to traced products. You can set product tracking in the product detail in the Rules Passage tab.
If you do so, you can apply the rules only to the products you follow via the Apply rules – Apply to traced items only option. This will speed up the review or testing process on a specific product if your feed contains a large number of products.
Schedule rule
You can also schedule the rule. You can find the rule scheduler in the Schedule section for each rule, then you have the option to schedule the rules. The rule scheduler allows you to set the times when a given rule should be applied or when it should be skipped. For example, you can set that a rule related to a limited-time discount event will be applied only in a specific range of dates (e.g. Black Friday, or before Christmas), or simply only over the weekend.
Summary
- What are rules?
A rule is a tool for editing data. - How many rules does the Editor offer?
Many. Each for its specific purpose. Just follow a simple instruction. I want to overwrite something – I use the Overwrite rule, I need to edit data in a larger amount or for multiple values – I choose a bulk rule. - What does applying rules do?
Applying rules only changes the data in the Editor. A full regeneration is required to export the data. - In what order are rules applied?
From top to bottom.
Rules in Mergado are a way to apply bulk edits to products. Individual rules can be applied to all products in your feed, however, rules are more often used in combination with queries, thanks to which you can specify which products each rule should apply to.
Tip: You can create a rule on the Rules page by pressing the CREATE RULE button.
Tip 2: Watch video help on working with the rules: