Shipping Automation — Module 5: Courier Approval & Set Ship Date

System: Shipping Automation (Module 5 / Asana "Part 2")

Source repositories (read-only): lifeinteriors/shipping-v6-nswo, lifeinteriors/shipping-v6-swo

Source of truth for intent: Miro board "Module 2 V6.1 — Courier Approval & Set Ship Date"

Status: Documented from code + Miro board + live saved-search data + fulfilment schedule sheet.

This entry captures the business logic of the courier-approval automation. Per the access policy, the logic is recorded here, not changed in the source repositories, and no source code is stored here — only described and linked. See CONVENTIONS.md for how entries are structured.

Readings (per CONVENTIONS.md §8): this entry is served as three tabs — Business logic (readable with zero system access), Developer (rules, edge cases, failure modes) and Diagram. Everything above the switcher shows in all three. The front-matter is the machine-readable layer that feeds registry-index.json.

Rules & IDs

This file documents one integration made of four rules. Each has a stable anchor under its rule in the business reading, so links survive heading edits (CONVENTIONS.md §5).

Rule ID Rule Where
LI-BL-FUL-001 Which pile an order goes in Business logic
LI-BL-FUL-002 Orders that travel together Business logic
LI-BL-FRT-001 Picking the courier Business logic
LI-BL-FUL-003 Picking the day Business logic

Rule IDs are domain-coded, so FRT (freight) and FUL (fulfilment) IDs both appear here even though the file's primary domain is fulfilment (CONVENTIONS.md §4).


Project owner
Kim Hoang Nguyen
Developers
Yvonne Kotevski
Sushil Adhiraki
For department
Fulfilment Team
Status
active
Documented
created 2026-08-04 · updated 2026-09-28this registry entry
Script created / updated
updated 2026-07-21from GitHub — newest HEAD across both repos
Verified against production
2026-08-040ed5ee9 · 69029d7
Systems touched
aws-lambdanetsuitedetrackgoogle-sheetsaws-s3
Rules
Terms

Three readings of the same rules. Nothing is duplicated between them. Printing gives you the business reading followed by the diagrams.

Written for the business — no field IDs, no script names, no system jargon.

What it does. When a customer's order is paid and ready, the automation decides which courier should carry it and what date it ships, writes the approval back to NetSuite, and sets aside only the orders that don't fit the rules for a human to review.

Why it exists. Choosing a courier and a delivery day by hand, for every paid order, is slow and inconsistent — and each of the ways it goes wrong costs money. Part-delivering an order that was meant to travel together creates a redelivery. Booking a group that cannot ship complete wastes the truck slot. Arriving before the customer asked for is a failed delivery in the same way arriving late is. Deciding by rule makes the same call every time, and leaves a person to handle only the orders the rules genuinely cannot settle.

Who it affects. The fulfilment team feels it first: everything the automation holds lands in their review queue, and the courier schedule sheet it reads is theirs to maintain. The customer gets the delivery date it picks. Couriers and the Life truck runs get the volume it books against them.

When it runs. On a schedule, as two AWS Lambda functions: Flow 1 (nswo) runs first, then Flow 2 (swo). An order is eligible only when it is paid in full, not on hold, not already booked or approved or closed, carries no drop-ship items, holds only Standard or 2-Man goods, has no ship date already set in the past, and still has something to send. A send all together order also waits until every item across the linked orders is in stock. The run frequency is not recorded here — needs confirming.

How it decides.

  • Which pile the order belongs in — sent as it becomes available, or held until the whole order can travel in one go. That decides which of the two flows handles it.
  • What the customer paid for — Standard, 2-Man or Full Service — which fixes the list of couriers to try, in preferred order.
  • Whether each courier in that list covers the delivery postcode. The first that does wins; if none do, the customer's checkout pick is used, and if there wasn't one, the order is held.
  • Whether any item needs two people to handle it. One such item upgrades the whole order to 2-Man.
  • The earliest sensible day, respecting the courier's notice period, the customer's requested date, and — for Life trucks — whether that region's truck still has room. NSW and ACT ship and deliver the same day; QLD and VIC go on the weekly linehaul.
  • Anything the rules cannot settle is left for a person rather than guessed at.

