Skip to content

Rules engine

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.

Each rule is triggered by one or more conditions. The available condition types are:

ConditionDescriptionExample
PostcodeMatch on the delivery postcode or a range of postcodes.Free shipping to postcodes 2000–2099
StateMatch on the delivery state (NSW, VIC, QLD, etc.).Disable express couriers for WA deliveries
WeightMatch on the total cart weight (kg).Add a $10 surcharge for orders over 50kg
CostMatch on the cart subtotal (AUD).Free shipping on orders over $150
Product SKUMatch on specific product SKUs in the cart.Use a fixed shipping price for bulky items
QuantityMatch on the total number of items in the cart.Flat-rate shipping for single-item orders

When a rule’s conditions are met, one or more actions are applied:

ActionDescription
Hide courierRemove a specific courier from the checkout options.
Show only courierShow only the specified courier(s), hiding all others.
Add surchargeAdd a fixed dollar amount or percentage to the courier’s quoted price.
Apply discountReduce the quoted price by a fixed amount or percentage.
Set fixed priceOverride the courier’s quoted price with a fixed amount.
Free shippingSet the shipping price to $0 for matching couriers.
  1. Open the rules settings

    In your Shopify admin, go to AppsTransdirectRules.

  2. Add a new rule

    Click Add Rule. Give the rule a descriptive name (e.g. “Free shipping over $100 to metro areas”).

  3. 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.

  4. 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).

  5. 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.

  6. Save the rule

    Click Save. The rule takes effect immediately for new checkout sessions.

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.

PriorityRuleAction
1Free shipping to postcode 2000Set price to $0
2$5 surcharge for NSWAdd $5 surcharge
3Hide express for orders under 5kgHide 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.

For stores with complex shipping requirements, you can import rules in bulk via CSV rather than creating them one at a time.

  1. 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).

  2. 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.

  3. 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.

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