Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates on manage your rule article + changed the title of get started [...] article #791

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Binary file added content/md/productivity/img/Rules_Actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 22 additions & 19 deletions content/md/productivity/manage-your-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,42 @@
id: manage-your-rules
themes: boost-your-productivity, catalog-settings
title: Manage your **rules**
popular: false
popular: true
ee-only: true
related: what-is-a-rule
related: what-is-a-rule, use-YML-file-to-create-and-edit-rules
---

# Overview

A rule allows you to automatically enrich some of your product information. It relies on automatic actions based on conditions. A rule is composed of one or several conditions, that allow you to filter products/product models, and then one or several actions to update these products/product models.
For more details, please refer to our dedicated article about [the rules engine](get-started-with-the-rules-engine.html).

To create a rule, there are two options. Either you create it via the UI, or via a YML import job.

# Create a rule in the PIM UI
To create a rule, there are two options. Either you create it via the UI, or via a [YML import job](use-YML-file-to-create-and-edit-rules.html).
In this article, we will focus on the UI. :wink:

:::warning
To be able to create/edit rules, you need to have the right permissions. To manage your permissions, please go to `System/Roles`, select the appropriate role and then, click on `Permissions/Rules`, and tick `Create rules` and/or `Edit rules`.
**To be able to create/edit rules, you need to have the right permissions.** To manage your permissions, please go to `System/Roles`, select the appropriate role and then, click on `Permissions/Rules`, and tick `Create rules` and/or `Edit rules`.
:::

To create a rule via the UI, go to `Settings/Rules` and click on `Create`. A creation popin appears. Choose a **code** and a **label** to name your rule, then validate. You rule is created! You can now define your product selection and the action.s you want to apply to your selection. Let's go!

Once your rule is created, the rule edit screen appears. On this screen, you can see two tabs: the `rule builder` and `properties`. In the `Properties` tab, you can define the [priority](what-is-a-rule.html#definition-of-a-rule) of your rule, but also its label translations. These fields can be updated afterward. The code is the only part that is immutable.
Once your rule is created, the rule edit screen appears. On this screen, you can see two tabs: the `rule builder` and `properties`.

In the `Properties` tab, you can define:
- the priority of your rule (should be between 0 and 100),
- its label translations,
- its [status](#define-a-status-for-a-rule).

## The Rule builder tab
These fields can be updated afterward. The code is the only part that is immutable.

# The Rules builder

This screen is the most important one as this is where you can manage your conditions and actions.

The first thing to do is to filter the products you want to update with this rule. To do so, there are a bunch of filters available under the `Add condition` button.

### Product selection
## Product selection
In the `Product selection` part, you can define the 'Conditions'. They are the attributes or system fields you want to use to filter your products/product models. Altogether, your `Conditions` will create your 'Product selection'.

:::info
If you want to know what is the entire [list of attributes/system fields](get-started-with-the-rules-engine.html) take a look at our article.
:::

:::warning
By default, when there is no condition, your whole product catalog is selected. So if you add one or several actions, your whole catalog will be updated!
:::
Expand All @@ -45,6 +46,8 @@ At the top of the list, you will find the system fields and below, all the attri

Let's see how a line is organized.

![image](../img/Rules_ProductSelection.png)

On the left, you will find the **system** fields or **attribute** you chose. It is written in purple.
Then, you have to choose an **operator**. Depending on the filter, the operator list changes.
The next fields vary depending on your filter. There can be up to 3 types of fields. You can have the **value** field. For example, if your filter is a multi-select attribute type, you can choose which options you want to filter on.
Expand All @@ -56,7 +59,7 @@ If you want to remove a condition, just click on the cross at the end of the lin
As you can see on the left side of the `Add condition` button, there is a counter that tells you how many products/product models will be updated by this rule. It means that these conditions will impact X products/product models.
This count is automatically updated as soon as you change a condition.

#### Available conditions
### Available conditions

To select your products/product models, you can use all the system fields and attribute types of the PIM as `conditions`:

Expand Down Expand Up @@ -85,7 +88,7 @@ To select your products/product models, you can use all the system fields and at
- Reference entity single link & multiple link attributes
- Price attribute

### Add actions
## Add actions

Now that you have filtered your products/product models, you can add one or several actions you'll apply to them!

Expand All @@ -94,11 +97,11 @@ To do so:
1. Select the action you want to add. There is a search bar and a scroll bar to choose the action from a list.
1. A new section appears under the `Product selection` part.

Here is the [list of all the actions](get-started-with-the-rules-engine.html) you can do with the rules engine if you use the YML file import.
![image](../img/Rules_Actions.png)

Depending on the action you choose, the template changes. The table below lists all the actions that you can add via the PIM interface.

#### Available actions
### Available actions

| Set actions | What they do |
|---|---|
Expand Down Expand Up @@ -145,7 +148,7 @@ Depending on the action you choose, the template changes. The table below lists


# Create rules via a YML import
To create rules using a YML file, you need to [create](get-started-with-the-rules-engine.html) it and import it in the PIM using the `Rule import in YML` import job.
To create rules using a YML file, you need to [create](use-YML-file-to-create-and-edit-rules.html) it and import it in the PIM using the `Rule import in YML` import job.

::: info
For more details about how to execute an import, please refer to [Import your data](imports.html).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
id: get-started-with-the-rules-engine
themes: boost-your-productivity, catalog-settings
title: Get started with the **rules engine**
id: use-YML-file-to-create-and-edit-rules
title: Use a YML file to create and edit your rules
popular: false
ee-only: true
related: what-is-a-rule
related: what-is-a-rule, manage-your-rules
---

The rules engine can radically boost your productivity in the PIM by automating actions. As explained in [this article](what-is-a-rule.html), a rule enables you to automatically apply **one or several actions** to a specific **list of products and product models**. To set the targeted products, you have to define `conditions` (that are composed by fields and operators).

The rules are defined in a YML file that you can import in the PIM, using a dedicated job profile.
You can [manage your rules](manage-your-rules.html) directly in the PIM UI, but they can also be defined in a YML file that you can import in the PIM, using a dedicated job profile.

This feature is very, like, really powerful, and the use cases are countless. In order to guide you in the rules engine usage, we wrote this article where you will find out what you can use it for and how it works.

Expand Down