It is delivered as two AWS Lambda functions with near-identical architecture, split by order type:

Repository Order type Ship Complete Service levels Order handling
shipping-v6-nswo Non-Ship-Whole-Order No Standard, Two Man Each order processed independently
shipping-v6-swo Ship-Whole-Order Yes Two Man, Full Service Related orders merged and shipped together

The two flows run as one system: Flow 1 (nswo) runs first, then Flow 2 (swo). An order can be promoted from Flow 1 to Flow 2.

In one line: the system looks at orders that are ready, works out the best courier and delivery day for each, and books it in automatically — asking a person to step in only when an order doesn't fit the rules.

Both repositories are read-only. Unlike the Celigo entries, this logic is under version control, so drift is detectable: compare the commits in Where this runs above against each repository's HEAD. That is why this entry carries no review_cycle — it does not need a clock to know when it has gone stale.

The two piles of orders

  • Send as it's ready — parts of the order can go out as stock lands (Ship Complete = No).
  • Send all together — the customer's whole order must arrive in one go (Ship Complete = Yes).

An order can move from the first pile to the second if it's meant to travel with another order. The "send all together" pile is always handled second.

When an order is "ready" (all must be true)

  • Paid in full (nothing owing)
  • Not on hold
  • Not already booked with a courier
  • Not already approved or closed
  • No drop-ship items
  • Items are Standard or 2-Man goods
  • No ship date already set in the past
  • At least one item still to send

A "send all together" order also waits until every item across the linked orders is in stock.

Picking the courier

The paid service level (Standard / 2-Man / Full Service) sets the list of couriers to try, in preferred order. For each, the system checks whether it covers the delivery postcode; the first that covers it wins.

  • If none cover it → use the courier the customer picked at checkout, unless that was "To Be Confirmed", in which case hold the order for review.
  • If a Standard order contains an item needing 2-Man handling → upgrade the whole order to 2-Man.

Picking the day

Earliest sensible day, respecting the courier's notice period, the customer's requested date, and (for Life trucks) whether the truck for that region still has room that day.

  • NSW / ACT (local): ship and deliver on the same day.
  • QLD / VIC (interstate): goods travel by linehaul, so the ship date is set to the weekly linehaul day — Tuesday for Brisbane, Thursday for Melbourne.
  • Other states on a Life truck: not supported — left for review.

