Filters
In an Automation Rule, you can apply one or more Filters to control when the rule is executed. Each filter helps narrow the scope further by restricting the rule to specific conditions. Only the Actions in the Automation Rule that match your filter criteria are executed for the selected Orders/Shipments. If no filters are applied to the Automation Rule, then the rule's Actions will execute for all Orders/Shipments on which the rule is run.
For details on creating, editing, exporting, and managing Automation Rules, see Managing Automation Rules.
If an Automation Rule includes multiple filters, you can configure their logic using "Any" or "And" conditions. Refer to the graphic below for a visual representation of how "Any" and "And" logic affect filter behavior. In this example, if any of the SKUs listed are on the order, then the order is shipped via "UPS First Class Mail". If "And" is used, then the Order is shipped via "UPS First Class Mail" only if all of the SKUs listed are on the order.
Note: ShipRush provides over 80 filter options covering geographic filters, shipping details, address filters, order data, e-commerce platforms, carrier zones, delivery options, and more. For a complete categorized reference of all available filter fields with descriptions and examples, see Automation Rules - Filter Fields Reference.
Common filter examples include:
Order item SKU, quantity of items, or Order value
Shipment destination, such as Country, US State, or Postal Code
Shipment attributes, such as the requested Shipping Service or Shipping Zone
E-commerce platform details (Webstore Name, Amazon Prime status)
Delivery timing (Time in Transit Days, Is Guaranteed Delivery)
User context (Current Time, Day of Week)
Package Filters
Automation Rules support various Package Filters, including options like Set Declared Value, Set Packaging, and Set Number of Packages. The left-most Filter dropdown is used to select a filter; see the above graphic. When the Automation Rule is executed, the selected Package filter(s) will iterate through all packages in the Shipment. If any package matches the filter, the Automation Rule executes.
Package Weight Filter
The Package Weight Filter evaluates all package weights on an order. If All is selected (see graphic, below), then the package weights are totaled for all packages on the order. This is useful if you want the Automation Rule to execute only if the total weight of all packages combined is less than or greater than a specific weight. In the example, below, the Automation Rule will execute if the total weight for all packages on the Order is greater than 100.
If Any is selected, the Automation Rule will execute if any package on the Order weighs more than 100.
Order Item Filter
The following Order Item Filters are available: Order Item SKU, Order Item Description, and Order Item Quantity. These Filters iterate through all items on an order. If any order item matches the filter, the Automation Rule will execute.
Filtering on Order Items
In the below example, the conditions "contains" and "Any" are used for both filters. This Automation Rule means that if any of the SKUs on the Order contain "pen" or "socks", the Action will be executed against the matching orders.
Below, the second filter is changed to "does not contain". This Automation Rule means that if any of the SKUs on the order contain "pen" or do not contain "socks", then the Automation Rule will be executed against the matching orders.
Filtering with Regex (Regular Expressions)
The Regex match option for Automation Rules allows you to use regular expressions to define advanced matching criteria.
Warning: Regular Expression (regex) is an advanced option and not supported by Descartes ShipRush Web Customer Service.
Regular expressions allow sophisticated searching for patterns within a longer value (for example, a long SKU value like "WEST1-WIDGET123-BLUE").
While many filters offer "starts with" and "ends with" options that can capture the prefix (for example, a distribution center name), or the suffix, such as a size or color, these constraints are limited to the beginning or end of a string. To capture specific text located between hyphens, as in this example, you'll need to use the Regex match options.
Examples:
Existing SKU value: WEST1-WIDGET123-BLUE
To get: WIDGET123
Use: (?<=-)w+(?=-)To get a direct match to WIDGET123, only
Use: (?<=-)WIDGET123(?=-)Tip: In many cases, more than one regular expression can satisfy a specific task. Try some of the online tutorials to learn and test regular expressions.
See also:
Automation Rules - Filter Fields Reference (Complete list of all 80+ available filter fields)