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.
Rule actions
Section titled “Rule actions”| Action | What it does | Example |
|---|---|---|
| Hide | Remove the method from checkout | ”Don’t show Express for PO boxes” |
| Show | Only show the method when conditions match | ”Only show Local Pickup for postal codes near the warehouse” |
| Free | Make the method free ($0.00) | “Free shipping on orders over $100” |
| Add surcharge | Increase the rate by a flat amount or percentage | ”Add $5 for Alaska/Hawaii” |
| Subtract discount | Decrease 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 type —
flatorpercentage
Condition types
Section titled “Condition types”ShipRules AI supports 20 condition types across four categories.
Product conditions
Section titled “Product conditions”These check properties of individual items in the cart.
| Condition type | What it checks | Example values |
|---|---|---|
| Product Tag | Shopify product tags | fragile, heavy,oversized |
| Weight | Item weight in grams | 1000, 5000 |
| Price | Item price in cents | 999, 10000 |
| Quantity | Item quantity | 1, 5 |
| SKU | Product variant SKU | ABC-123, WIDGET-* |
| Vendor | Product vendor name | Acme Co |
| Title | Product title | Gift Card |
Cart conditions
Section titled “Cart conditions”These check the overall cart, not individual items.
| Condition type | What it checks | Example values |
|---|---|---|
| Cart Total | Total cart value in cents | 5000, 10000 |
| Unique Items | Number of distinct line items | 1, 3 |
Destination conditions
Section titled “Destination conditions”These check where the customer is shipping to.
| Condition type | What it checks | Example values |
|---|---|---|
| Destination Country | ISO country code | US, CA,AU |
| Destination State | State/province code | NY, AK,HI |
| Destination Postal | Postal/zip code | 10001, 2000 |
| Destination City | City name | New York, Sydney |
| Ship-to Name | Recipient name | John Smith |
| Ship-to Company | Company name | Acme Corp |
| Ship-to Address | Address line 1 | 123 Main St |
| Ship-to Phone | Phone number | 555-1234 |
Time conditions
Section titled “Time conditions”These check when the order is being placed.
| Condition type | What it checks | Example values |
|---|---|---|
| Order Date | Date the order is placed (YYYY-MM-DD) | 2025-12-25 |
| Order Time | Time of order (HH:MM, 24-hour) | 09:00, 17:00 |
| Day of Week | Day name | Monday, Saturday,Sunday |
Operators
Section titled “Operators”| Operator | Works with | Meaning |
|---|---|---|
| Equals | All types | Exact match (case-insensitive for strings) |
| Not Equals | All types | Does not match |
| Contains | Strings | Value appears anywhere in the field |
| Not Contains | Strings | Value does not appear in the field |
| Starts With | Strings | Field begins with the value |
| Not Starts With | Strings | Field does not begin with the value |
| Ends With | Strings | Field ends with the value |
| Not Ends With | Strings | Field does not end with the value |
| Greater Than | Numbers | Field is greater than the value |
| Greater or Equal | Numbers | Field is greater than or equal to the value |
| Less Than | Numbers | Field is less than the value |
| Less or Equal | Numbers | Field 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,HImeans “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,HImeans “NOT Alaska AND NOT Hawaii”.
Scopes
Section titled “Scopes”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.
| Scope | Meaning | Use when |
|---|---|---|
| Any product in order | True if at least one item matches | ”If any item is tagged ‘fragile‘“ |
| All products in order | True only if every item matches | ”If every item weighs under 1kg” |
| Each product in order | Evaluated per item | Per-item surcharges |
| Scope | Meaning | Use when |
|---|---|---|
| Any product from group | True if at least one item in the method’s product group matches | Same as “any in order” but limited to the group |
| All products from group | True only if every item in the group matches | Same as “all in order” but limited to the group |
| Each product from group | Evaluated per item within the group | Per-item within a specific group |
Rule evaluation order
Section titled “Rule evaluation order”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.
Examples
Section titled “Examples”Free shipping over $100
Section titled “Free shipping over $100”- Action: Free
- Condition: Cart Total, Greater Than,
10000, Any product in order
Block express for heavy items
Section titled “Block express for heavy items”- Action: Hide
- Condition: Weight, Greater Than,
5000(5kg in grams), Any product in order
$5 surcharge for Alaska and Hawaii
Section titled “$5 surcharge for Alaska and Hawaii”- 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
Weekend express surcharge
Section titled “Weekend express surcharge”- Action: Add surcharge (15% percentage)
- Condition: Day of Week, Equals,
Saturday,Sunday