Outcomes. Approved · Approved (upgraded to 2-Man) · Approved (customer's online pick) · Held for review · Waiting (missing stock — nothing is booked, and the order is retried next run).

Which pile an order goes in LI-BL-FUL-001

Every ready order is either sent as it becomes available, or held until the whole order can travel in one go.

# If… Then… Because
1 Parts of the order can go out as stock lands Flow 1 — send as it is ready Stock in hand should not wait on stock that has not landed
2 The customer's whole order must arrive together Flow 2 — send all together, handled second Part-delivering a modular sofa creates a redelivery
3 A Flow 1 order is meant to travel with another order Moved to Flow 2, picked up on the next run Two linked orders must land on the same truck on the same day
4 Any item across the linked orders is not yet in stock The whole group waits, nothing is booked Booking a group that cannot ship complete wastes the slot

Picking the courier LI-BL-FRT-001

The service level the customer paid for sets a list of couriers to try in preferred order. Each is checked against the delivery postcode; the first that covers it wins.

# If… Then… Because
1 A courier in the list covers the postcode That courier is approved Preferred order runs cheapest-capable first
2 No courier covers the postcode, and the customer picked a real courier at checkout The customer's pick is approved An address we cannot service is still a promise made
3 No courier covers the postcode and the checkout pick was "to be confirmed" Held for review Nobody has chosen a carrier yet — a person must
4 A Standard order contains an item needing 2-Man handling The whole order is upgraded to 2-Man One heavy item makes the whole delivery a two-person job

Picking the day LI-BL-FUL-003

The earliest sensible day that respects the courier's notice period, the customer's requested date, and — for Life trucks — whether the truck for that region still has room.

# If… Then… Because
1 Delivery is in NSW or ACT on a Life truck Ship and deliver on the same day Local runs leave and arrive the same day
2 Delivery is in QLD on a Life truck Ship on the weekly Brisbane linehaul day — Tuesday Interstate goods travel by linehaul, which departs weekly
3 Delivery is in VIC on a Life truck Ship on the weekly Melbourne linehaul day — Thursday Same reason, different departure day
4 The customer asked for a later date than the earliest available The customer's date becomes the floor Arriving early is a failed delivery too
5 The order does not fit the truck's remaining capacity that day The next day that fits is used Cubic capacity is the hard limit on a truck run
6 Delivery is on a Life truck to any other state Not supported — left for review No Life truck route serves those states

Planned change — not yet live. A revised date model works out the ship date first and derives the delivery date forward from it, dropping the fixed Tuesday/Thursday linehaul days. Until it ships, the rules above are what runs. The detail is in the developer reading.

Orders that travel together LI-BL-FUL-002

When one purchase is split across several orders, they are grouped and treated as one delivery.

# If… Then… Because
1 An order points at another order it must ship with Both, and anything they chain to, form one group A three-piece sofa across two orders is one delivery
2 The group is approved The same courier and dates are written to every order in it The orders must not drift apart afterwards
3 Orders in the group have different requested dates The latest requested date across the group applies Nothing in the group may arrive before the customer wants it
4 A linked order is not in the day's list It is fetched anyway so the group is complete A partial group would be booked on partial capacity

Related rules

None recorded. The related field for this entry is empty — links are kept in both directions, so the first cross-reference is added to both entries at once.


Field registry

Every field this automation reads or writes, by the name it carries in the system — what it means, and what changes when it changes. Field ids are in the developer reading.

Inputs — what it reads

Values the automation looks at to make its decision. Change one of these and the decision changes.

FieldWhat it meansWhat it changesStatus
Ship Together With This Sales OrderSales Order Another sales order this one must be delivered with. Links an order to another it must travel with. Present only in the swo search, which is what promotes an order from Flow 1 to Flow 2 and builds the group. confirmed
Courier Service LevelSales Order The delivery service the customer paid for — Standard, 2-Man or Full Service. The level the customer paid for. Selects which list of couriers is tried, and in what order. confirmed
Shipping PostcodeSales Order The postcode the order is being delivered to. Checked against each courier's coverage list. The first courier that covers it wins. confirmed
Shipping StateSales Order The state the order is being delivered to. Decides local versus interstate. NSW and ACT ship and deliver the same day; QLD and VIC go by linehaul. confirmed
Customer Requested Delivery Date OnwardsSales Order The date the customer asked to receive the order on or after. Sets a floor on the delivery date. Blank means the courier's notice period governs instead. For a merged group the latest date across the group applies. confirmed
Default Shipping Method from Item recordInventory Item How the item is normally sent — standard goods, or goods needing two people to handle. The item mix decides routing, and a single 2-Man item upgrades the whole order. confirmed
CBM from Item recordInventory Item The volume of one unit of the item. Multiplied by committed quantity to give the order's volume, which is checked against the truck's remaining capacity. confirmed
Qty committed at SO line itemSales Order line How many units on the order line are in stock and reserved for it. A swo group only proceeds when every item across every linked order is committed. One short piece holds the whole group. confirmed
Life Truck RegionSales Order Which Life truck run covers the delivery address. Picks which Life truck run the order belongs to, and therefore which day's capacity is checked. confirmed
Ship ViaSales Order The courier booked to carry the order. Read as the customer's checkout pick when no courier covers the postcode, and written with the chosen courier on approval. confirmed

Outputs — what it writes

Values the automation puts back. Everything downstream of this rule reads them, so a wrong value here travels.

FieldWhat it meansWhat it changesStatus
Ship ViaSales Order The courier booked to carry the order. Read as the customer's checkout pick when no courier covers the postcode, and written with the chosen courier on approval. confirmed