Rules

Set up custom rules and automate actions.

Rules

Overview

The Rules Engine is a new feature in Channels that allows you to set up custom rules and automate actions based on specific events and conditions. This documentation provides a detailed guide on how to use the Rules Engine, covering all sections and functionalities.

Sections of the Rules Engine

Rule Info

In this section, you will enter the details of your rule.

Triggers

Triggers are events that will cause the rule to execute. You can set multiple triggers for a single rule. Each trigger type and event can be used for different scenarios:

Conditions

Conditions specify criteria that must be met for the rule to be executed. You can set multiple conditions for a single rule.

If no conditions are set, the rule will run every time a trigger is activated.

Actions

Actions are tasks performed when the rule runs. You can specify multiple actions for each rule.

Creating a New Rule

To create a new rule, follow these steps:

  1. Navigate to Rules: From the left-hand menu, click "Rules".
  2. Initiate Rule Creation: In the top right corner of the page, click the "+ Create a Rule" button.
  3. Name Your Rule: In the Rule Info section, provide a name for your rule. Choose a name that helps you recognize and understand the rule easily later.
  4. Set Up Triggers: Define the triggers for your rule. Triggers are the events that will cause the rule to be executed.
  5. Define Conditions: Specify any conditions that must be met for the rule to take action. After a trigger is activated, the system will check these conditions before performing any actions.
  6. Configure Actions: Set the actions to execute once the triggers and conditions are satisfied.
  7. Save the Rule: Click the "Save" button at the bottom right corner of the page.

Your rule is now saved and created! For details on each field, refer to the explanations in the above section.

Editing Existing Rules

To learn how to make changes to your rules, follow the explanations and instructions below:

  1. Access the Rules Page: Ensure you are on the rules page by clicking the "Rules" button from the left-hand menu.
  2. Page Details:
    • Priority: Use the dragging button here to select and sort the rules. The higher they are listed on this page, the more priority they will have, meaning higher rules will be run earlier than others.
    • Rule Name: This section displays the names of the rules.
    • Triggers (count): This section shows the number of triggers set within the rules.
    • Conditions (count): This section shows the number of conditions set within the rules.
    • Actions (count): This section shows the number of actions within the rules.
    • Active: Use this switch button to turn rules on or off. They will be active and run in the system if they are on. If they are off, they will not be in use.
    • Actions: This section holds a set of buttons that will help you edit and delete the rules.
      • Pen Icon: Use this button to return to the page where you created your rule and make changes.
      • Trash Bin Icon: Use this button to delete your rule.

08 - Editing.png

Example Rule Setups

Notify Low Stock

Here is an example of setting up a rule for notifying low product stock.

This rule will notify the stock manager when the quantity of any product hits or goes below 10.

image.png

Set Plugin Sync Status

This example is designed to automatically update an order's sync status to "Pending" whenever it is updated and meets specific conditions. This can be particularly useful for managing orders that need to be reviewed or processed further before being sent to a plugin.

An order can only be sent to one plugin at a time successfully. If you set more than one plugin, the rule will fail. To send an order to multiple plugins, set them up separately. Additionally, for this rule to work, you must toggle on the "Exclude Unfulfillable Orders" option in all plugin settings. To learn more about how to set up Plugins, please visit this page.

Follow the steps below to recreate this rule:

Your rule is now created and configured to update the Plugin Sync Status to "Pending" when an order, currently marked as "Excluded", is updated. This helps ensure orders that need further processing are appropriately flagged.

image.png