Transfer Order Automation — Daily Overflow → Sydney Replenishment

Sydney takes customer orders it cannot fill from its own stock, while the spare stock sits in the Overflow warehouse. Once a day at close of business this automation reads what Sydney is short, finds that stock in the Overflow bins, and raises the Transfer Orders that move it — so a planner no longer reconciles spreadsheets by hand.

System: Transfer Order Automation (Asana "[Bonded WH/Overflow] TO Automation", BE-3412)

Source repository (read-only): lifeinteriors/transfer-order-automation-s10

Source of truth for intent: the Asana task — Definitions, rules BR-01…BR-13, Examples 1–4

Per the access policy, the logic is recorded here, not changed in the source repository, 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 (inputs, processing, edge cases, defects) and Diagram. Everything above the switcher shows in all three.

⚠️ Status: draft — the logic below is not deployed. Production reads the three saved searches and stops there. The allocation engine, the amend path and the shortfall alert all live on an unmerged branch. This entry describes intended, working-in-sandbox behaviour, not deployed behaviour — which is why it is draft and not active (CONVENTIONS.md §9). The developer reading has the detail.

Rules & IDs

Six rules, each with a stable anchor in the business reading, so links survive heading edits (CONVENTIONS.md §5).

Rule ID Rule Reading
LI-BL-INV-001 What gets replenished, and how much Business logic
LI-BL-INV-002 Whole bins, closest fit Business logic
LI-BL-INV-003 Overflow before Bonded Business logic
LI-BL-INV-004 Move what there is, flag the rest Business logic
LI-BL-FUL-004 Add to an open order before raising a new one Business logic
LI-BL-FRT-002 One shipment, one truckload Business logic

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


Project owner
Kim Hoang Nguyen
Developer
Julian Ayoub
For department
Fulfilment Team
Status
draft
Documented
created 2026-08-17 · updated 2026-09-28this registry entry
Script created / updated
updated 2026-08-17from GitHub — main HEAD
Verified against production
2026-08-17807826a · 47c0845 · 47c0845 · 47c0845
Systems touched
aws-lambdanetsuiteaws-eventbridgeaws-sesaws-secrets-manager
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. Every evening the system looks at what Sydney is short, finds that stock in the Overflow warehouse, and raises the paperwork to truck it over — flagging anything it can't cover.

Why it exists. Sydney can't fulfil orders it doesn't have stock for, and the stock is often already in the business, just in the wrong warehouse. Done by hand it means a planner reconciling reports daily; it gets skipped, and customers wait for stock the company already owns.

When it runs. Once daily, at close of business, automatically. Nobody triggers it.

Who it affects. The inventory planner (who receives the shortfall alerts), the Overflow and Sydney warehouse teams (who pick and receive against the Transfer Orders), and — indirectly — every customer waiting on a backordered item.

How it decides.

  • What Sydney is short of today, item by item — that number is the demand, and nothing else.
  • Where that stock sits. Overflow is drained first; the bonded warehouse in Vietnam covers only what Overflow cannot, because it is six weeks away rather than one.
  • Which bins to take it from — whole bins, closest fit. Sydney usually receives more than it was short, and that surplus is intended.
  • What it cannot cover at all. That difference is emailed to the planner rather than quietly dropped.
  • Where the movement goes: onto an open Transfer Order that is still amendable if one exists, otherwise onto a new one.
  • How much fits. One Transfer Order is one truckload, so a load past the cap splits.

Outcomes. A Transfer Order is raised · an existing open order is added to · a shortfall is emailed to the planner · nothing happens, because the stock is already on its way.

What gets replenished, and how much LI-BL-INV-001

Every item Sydney is short of is a candidate, with no exclusions. The quantity to move is what is still outstanding after anything already on its way is taken into account.

# If… Then… Because
1 Sydney is short of an item It is a candidate to move from Overflow That is the whole purpose
2 The shortage is zero or less Nothing happens for that item There is nothing to send
3 The stock is already on an open Transfer Order It is not moved again Otherwise the same stock is ordered every night

Whole bins, closest fit LI-BL-INV-002

The system works in quantities, never in bin locations. It picks the tightest-fitting bin and moves all of it.

# If… Then… Because
1 One bin holds enough to cover the shortage The smallest bin that still covers it is chosen Leaves the big bulk bins intact for larger jobs later
2 A bin is chosen The whole bin moves, not just the shortfall Emptying a bin is cleaner for the warehouse, and the extra stock in Sydney is accepted on purpose
3 No single bin covers the shortage Whole bins are combined, biggest first, until covered Fewest bins disturbed
4 Any bin is chosen The bin is never named on the Transfer Order The warehouse picks the physical bin when it picks the stock

Overflow before Bonded LI-BL-INV-003

Two warehouses can supply Sydney, and they are days versus weeks apart. They are drained in a fixed order and never travel together.

# If… Then… Because
1 The item is in Overflow Overflow is used first It is a local truck movement, about a week
2 Overflow can't cover it all and Bonded can Bonded covers only the remainder Bonded is Vietnam — roughly six weeks
3 Both warehouses supply the same order Each raises its own Transfer Order One shipment cannot come from two warehouses

