Skip to content

Rules & Conditions

Rules are the core of ShipRules AI. Each rule belongs to a shipping method and contains one or more conditions. When all conditions in a rule match (AND logic), the rule’s action fires.

ActionWhat it doesExample
HideRemove the method from checkout”Don’t show Express for PO boxes”
ShowOnly show the method when conditions match”Only show Local Pickup for postal codes near the warehouse”
FreeMake the method free ($0.00)“Free shipping on orders over $100”
Add surchargeIncrease the rate by a flat amount or percentage”Add $5 for Alaska/Hawaii”
Subtract discountDecrease the rate by a flat amount or percentage”10% shipping discount for VIP customers”

For Add surcharge and Subtract discount, you also specify:

  • Adjustment value — the amount (in cents for flat, or percentage points)
  • Adjustment typeflat or percentage

ShipRules AI supports 20 condition types across four categories.

These check properties of individual items in the cart.

Condition typeWhat it checksExample values
Product TagShopify product tagsfragile, heavy,oversized
WeightItem weight in grams1000, 5000
PriceItem price in cents999, 10000
QuantityItem quantity1, 5
SKUProduct variant SKUABC-123, WIDGET-*
VendorProduct vendor nameAcme Co
TitleProduct titleGift Card

These check the overall cart, not individual items.

Condition typeWhat it checksExample values
Cart TotalTotal cart value in cents5000, 10000
Unique ItemsNumber of distinct line items1, 3

These check where the customer is shipping to.

Condition typeWhat it checksExample values
Destination CountryISO country codeUS, CA,AU
Destination StateState/province codeNY, AK,HI
Destination PostalPostal/zip code10001, 2000
Destination CityCity nameNew York, Sydney
Ship-to NameRecipient nameJohn Smith
Ship-to CompanyCompany nameAcme Corp
Ship-to AddressAddress line 1123 Main St
Ship-to PhonePhone number555-1234

These check when the order is being placed.

Condition typeWhat it checksExample values
Order DateDate the order is placed (YYYY-MM-DD)2025-12-25
Order TimeTime of order (HH:MM, 24-hour)09:00, 17:00
Day of WeekDay nameMonday, Saturday,Sunday
OperatorWorks withMeaning
EqualsAll typesExact match (case-insensitive for strings)
Not EqualsAll typesDoes not match
ContainsStringsValue appears anywhere in the field
Not ContainsStringsValue does not appear in the field
Starts WithStringsField begins with the value
Not Starts WithStringsField does not begin with the value
Ends WithStringsField ends with the value
Not Ends WithStringsField does not end with the value
Greater ThanNumbersField is greater than the value
Greater or EqualNumbersField is greater than or equal to the value
Less ThanNumbersField is less than the value
Less or EqualNumbersField is less than or equal to the value

Comma-separated values (OR within a condition)

Section titled “Comma-separated values (OR within a condition)”

You can enter multiple values separated by commas. The behavior depends on the operator:

  • Positive operators (equals, contains, starts_with, ends_with): The condition matches if any value matches. Example: destination_state equals AK,HI means “Alaska OR Hawaii”.

  • Negative operators (not_equals, not_contains, etc.): The condition matches only if none of the values match. Example: destination_state not_equals AK,HI means “NOT Alaska AND NOT Hawaii”.

Scopes determine which products are checked when evaluating a product-level condition (tag, weight, price, quantity, SKU, vendor, title).

Scopes do not affect destination, cart, or time conditions — those always apply to the order as a whole.

ScopeMeaningUse when
Any product in orderTrue if at least one item matches”If any item is tagged ‘fragile‘“
All products in orderTrue only if every item matches”If every item weighs under 1kg”
Each product in orderEvaluated per itemPer-item surcharges

Rules are evaluated in position order (lowest position first). All conditions in a rule are AND’d — they must all be true for the action to fire.

When multiple rules fire on the same method:

  • Hide rules take precedence — if any hide rule matches, the method is hidden regardless of other rules.
  • Show rules work as a whitelist — the method is hidden unless a show rule matches.
  • Free rules set the price to $0.00.
  • Surcharge/Discount rules stack — multiple adjustments add up.
  • Action: Free
  • Condition: Cart Total, Greater Than, 10000, Any product in order
  • Action: Hide
  • Condition: Weight, Greater Than, 5000 (5kg in grams), Any product in order
  • Action: Add surcharge ($5.00 flat)
  • Condition: Destination State, Equals, AK,HI

Only show local pickup for specific postal codes

Section titled “Only show local pickup for specific postal codes”
  • Action: Show
  • Condition: Destination Postal, Starts With, 2000,2001,2002
  • Action: Add surcharge (15% percentage)
  • Condition: Day of Week, Equals, Saturday,Sunday