String
Automation rules

Can ShipStation Automation Rules Use If/Else or OR Logic?

Published

Short answer: Partly. Every criteria line in a rule must match, so lines are joined by AND. Inside a single criterion you can list several values, and any one of them matches, so that’s OR. There’s no OR between lines, no brackets and no else. You build if/else out of several rules in the right order, using tags and the Stop Processing Rules for the Order action.

What one rule can express

  • AND across lines. Country is US and Total Weight is Less Than 16 means both must be true.
  • OR within a criterion. State is one of CA, OR, WA matches any of the three. For criteria where you type the value, separate values with a semicolon.
  • NOT, for tags. Tag does not include PERISHABLE matches orders without that tag, which is often the rule you actually want.

What one rule can’t express is (A AND B) OR (C AND D). That’s two rules.

Building OR across conditions

Write one rule per branch, with the same action:

  • Rule 1: Tag includes FRAGILE → insure the package
  • Rule 2: Order Total is Greater Than 200 → insure the package

An order matching either gets insured. Because the actions are the same, the order of these two doesn’t matter.

Building if/else

ShipStation has no else, so the general case goes first and the specific case goes below it. The lower rule wins where both match:

  • Rule 1, the default: Country is US → USPS Ground Advantage
  • Rule 2, the exception: Country is US and Total Weight is Greater Than 16 → USPS Priority Mail

Or put the exception first and stop the list for those orders:

  • Rule 1: Tag includes HAZMAT → set the service, then Stop Processing Rules for the Order
  • Rule 2 onward: everything else

The first pattern relies on override, and the second relies on stopping. Both work. Pick one per decision, so the next person reading the list knows which is in use.

Using tags to build a decision tree

Tags let you separate deciding from acting:

  1. Classify. Rules near the top only add tags, such as HEAVY, REMOTE or GIFT, based on weight, destination or order value. Tags on product records are applied at import, before any rule runs, so they’re available from the first rule. That works for multi-item orders, unlike SKU criteria, which only match orders with one line item.
  2. Act. Rules further down combine those tags with order criteria: Tag includes HEAVY and Tag includes REMOTE → a specific service.

On accounts with the newer Automation Rules screen, a workflow can be triggered when a tag is added or removed. So one chain of rules can start another.

Where this gets hard

Every condition that interacts with the others multiplies the number of rules, and each rule’s effect depends on where it sits in the list. Three interacting conditions is manageable. Six is a list nobody on the team can reason about, and it fails quietly when someone adds a rule in the wrong place. Rule order covers keeping it straight.

The criteria also can’t calculate. They compare a field to a value you typed, so there’s no “weight divided by volume” or “the cheaper of two services”. When the logic needs a calculation, or information that isn’t on the order, no arrangement of rules will produce it. That’s when the options beyond ShipStation’s rules are worth a look.



Worth reading next

When the rule can't express it

Eight situations where the decision depends on something an automation rule cannot see.