Move what there is, flag the rest LI-BL-INV-004

The automation never waits for perfect coverage and never silently skips an item.

# If… Then… Because
1 The warehouses together can't cover the shortage Everything available is moved anyway Partial is better than nothing
2 Anything is left uncovered The planner is emailed the gap A human has to source it another way
3 The run is otherwise clean The shortfall email is still sent It is an operational alert, not an error report

Add to an open order before raising a new one LI-BL-FUL-004

Fewer, fuller shipments. Existing orders are added to wherever they have room, and nothing already booked is ever taken back.

# If… Then… Because
1 An open order already carries this item and has room The quantity is added to that line Keeps an item on one shipment instead of scattering it
2 An open order has room It is added to the tightest-fitting one Fewer shipments, fewer trucks
3 It would take three or more open orders to fit A new order is raised instead Splitting a line across three shipments helps nobody
4 Demand later drops, because an order was cancelled The Transfer Order is left alone Stock is never clawed back mid-flight
5 The team has already handled an order It is locked — nothing is added A shipment being picked must not change underneath the warehouse

One shipment, one truckload LI-BL-FRT-002

A Transfer Order is one shipment, and one shipment is one truck.

# If… Then… Because
1 Everything fits one truckload One Transfer Order A shipment is a truck
2 A single item's volume exceeds a truckload It is split across the fewest new orders that will hold it It physically will not fit
3 Adding to an open order would overfill it The addition is refused A truck that cannot be loaded is worse than a second truck

What people get wrong

  • "The system tells the warehouse which bin to pick from." It does not. The bin is never written onto the Transfer Order — only how many. The warehouse picks the physical bin at fulfilment.
  • "Sydney gets exactly what it was short." It usually gets more. Whole bins move, so if Sydney is short 2 and the bin holds 4, all 4 travel. That surplus is intentional, not an error.
  • "A shortfall email means the run failed." It didn't. The stock that was available has been moved; the email is only about the remainder.
  • "If it's on a Transfer Order, it's on its way." An order sits awaiting approval until someone approves it. Until then it is a plan, not a movement.
  • "Bonded stock arrives with the rest." Bonded is Vietnam — six weeks, not one. An order split across both warehouses arrives as two very different shipments.

Manual steps

Step Who When What happens if skipped
Act on the shortfall email Inventory Planner Whenever a run can't fully cover an item The gap persists silently; the customer keeps waiting and nothing escalates
Clear the approval marker once the order is handled Fulfilment team After dealing with a Transfer Order The automation keeps treating it as open and may keep adding lines to it
Deploy the NetSuite-side scripts Backend Whenever the write script changes The automation calls an old script; new fields and guards silently don't apply

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
Qty demand from sales order How many units Sydney is short across its open sales orders. This is the quantity moved. Nothing else sets it. needs confirming
Item internal ID Which product the shortage is for. Identifies which product is short. If it does not resolve, the item is reported as a total shortfall (defect D1). needs confirming
Qty available from Bin How many units are sitting in one Overflow bin. Raw on-hand in one Overflow bin. Caps how much can move from that bin. needs confirming
Qty allocated from sales order Recorded label says allocated to SALES orders, but the automation uses this value as stock already on open TRANSFER orders. Unresolved — see defect D2. Subtracted from bin stock so stock already on an open order is not moved twice. If it is missing it defaults to zero and the same stock moves nightly (defect D2). needs confirming
CBM from Item record The volume of one unit of the item. Volume of one unit. Multiplied by quantity to test the 15 CBM truck cap. needs confirming
Bin location Which warehouse and bin the stock is sitting in. Decides which warehouse supplies the line, and therefore the lead time — 7 days from Overflow, 42 from Bonded. needs confirming
Transfer Order Approval Whether the team has dealt with this transfer order yet. Only orders still awaiting approval can be added to. Anything else is locked. needs confirming
Total CBMTransfer Order Total volume of everything on the order. Recalculated when lines are added, and the addition is refused if it would exceed one truckload. 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
LocationTransfer Order The warehouse the stock is taken from. Overflow or Bonded. Never mixed on one order, and it sets the lead time. confirmed
To LocationTransfer Order The warehouse the stock is sent to. Always Sydney. Not checked when picking an order to add to, which is defect D3. confirmed
Transfer Order ApprovalTransfer Order Whether the team has dealt with this transfer order yet. While it reads Pending Approval the automation may still add lines. Once the team changes it, the order is locked and further additions are refused. confirmed
Override Lead Time (Days)Transfer Order How long the stock is expected to take to arrive. Sets the expected due date — 7 days from Overflow, 42 from Bonded. confirmed
DateTransfer Order The date the transfer order is raised. Must be sent US-format or the order fails to save. confirmed
Total CBMTransfer Order Total volume of everything on the order. Recalculated when lines are added, and the addition is refused if it would exceed one truckload. confirmed
Commitment ConfirmedTransfer Order (line) Locks the stock to this order so it is not reallocated elsewhere. Set on every line so the allocation engine does not release the stock. confirmed