How to Create, Edit & Import Magento 2 Catalog Price Rules
Today, we are going to talk about Magento 2 Catalog Price Rules. It’s a powerful sales booster that allows for running price-focused campaigns based on discounts right in your catalog. You can apply Magento catalog price rules to products with particular attributes and their combinations to achieve the highest possible flexibility. Another good thing is that they are built into the platform. It is Magento’s native marketing tool which is extremely user-friendly and powerful. Below, we explain what catalog price rules are and how to create catalog price rules in Magento 2.
Despite all the good things, there is one notable inconvenience. You cannot import catalog price rules to Magento 2 with the help of the default importer. We highlight this inconvenience, introducing a solution that brings the missing functionality to the platform. You only need to install the Improved Import and Export extension and learn what attributes are required for transferring catalog price rules in Magento 2. The details are carefully noted in the article below. You will find a sample table for the catalog price rule import to Magento 2 along with its attributes and values described.
Table of contents
- 1 What Are Magento 2 Catalog Price Rules?
- 2 How to Create Catalog Price Rules in Magento 2
- 3 Magento 2 Catalog Price Rules Import
- 4 Magento Catalog Price Rules Import & Export FAQ
- 4.1 How to import and export Magento 2 catalog price rules automatically?
- 4.2 How to import catalog price rules with third-party attributes to Magento 2?
- 4.3 How to import and export Magento catalog price rules via API?
- 4.4 How to import and export catalog price rules to Magento 2 via ODS files?
- 4.5 How to import and export Magento 2 catalog price rules via XLSX files?
- 4.6 How to import and export Magento 2 catalog price rules via JSON files?
- 4.7 How to import catalog price rules to Magento 2 via compressed files?
- 4.8 How to import Magento catalog price rules from Google Sheets?
- 4.9 How to import and export catalog price rules between Magento 2 and Dropbox?
- 4.10 How to import and export catalog price rules between Magento 2 and Google Drive?
- 5 Final Words
What Are Magento 2 Catalog Price Rules?
The catalog price rules of Magento 2 are a powerful promotional instrument that lets you apply discounts to items in the catalog, based on predefined conditions, such as product attributes, customer group, storeview, etc. If a product falls under the predefined conditions, Magento 2 automatically applies the discount displaying the new price directly in the catalog. Unlike Magento 2 cart price rules, catalog price rules require no interaction on the customer side. In terms of configuration, they are also less complex. Let’s create a new Magento catalog price rule to make sure of that.
How to Create Catalog Price Rules in Magento 2
You can create a new catalog price rule in Magento 2 under Marketing -> Promotions -> Catalog Price Rules. Hit the “Add New Rule” button and Magento will redirect you to a new catalog price rule screen.
A separate catalog rule page is divided into these sections: Rule Information, Conditions, Actions, and Related Dynamic Blocks.
Magento 2 Catalog Price Rule Information
The first tab requires the following information about your catalog price rule:
- Specify its name. It will be used for internal reference.
- Add a rule description to better understand what it does.
- Activate your Magento 2 catalog price rule.
- Choose websites to apply the associated discount.
- Select customer groups to provide products at discounted prices.
- Set the From and To dates to determine when the catalog price rule is in effect. Leave the dates blank to enable the discount right after the rule is saved.
- Set the priority for your new rule to avoid conflicts with other rules.
Catalog Price Rule Conditions
The Conditions tab is a place where you specify what products or categories are associated with your catalog price rule. For instance, the image below shows conditions when the Magento catalog price rule is applied to products from specific categories only.
As you can see, the first condition states “If **ALL** of these conditions are **TRUE**:“. There are two bold links in the statement: ALL and TRUE. Click on them to display the selection of options for that part of the statement:
- ALL: you can choose between ALL and ANY.
- TRUE: you can choose between TRUE and FALSE.
Follow these steps to configure the second part of the condition statement for your Magento 2 catalog price rule:
- Click the Add icon at the beginning of the next line;
- Select an option for the condition;
- Choose the attribute that you want to use as the basis of the condition.
- Click “is” and choose the comparison operator that describes the condition to be met: is or is not.
- Select or enter values for the condition.
- To add another condition line to the statement, click the Add icon and repeat the steps described above.
Catalog Price Rule Actions
As for the Actions section, it lets you specify how to apply your new catalog price rule here: as a percentage or fixed amount. The image below shows a 20% discount off the original price.
In Magento 2, catalog price rules are associated with the following actions:
- Apply as percentage of original. This action discounts items by subtracting a percentage of the regular price. Let’s suppose you want to apply a 10% discount to the original product price. Enter 10 in the Discount Amount field.
- Apply as fixed amount. This action discounts items by subtracting a fixed amount from the regular price. Let’s suppose you want to apply a $10 discount to the original product price. Enter 10 in the Discount Amount field.
- Adjust final price to this percentage. This action adjusts the final price by a percentage of the regular price. Let’s suppose you have a huge sale with a 75% discount. Enter 25 in the Discount Amount field for a final price that is marked down 75% from the regular price.
- Adjust final price to discount value. This action sets the final price to a fixed amount that you specify. Enter 20 in the Discount Amount field to display $20.00 instead of the product’s original price.
Note that you can disable other rules after this rule is applied. Set Discard Subsequent Rules to Yes.
Related Dynamic Blocks
This section contains Magento 2 dynamic blocks associated with the rule. These blocks appear in the storefront whenever the conditions are met. Select a checkbox in the first column to assign blocks with your Magento 2 catalog price rule.
Magento 2 Catalog Price Rules Import
Although it is impossible to import catalog price rules to Magento 2 with the platform’s built-in tools, you can always rely on the Improved Import and Export extension to get the missing functionality. The module provides all the necessary resources for performing fast and safe Magento 2 catalog price rule import. Whether you update your database, connect your Magento 2 store with another platform, or migrate to Magento 2, the comprehensive architecture of the extension will help you to implement data transfers in various ways.
Improved Import and Export offers an enhanced data transfer tool in comparison to the native functionality. Along with the support for catalog price rules and other Magento 2 entities, the extension enables:
- Both manual and automatic transfers with cron;
- Additional data file formats, including CSV, XML, XLSX, and others;
- New import sources — Dropbox, GoogleSheets, etc.;
But let’s return to Magento catalog price rules. Before doing any imports, you need to learn the context of a sample catalog price rules CSV.
Sample Table for Catalog Price Rule Import
You can get a sample catalog price rules CSV suitable for Magento 2 in our
If you want to compile a new Magento 2 category price rules table from scratch, mind the following requirements:
Character set | Unicode (UTF-8) |
Field separator | Comma, Tab |
Text delimiter | ” |
Magento 2 Catalog Price Rule Attributes
In this chapter, you can find the info on the catalog price rule attributes used in Magento 2 that must be included in an import table.
Attribute Name | Reference | Values | Value Example |
rule_id | The ID of the catalog price rule. It is a unique identifier that you can use to update a particular catalog price rule | Numeral | 25 |
name | The name of the catalog price rule | Can be any value | Underwear 10% off |
description | Description of the catalog price rule | Can be any value | 10% discount on men’s underwear sponsored by Improved Import and Export |
website_ids | IDs of the websites the catalog price rule is enabled for | Website ID value | 1 |
customer_group_ids | Customer Groups that will be able to use the discount | Customer group IDs can be found at Customers > Custom Groups > ID column.
Multiple values must be separated by commas. |
0,1,2,3 |
from_date | The date from which the catalog price rule becomes active | The date is processed in the following format:
yyyy/dd/mm For example: If you want a discount to be active from the 27th of December 2024, the value should look like: 2024-12-27 |
2024-12-27 |
to_date | The date to which the catalog price rule becomes active | The date format should follow:
yyyy/dd/mm For example: If you want the discount to stop being displayed on the 31st of December 2024, the value should look like: 2024-12-31 |
2024-12-31 |
conditions_serialized | The complex syntax that defines active conditions and condition combinations that trigger the rule | Values for categories, SKU, and product attributes enclosed in JavaScript.
Can contain letters, numerals, and punctuation marks. |
See |
stop_rules_processing | The attribute corresponds to the “Discard subsequent rules” setting. If the option is enabled all other catalog price rules will not be applied to the product | 0 – Discard subsequent rules disabled
1 – Discard subsequent rules enabled |
1 |
simple_action | The attribute corresponds to the “Actions > Apply” setting. Defines the type of discount applied by the rule | by_percent – the discount amount is a percent of the product price
by_fixed – the discount amount is a fixed sum to_percent – the product price is reduced to a percent of the regular price to_fixed – the product price is reduced to a fixed amount |
to_fixed |
discount_amount | The amount of the discount applied to the products by the catalog price rule | Numeral | 15 |
sort_order | The rule application priority | Numeral (where 1 defines the highest priority) | 4 |
is_active | Specified whether the catalog price rule is enabled or disabled | 0 – is disabled
1 – is enabled |
1 |
How to Import Catalog Price Rules to Magento 2
Once you have completed the data table for the Magento 2 catalog price rules import and installed Improved Import and Export, you are fully equipped to run the procedure. Go to System -> Improved Import/Export -> Import Jobs and hit the “Add New Job” button to create a new import job. Next, follow these steps to import catalog price rules to Magento 2:
Step 1: Configuring General Settings & Automate Import
Start with specifying general info about rule import in the first section of the job setting page. In case you need to enable automatic imports to Magento 2, schedule cron updates.
Step 2: Select Catalog Price Rules as Your Import Entity
Next, you choose “Catalog Rule” from the list of supported entities in the Import Settings. If you transfer data from another platform or Magento 1, look for a corresponding preset in the “Select A Platform” dropdown.
Step 3: Define Import Behavior
Now, you can go to the Import Behavior tab. It lets you choose how to run the import process: add and update, replace, or delete catalog price rules in Magento 2. Next, choose a validation strategy, set a limit on errors, and specify separators.
Step 4: Choose File Format & Source
The Improved Import and Export extension provides the ability to import catalog price rules to Magento 2 using different file formats and from various sources. The extension’s distinctive feature is the support of REST and SOAP API, FTP and SFTP, Dropbox and Google Sheets, URL, and direct file upload. The data table can be provided in CSV, XML, JSON, XLSX, ODS, ZIP, and TAR formats.
Click the ‘Validate file’ button to let the extension ensure the table with Magento 2 catalog price rules is properly formatted.
Step 4: Import Catalog Price Rules to Magento 2
Now the job is ready the only thing you are left to do is hit the ‘Save & Run’ button at the top right corner of the screen. Then, click the ‘Run’ button. The extension will do the rest, transferring catalog price rules to Magento 2
Note that the import procedure provides a log file where you can check how the job went.
That’s it. You have just learned how to import Magento 2 catalog price rules. If you require instructions on how to import other entities such as products, categories, or CMS pages, read the dedicated blog articles from our Magento 2 import/export guide list.
Magento Catalog Price Rules Import & Export FAQ
Let’s take a look at other nuances of importing and exporting catalog price rules in Magento with the help of the Improved Import & Export Magento 2 extension.
How to import and export Magento 2 catalog price rules automatically?
You can import catalog price rules to Magento 2 automatically regularly if you use the Improved Import & Export extension. While the default import and export tools don’t support automation, unless you use Adobe Commerce, our extension utilizes a cron scheduler to automate these and other data transfers. As a store admin, you get the ability to import and export catalog price rules between Magento 2 and external destinations automatically after specifying a schedule of updates.
How to import catalog price rules with third-party attributes to Magento 2?
While Magento 2 doesn’t let you import data that doesn’t follow its requirements, you can still do that. If a table with catalog price rules contains third-party attributes, you no longer need to edit it manually. The Improved Import & Export extension lets you create a mapping scheme where you match third-party attributes and values to ones used within Magento 2. As a result, any external data, including catalog price rules, is easily adapted to the native Magento 2 standards. When it comes to export processes, you can also apply mapping to them, creating the output your partners require.
How to import and export Magento catalog price rules via API?
The Improved Import & Export Magento 2 module provides the ability to transfer catalog price rules along with other entities via API. You create API connections for transferring data to and from Magento 2 straight in the module’s import/export jobs. Specify the parameters necessary to sync the two systems right there.
How to import and export catalog price rules to Magento 2 via ODS files?
While Magento 2 works with CSV files only, you can still move catalog price rules in ODS files or export data using this format since the Improved Import & Export module supports a bunch of standards in addition to CSV.
How to import and export Magento 2 catalog price rules via XLSX files?
While Magento 2 works with CSV files only, you can still move catalog price rules in XLSX files or export data using this format since the Improved Import & Export module supports a bunch of standards in addition to CSV.
How to import and export Magento 2 catalog price rules via JSON files?
While Magento 2 works with CSV files only, you can still move catalog price rules in JSON files or export data using this format since the Improved Import & Export module supports a bunch of standards in addition to CSV.
How to import catalog price rules to Magento 2 via compressed files?
If your files with catalog price rules are compressed, use the Improved Import & Export module to transfer them to Magento 2. Remember that your file archive should be saved as a ZIP or TAR file, containing CSV, XML, ODS, JSON, or XLSX.
How to import Magento catalog price rules from Google Sheets?
If catalog price rules are stored in Google Sheets, you can use the Improved Import & Export extension to get them straight out of there and move them to your e-commerce website. It is only necessary to specify the address of the corresponding Google Sheets table. You can also export catalog price rules from Magento 2 to Google Sheets with the help of our module.
How to import and export catalog price rules between Magento 2 and Dropbox?
The Improved Import & Export extension provides the ability to transfer catalog price rules between Magento 2 and other destinations using Dropbox as an intermediary platform. You can transfer CSV, JSON, XML, ODS, or XLSX files or ZIP and TAR archives.
How to import and export catalog price rules between Magento 2 and Google Drive?
In addition to Google Sheets and Dropbox, the Improved Import & Export extension lets you import and export catalog price rules between Magento 2 and Google Drive. You should use CSV, JSON, XML, ODS, or XLSX formats to move the data. Note that they can be compressed as ZIP or TAR archives.
Final Words
You can easily create Magento 2 catalog price rules as a part of your promo campaigns. Provide discounts to products right in your catalog to motivate store visitors to purchase more goods. As you can see, creating catalog price rules in Magento 2 is an intuitive process. The corresponding import procedure, however, requires additional tools and preparations. To learn more about Improved Import & Export and its role in the import of Magento catalog price rules, follow this link:
Get Improved Import and Export Extension