About Order Rules

DropStream features a robust, custom-made rule engine that allows you to tailor your integration to your unique workflows. Taking time to create rules can increase efficiency and automation of order fulfillment.

Types

DropStream order rules are expressed in a custom rule language. There are two main types of rules, transformer rules and filter rules.

Transformer rules transform specific details of an order in order to facilitate seamless integration between the eCommerce platform and fulfillment. For example, a transformer rule can be written to map all orders with "free shipping" to be sent via USPS - Priority Mail.

Filter rules create conditions by which an order may be filtered out and not sent to fulfillment (by default, all orders are accepted). For example, a filter rule may be written so that when an order's billing country is UK, that order is filtered out and not sent to fulfillment.

Additionally, rules are distinguished by their application domain: different rules apply to orders and to order items.

All rules are optional, except for the Order Shipping Description Transformer rule, which is required to automate order fulfillment.

Construction

Rules are applied and created on a per-store basis. If you have more than one store, you will need to create rules for each of them.

Rules can be constructed with the help of the GUI Editor that features a user-friendly interface. To access the editor, navigate to Stores > your_store > Rules > +Add rule or rule_name > Edit rule.

DropStream - GUI Editor

Advanced Editor can be used to edit the rule source code.

DropStream - Advanced Editor

Each rule needs to be given a name. The name cannot include quotation marks.

Once created, rules are saved, and you will be able to edit them any time you need.

Execution

Rules are executed, one-by-one, on orders that are imported from your store to DropStream at the same time, in the order in which rules occur in your DropStream rule table.

Rules occur in the rule table in the order in which they were created but can be reordered. Rule ordering is important because the output of one rule may affect the input to another rule.

Orders are imported from your store as a batch according to the import schedule. The ordering of orders within the batch is not important because orders are independent of each other.

Rules are executed on orders immediately after they are imported from a store, before going to a warehouse for fulfillment. Rules are executed on shipments immediately after they are received from a warehouse to be delivered to customers. No rules are executed on inventory items.

A log entry is made for rules that are executed at the same time in DropStream under Tasks.

Errors

Rules are evaluated for errors when rules are saved and when they are executed.

Error messages for errors that are caught when rules are saved (parsing errors) are displayed in the DropStream Rules window. This is how they may look like:

DropStream - Parsing error

Rules will not be saved unless all such errors are corrected, so check that your rules are syntactically correct and express them in a different way, if necessary.

The errors that are triggered when rules are executed (runtime errors), are caught later when rules that have been successfully saved are applied to orders. Those errors are logged in DropStream under Orders > Search/Filter Orders > Fulfillment status: Error. Make sure to fix those errors as well.

Documentation

DropStream rules are well-documented and provide guidance with all aspects of rule creation and management.

To start creating rules, see the Order Shipping Description Transformer Rule article. For guidelines about ordering, editing and deleting rules, see Reordering, Editing, and Deleting Rules.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.