Rules engine
Overview
Section titled “Overview”The rules engine lets you define conditions that modify shipping behaviour at checkout. Rules can hide or show specific couriers, add surcharges, apply discounts, or set fixed shipping prices — all based on the contents of the customer’s cart or their delivery address.
Rules are evaluated in priority order, and the first matching rule wins. This gives you fine-grained control over the shipping options your customers see.
Rule conditions
Section titled “Rule conditions”Each rule is triggered by one or more conditions. The available condition types are:
| Condition | Description | Example |
|---|---|---|
| Postcode | Match on the delivery postcode or a range of postcodes. | Free shipping to postcodes 2000–2099 |
| State | Match on the delivery state (NSW, VIC, QLD, etc.). | Disable express couriers for WA deliveries |
| Weight | Match on the total cart weight (kg). | Add a $10 surcharge for orders over 50kg |
| Cost | Match on the cart subtotal (AUD). | Free shipping on orders over $150 |
| Product SKU | Match on specific product SKUs in the cart. | Use a fixed shipping price for bulky items |
| Quantity | Match on the total number of items in the cart. | Flat-rate shipping for single-item orders |
Rule actions
Section titled “Rule actions”When a rule’s conditions are met, one or more actions are applied:
| Action | Description |
|---|---|
| Hide courier | Remove a specific courier from the checkout options. |
| Show only courier | Show only the specified courier(s), hiding all others. |
| Add surcharge | Add a fixed dollar amount or percentage to the courier’s quoted price. |
| Apply discount | Reduce the quoted price by a fixed amount or percentage. |
| Set fixed price | Override the courier’s quoted price with a fixed amount. |
| Free shipping | Set the shipping price to $0 for matching couriers. |
Creating a rule
Section titled “Creating a rule”-
Open the rules settings
In your Shopify admin, go to Apps → Transdirect → Rules.
-
Add a new rule
Click Add Rule. Give the rule a descriptive name (e.g. “Free shipping over $100 to metro areas”).
-
Set the conditions
Choose one or more condition types and enter the matching values. For postcode ranges, use a hyphen (e.g.
2000-2099). For multiple values, separate with commas. -
Define the action
Select the action to apply when the conditions are met. Configure the action parameters (e.g. surcharge amount, fixed price, or which couriers to hide).
-
Set the priority
Assign a priority number to the rule. Lower numbers have higher priority. When multiple rules match, the highest-priority rule is applied.
-
Save the rule
Click Save. The rule takes effect immediately for new checkout sessions.
Rule priority
Section titled “Rule priority”Rules are evaluated from highest priority (lowest number) to lowest priority. When a customer’s cart and delivery address match multiple rules, only the highest-priority rule is applied.
| Priority | Rule | Action |
|---|---|---|
| 1 | Free shipping to postcode 2000 | Set price to $0 |
| 2 | $5 surcharge for NSW | Add $5 surcharge |
| 3 | Hide express for orders under 5kg | Hide express couriers |
In this example, a delivery to postcode 2000 would get free shipping (priority 1), even though the NSW surcharge rule (priority 2) also matches.
Bulk import rules
Section titled “Bulk import rules”For stores with complex shipping requirements, you can import rules in bulk via CSV rather than creating them one at a time.
-
Download the template
From the Rules settings page, click Export to download a CSV template with your existing rules (or an empty template if you have none).
-
Fill in the rules
Open the CSV in a spreadsheet application and add your rules. Each row represents one rule with columns for name, conditions, action, and priority.
-
Import the CSV
Upload the completed CSV file through the Import button on the Rules settings page. Existing rules with the same name will be updated; new rules will be created.
Common rule examples
Section titled “Common rule examples”Free shipping on orders over $150
- Condition: Cost greater than $150
- Action: Free shipping
- Priority: 1
Flat-rate shipping to remote postcodes
- Condition: Postcode in range 0800–0899 (NT remote)
- Action: Set fixed price $25
- Priority: 2
Disable express for heavy orders
- Condition: Weight greater than 30kg
- Action: Hide courier (express services)
- Priority: 3
Surcharge for bulky product SKU
- Condition: Product SKU equals
BULKY-001 - Action: Add surcharge $15
- Priority: 2
Next steps
Section titled “Next steps”- Manage courier settings to control which couriers are available and how they are displayed
- Configure order boxing to optimise packing for multi-item orders