Order Rule Engine

Order Rule Engine

Overview

The Rule Engine feature in Sellercloud can help you apply changes to your orders and items within your orders automatically. Similar to post-order plugins, the Rule Engine allows you to split an order, change warehouses, and more based on the conditions and actions configured in the rule.

The Order Rule Engine functionality is only available in Sellercloud's Delta interface.

In addition to the workflow outlined in this article, you can also execute Order Rules at specific times via a Scheduled Task. Alternatively, you can trigger existing Rules via our Rest API or manually.

Prerequisites

To enable the Rule Engine:

  1. Go to Settings > Client Settings > Orders
  2. Turn on Enable Rule Engine.

Additionally, you can enable the following Client Settings:

The Rule Engine does not automatically apply to Related Orders. For these cases, you can run it manually from the Actions menu on the Order Details page.

By default, the Order Rule Engine is triggered immediately after order creation. However, in some cases, you may need to delay this for a while, for example, if there is a delay in receiving the order payment. To address such cases, you can delay the execution of the rule engine by a few seconds. This is controlled by an app setting: EnableRuleEngineExecutionQueue. Open a ticket with Sellercloud Support to configure it for your account. Once enabled, go to General Client Settings and set the time for how long the engine would be delayed in the Rule Engine Execution Queue Delay In Seconds field.

Manage Rules

You can create, test, copy, and delete rules under Settings > Orders > Rule Engine > Manage Rules.

To create a new rule:

  1. Go to Settings > Orders > Rule Engine > Manage Rules.

  2. Click the + icon in the panel header to Add New Rule.

  3. Enter the Rule Name.

  4. By default, rules will not be run on certain types of orders. Enable the following checkboxes to include those orders when running the order rule:

    1. Process FBA Orders;
    2. Process Fully Shipped Orders;
    3. Process Unpaid Orders.
  5. Add Conditions.

    1. Add Condition Name and select Condition Type. You can also add a Sublevel Condition controlled by the top-level condition. Read more about conditions in the section below.
  6. Create Actions.

    1. Enter Action Name and select Action Type.

      The rule can populate a custom column with a time and date pulled from placeholders. When creating a new action, select the Action Type - Update an Order Custom Column. This is the placeholder: ${CurrentDateTime(Format)} - where Format can be any of the .NET DateTime to String formats. Spaces are allowed only inside the Format value. The rest of the string has to be written without any spaces between the brackets and the symbols.

  7. If the order meets the condition(s), the system will automatically perform the action(s) created for the rule.

  8. You can Enable/Disable conditions and actions.

  9. Click the Green Flag to finalize the rule creation.

Order rules are run immediately after order creation. Rules will only be applied to orders that are created after the rule is enabled.

Execute Manually

You can manually execute rules on one or more orders. To execute your rules from the Manage Rules Page:

  1. On the Rule Engine > Manage Rules page, click the Execute Rules on Order(s) icon.

  2. You will see a pop-up where you can configure which rules to Execute:

    1. Enabled Only (Recommended) - choosing this option means that all currently enabled rules will be applied to the selected order(s).
    2. All - this option will cause all rules, enabled and disabled, to be applied to the order(s).
    3. Custom - if you select this option, you can enter the Rule IDs you want to execute (e.g., 2,12,13), and they will be applied. You can enter the IDs of both enabled and disabled rules.
  3. Next, add the Order ID(s) on which you want to execute the selected Rules.

  4. Click Execute.

To execute a specific rule from the Rules Details page:

  1. On the Rule Engine > Manage Rules page, open the Rule.
  2. You will see a few icons in the top right corner of the General panel > click the first icon to Execute Rule on Orders...
  3. In the pop-up, enter a comma-separated list of the order(s) > Click Execute.

To execute a rule from the Order Details page:

  1. Go to an Order Details page.

  2. Open the Actions menu and click Execute Rule Engine.

  3. Confirm the action in the pop-up window.

  4. If the order meets the conditions of multiple rules, all of them will be applied.

View Log

To view the execution log, go to Settings > Orders > Rule Engine > Execution Log.

Conditions

Actions