v0.7.0 — draft
The ACFS VBS Pickup Portal is a web-based system for managing container pickup bookings at ACFS facilities. It enables logistics service providers to view shipments, delegate pickup authority, book pickup slots, manage documentation, and make payments — with ACFS staff overseeing operations, slot configuration, and verification.
Core registered user. Umbrella term covering NVOCC, wholesale Freight Forwarder, Freight Forwarder, Transporter, Farmers, and Customer/Clearing agents. Each LSP sees only shipments allocated to them. Can delegate to another LSP or a one-off P4TC. Replaces the previous WFF/FF/Carrier actor split. Note: roles are contextual per HBL — the same organisation can appear at different levels (e.g. top-level party on one HBL, delegatee on another). Visibility and role enforcement must be HBL-scoped, not user-scoped.
Authentication: Username + password. Created by ACFS admin in the portal.
Responsibilities:
Tertiary/one-off user with no portal credentials. Receives email with shipment roster and document portal URL. No persistent account or history. Replaces previous "One-off Customer" and "Freight Forwarder" (magic-link) actors.
Authentication: Magic link + OTP. No login required — clicks link from email, verifies via OTP. Portal access scoped to assigned shipments only. Link expires on collection.
Responsibilities:
Secondary user. No portal access. No direct system communication — the booking party manages driver rostering externally and forwards booking details to the driver.
Authentication: No portal auth. No system emails. Booking party forwards confirmation externally.
Responsibilities:
Internal ACFS staff. Two sub-roles: Admin (full privileges) and User (predefined/restricted privileges). Manages HBL assignment, slot configuration, booking operations, DO validation, pickup verification, and user management.
Authentication: SSO-based access. Admin and User sub-roles with predefined privileges.
Responsibilities:
ACFS gatehouse staff who verify and confirm physical vehicle entry/exit for pickups. Part of the Pickup Verification flow.
Authentication: SSO via OAuth/Okta.
Responsibilities:
Primary tracking unit for a shipment. Sourced from Maximus via periodic batch (once or twice daily). Two orthogonal dimensions: milestone (physical progress) and HBL status (delegation/booking state). HBLs exist in a hierarchy: AGS issues master HBLs (often 500-prefix), freight forwarders issue lower-level HBLs (e.g. 4033-prefix for Mondial). Mostly 1:1 parent-child relationship. The portal primarily deals with the lowest-level HBL as the primary identifier. Full audit trail lives on HBL — shows all hops, delegation chain, assignment changes, and status transitions.
Key Fields:
| Field | Type | Description |
|---|---|---|
| hbl_number | string | Primary identifier — lowest-level house bill number from Maximus. |
| alt_hbl_reference | string | Alternative/parent HBL reference (e.g. AGS master HBL). Optional — present when hierarchy exists. Relationship established via AGS data feed, not Maximus. ⚠️ Exact data source for HBL hierarchy relationship TBD — Matt and William resolving (OQ-034). |
| container_number | string | Container reference — ties HBL to the top-level container. |
| ocean_bl | string | Ocean bill of lading. Multiple containers may share one ocean BL. |
| consignee | string | Next party in the chain. Data source is AGS feed (not ICS/Maximus — too inconsistent). Identified by account name or account code. |
| weight_kg | number | Weight measurement for fee calculation. |
| volume_m3 | number | Volumetric measurement for fee calculation. |
| chargeable_weight | number | Max of weight vs volume per HBL. Used for fee calculation: chargeable_weight × rate. Calculated and stored as a field. |
| quantity | number | Number of packages (e.g. 3 boxes). Optional — may not be required for decision-making. |
| pack_type | string | Package type description. Optional — may not be required for decision-making. |
| description | string | Goods description. Two source fields exist in Maximus: "description" and "marks and numbers" — may consolidate. |
| milestone | 'on_vessel' | 'at_wharf' | 'in_yard' | 'unpacked' | 'collected' | Physical progress milestone. Linear progression. Sourced from Maximus batch sync. |
| hbl_status | 'unassigned' | 'assigned' | 'delegated' | 'booked' | Delegation/booking status. Separate dimension from milestone. "assigned" means allocated to an LSP. "delegated" means LSP has passed to another party. "booked" means pickup is scheduled. |
| customs_clearance_status | string | Customs clearance state including quarantine. Must be fully cleared (not partial) for booking. Shown in HBL table. Sourced from Maximus — update frequency from ICS unclear. |
| under_bond | boolean | Flag — NOT a lifecycle state. Goods moving between bonded facilities before customs clearance (Australian Border Force customs bond). Manually set by LSP/ACFS in portal. Movement permission replaces DO requirement. Not synced from Maximus. |
| under_bond_verified | boolean | Whether ACFS has verified the under-bond marking. Verification happens outside the portal; portal records the result. Set by ACFS staff only. |
| storage_fee_flag | boolean | Visual indicator that storage fees apply. Derived from last_free_storage_date — auto-calculated, not manually set. |
| last_free_storage_date | date | Last date of free storage. After this date, storage_fee_flag is automatically set to true. Sourced from Maximus or set by ACFS. |
| release_type | 'do_required' | 'free_release' | Determines DO requirements. Phase 1 supports two types: "do_required" (default — DO must be uploaded and validated) and "free_release" (no DO needed for that tier). Under-bond HBLs skip DO requirement entirely via the under_bond flag. |
| assigned_lsp | string | LSP this HBL is allocated to. Set by ACFS during HBL/WFF assignment or auto-assigned from data. |
Lifecycle States:
⚠️ Milestones only — delegation and booking are tracked via hbl_status, a separate dimension. Delegation can happen at any milestone (BR-001). Booking requires milestone "unpacked" or later (BR-001).
Transitions:
| From | To | Trigger | Guard |
|---|---|---|---|
| on_vessel | at_wharf | Vessel arrives at port | Maximus batch sync |
| at_wharf | in_yard | Container moved to yard | — |
| in_yard | unpacked | Container unpacked at warehouse | — |
| unpacked | collected | Goods physically picked up from warehouse | Booking in "processed" state + gatehouse confirms exit |
Groups one or more HBLs into a pickup window with driver/truck details. Created by LSP or P4TC. No truck type distinction for Phase 1 — booking party is responsible for bringing the correct truck. Slim audit trail at booking level (created, payment confirmed). Full hop history lives on the HBL entity instead. "Collected" status is derived — booking becomes collected when all its HBLs reach the "collected" milestone (no manual status change).
Key Fields:
| Field | Type | Description |
|---|---|---|
| booking_id | string | System-generated unique reference number. |
| pickup_window | PickupWindow | Selected date/time slot. |
| hbl_ids | string[] | HBLs included in this booking. Can span multiple LSPs. |
| driver_name | string | Driver performing pickup. |
| driver_license | string | Driver license number. |
| truck_rego | string | Vehicle registration. |
| fee_amount | number | Sum of (chargeable_weight × rate) per HBL + minimum charge. Backend-calculated and returned per HBL from the API. Rate and minimum charge are backend-configurable. Frontend displays calculated values only — no fee logic in frontend. |
| booking_party | string | LSP or P4TC who created the booking. |
| tc_accepted | boolean | Whether booking party accepted terms and conditions. |
| site_induction_accepted | boolean | Whether driver site induction was acknowledged. Skipped if driver already has site_induction = true. |
Lifecycle States:
⚠️ "collected" is a derived status — automatically set when all HBLs in the booking reach the "collected" milestone. No manual status change.
Transitions:
| From | To | Trigger | Guard |
|---|---|---|---|
| draft | booked | LSP or P4TC confirms, accepts T&Cs + site induction, and pays | All HBLs at milestone "unpacked" or later + fully customs cleared + release conditions met + missing docs uploaded + T&Cs accepted |
| booked | pending_processing | ACFS staff begins pickup verification | — |
| pending_processing | processed | ACFS validates DOs + audit tracking and marks ready. Partial processing allowed — clear HBLs proceed, blocked ones rebook separately. | — |
| processed | collected | Gatehouse confirms vehicle exit | — |
| booked | cancelled | LSP or ACFS cancels booking. Cancellation reason required (ACFS). Refund processed outside system. | — |
A configurable time window at a specific site. Configured by ACFS admin. No truck type distinction for Phase 1. Default granularity is hourly (1-hour slots) — ACFS configures available hours per day. Visual presentation uses primary color with varying opacity levels to show booking density per slot without exact numbers.
Key Fields:
| Field | Type | Description |
|---|---|---|
| slot_id | string | System-generated unique ID. |
| site | string | Physical site/location for pickup (references site entity). |
| days_of_week | string[] | Days this slot template applies to (e.g. Monday-Friday). |
| start_time | time | Slot start time. |
| end_time | time | Slot end time. |
| booking_cutoff | { relative_day: string, time: string } | Booking cutoff — relative day (e.g. "previous_working_day", "same_day") + time (e.g. "16:00"). Bookings not accepted after this point. |
| change_cutoff | { relative_day: string, time: string } | Change cutoff — same format as booking cutoff. Changes to slot/date/HBLs not allowed after this point (truck/driver changes exempt). |
| heat_map_threshold | number | Threshold value for density indicator. Primary color with varying opacity levels applied to slot cards (low opacity = empty, high opacity = busy). No exact booking counts shown. Nice-to-have for Phase 1. |
| is_blocked | boolean | Whether slot is blocked due to holiday/blackout date. |
Lifecycle States:
Transitions:
| From | To | Trigger | Guard |
|---|---|---|---|
| active | blocked | ACFS adds blackout/holiday date | — |
| blocked | active | ACFS removes blackout/holiday date | — |
| active | past | Slot end time passes | — |
Physical warehouse/pickup location. Seeded directly in the database — no admin CRUD UI for Phase 1.
Key Fields:
| Field | Type | Description |
|---|---|---|
| site_name | string | Human-readable site name (e.g. "Port Botany Warehouse"). |
| branch_code | string | Branch code (e.g. "SY", "MB", "BR"). Multiple sites can share a branch code. |
Lifecycle States:
⚠️ Static entity — DB-seeded, no state transitions in Phase 1.
Saved driver details for reuse across bookings. Built up organically by booking parties — no pre-population. Scoped per LSP account — drivers are NOT globally visible across accounts.
Key Fields:
| Field | Type | Description |
|---|---|---|
| driver_name | string | Driver full name. |
| driver_license | string | Driver license number. Paired with name. |
| truck_rego | string | Default vehicle registration. |
| site_induction | boolean | Whether driver has completed site induction. If true, site induction acceptance is skipped during booking. |
Lifecycle States:
⚠️ Static entity — created during booking flow, no state transitions.
Document required per HBL for pickup authorization. One-to-many relationship: each HBL can have multiple DOs (one per delegation tier in the hierarchy). Each DO is validated individually by ACFS. Uploaded by LSP or P4TC, validated by ACFS. Each tier in the HBL hierarchy uploads independently — no inheritance. Free release removes the DO requirement for that tier. Under-bond HBLs skip DO requirement entirely.
Key Fields:
| Field | Type | Description |
|---|---|---|
| do_id | string | System-generated unique ID. |
| hbl_id | string | HBL this DO belongs to. |
| uploaded_by | string | LSP or P4TC who uploaded the document. |
| upload_date | date | When the DO was uploaded. |
| document_url | string | Stored document reference/URL. |
| tier_level | string | Which level in the HBL hierarchy this DO covers. Each tier uploads independently. |
Lifecycle States:
Transitions:
| From | To | Trigger | Guard |
|---|---|---|---|
| not_provided | uploaded | LSP or P4TC uploads DO document | — |
| not_provided | not_required | HBL has free_release flag or under_bond flag | — |
| uploaded | pending_validation | ACFS begins DO review | — |
| pending_validation | validated | ACFS confirms DO matches HBL details | — |
| pending_validation | flagged | ACFS flags DO as incorrect — requires correction | — |
| flagged | uploaded | LSP or P4TC re-uploads corrected DO | — |
Records the delegation of one or more HBLs from one party to another. Tracks the chain of custody. Can be revoked by ACFS.
Key Fields:
| Field | Type | Description |
|---|---|---|
| delegation_id | string | System-generated unique ID. |
| delegator | string | LSP or P4TC who initiated the delegation. |
| delegatee | string | Target party — existing LSP (by ID) or new P4TC (by email). |
| delegation_method | 'existing_lsp' | 'one_off_p4tc' | Whether delegating to a registered LSP or creating a one-off P4TC. |
| hbl_ids | string[] | HBLs included in this delegation. |
| created_at | date | When the delegation was created. |
Lifecycle States:
Transitions:
| From | To | Trigger | Guard |
|---|---|---|---|
| active | revoked | ACFS revokes the delegation (acfs:r13) | HBLs revert to delegator |
Primary data source for HBL shipment data. Periodic batch sync from custom cargo table. Portal fetches data starting 7 days before vessel arrival. Provides lowest-level HBL references, weight, volume, customs clearance status, and consignee data. Does NOT provide HBL hierarchy relationships or freight forwarder party assignments.
Key Fields:
| Field | Type | Description |
|---|---|---|
| direction | string | Inbound — Maximus → Portal |
| frequency | string | Batch: once or twice daily. Auto-synced on LSP login. |
| data_provided | string | Lowest-level HBL number, weight, volume, customs clearance status (from ICS — update frequency unclear), consignee, quantity, pack type, description, marks and numbers. |
| data_not_provided | string | HBL hierarchy relationships (parent-child), freight forwarder party assignments, alternative HBL references. |
| status | string | Known — data structure understood. Frontend displays customs status as provided by the API. Staleness is a backend/integration concern. UI shows last sync timestamp if available. |
Lifecycle States:
⚠️ Integration spec — no state transitions.
Provides master HBL references, HBL hierarchy (parent-child relationships), and freight forwarder party data (name, account code). Data is consistent (unlike ICS which has variations across organisations). Matt and William are defining the exact data format and delivery mechanism.
Key Fields:
| Field | Type | Description |
|---|---|---|
| direction | string | Inbound — AGS → Portal |
| frequency | string | TBD — Matt and William resolving (OQ-034). |
| data_provided | string | Master HBL references (500-prefix), HBL hierarchy (parent-child), freight forwarder party assignments (account name, account code), consignee at each level. |
| data_not_provided | string | Lowest-level HBL details (comes from Maximus instead). |
| status | string | BLOCKER — exact data format, delivery mechanism, and frequency TBD. This is the single biggest technical risk. ⚠️ Cannot build auto-assignment or HBL hierarchy without this feed. Matt and William working on it. |
Lifecycle States:
⚠️ Integration spec — no state transitions.
Payment processing for booking fees. Stripe embedded checkout for Phase 1. Payment integration is abstracted behind a single checkout redirect — provider can be swapped later if needed.
Key Fields:
| Field | Type | Description |
|---|---|---|
| direction | string | Outbound — Portal → Stripe |
| frequency | string | Real-time — triggered on each booking. |
| provider | string | Stripe for Phase 1. Abstracted behind checkout redirect so provider can be swapped to Compay or another provider in a later phase. |
Lifecycle States:
⚠️ Integration spec — no state transitions.
Event-driven email notifications sent by the portal.
Key Fields:
| Field | Type | Description |
|---|---|---|
| direction | string | Outbound — Portal → Email |
| triggers | string | Delegation (secure link + OTP), booking confirmation (to account email), booking update (to booking party), booking cancellation (to booking party), DO flagged for correction (to booking party — Phase 1 sends to booking party, future may send to the party who uploaded the DO), user creation (welcome email with signin link). |
| not_sent_to | string | Driver — no system emails. Booking party forwards details externally. |
Lifecycle States:
⚠️ Integration spec — no state transitions.
One-time bulk upload of LSP party data from AGS portal/party manager into the portal local DB.
Key Fields:
| Field | Type | Description |
|---|---|---|
| direction | string | Inbound — AGS → Portal (one-time) |
| frequency | string | One-time bulk upload at system launch. No ongoing sync. |
| data_provided | string | Company name, email, company ID, branch code. |
Lifecycle States:
⚠️ Integration spec — one-time seed, no state transitions.
⚠️ Low priority for Phase 1. Matt indicated this may not be needed if auto-assignment is reliable within the 8-week timeline. Mark as optional.
Preconditions:
Outcome: HBLs are assigned to the target LSP and visible in their shipment list on next login.
Preconditions:
Outcome: Pickup slots are configured and available for LSP/P4TC booking.
⚠️ DO validation can be done by offshore team independently from pickup verification. Same people doing pickup verification can also validate DOs, but DO validation is a separate capability.
Preconditions:
Outcome: DO is marked as validated for that HBL, or flagged for correction.
⚠️ Detailed field-level requirements for this view TBD — to be covered in next session with Matt.
Preconditions:
Outcome: Booking status changed to "processed" and ready for gatehouse collection, or flagged for issues.
Preconditions:
Outcome: Booking is cancelled. HBLs revert. Refund processed outside the system. Booking party notified.
Preconditions:
Outcome: User account is created and active. User can log in.
Preconditions:
Outcome: User details are updated.
Preconditions:
Outcome: User is archived. Cannot log in. No further notifications sent.
Preconditions:
Outcome: Shipments are delegated. Target LSP or P4TC receives email with secure access link. HBL status moves to "delegated".
Preconditions:
Outcome: Booking is confirmed with reference number. HBLs move to hbl_status "booked". Confirmation sent to account email.
Preconditions:
Outcome: Booking is updated with new details. Confirmation sent. If fee changed, payment difference handled.
Preconditions:
Outcome: Booking is cancelled. HBLs revert to previous hbl_status. Refund handled offline by ACFS.
Preconditions:
Outcome: Booking confirmed. Confirmation sent to P4TC email. HBLs move to "booked".
Preconditions:
Outcome: ACFS handles the modification on behalf of the P4TC.
BR-001
Delegation can happen at any milestone — no unpack gate. Booking requires all included HBLs to have milestone "unpacked" or later AND fully customs cleared (including quarantine). This means delegate button is always enabled; book button is gated by milestone + customs clearance.
BR-002
Under-bond HBLs skip the DO requirement. Under-bond is a boolean flag set manually by LSP/ACFS staff in the portal. Not synced from Maximus. Verification happens outside the portal.
⚠️ Under-bond is an LSP/ACFS manual flag — not a lifecycle or automated process.
BR-003
DO rules follow a multi-level hierarchy. Each level uploads its own DO independently — no inheritance or cascading. Bottom-most party must have ALL DOs present across all tiers. Free release removes the DO requirement for that tier.
BR-004
LSP can either delegate or book directly per HBL — never both on the same HBL. Mutual exclusivity enforced at the HBL level.
BR-005
Slot cutoffs are relative day + time (e.g. "previous working day, 4 PM" or "same day, 10 AM"). Booking cutoff and change cutoff configured separately per slot template. Per-site configuration.
BR-006
No-show rebooking: ACFS admin edits the pickup slot (and optionally driver/truck) on the existing booking. No new booking is created. Fee-free for Phase 1. No separate FOC rebook button — uses inline edit on the booking detail view. LSP must call ACFS — no self-service for no-show rebooking.
BR-007
ACFS can partially process bookings — HBLs that have cleared customs proceed while blocked ones are rebooked separately.
BR-009
LSP can only view shipments allocated to them. Shipment visibility is scoped per LSP — no cross-LSP visibility.
BR-010
Data is auto-synced on LSP login and on the next call to the integration layer. No manual refresh needed.
BR-011
Missing doc request aborts the booking process. Booking is blocked (offline) until the DO is received. This is a hard stop, not a warning.
BR-012
Booking confirmation is sent to the account email (LSP) or P4TC email only. No system email is sent to the driver — the booking party forwards the booking reference to the driver externally via their own rostering process.
BR-013
P4TC can delegate shipments further to another P4TC by entering name + email. The new P4TC receives an email with shipment roster and secure link. Chain delegation is supported.
BR-014
ACFS manages user lifecycle: create, update, remove LSP and ACFS internal users. Feature permissions can be configured per user.
BR-015
Booking modifications by external users: truck/driver can be changed at any time until shipment is collected (no cutoff restriction). Slot date/time and HBL changes (add/remove) allowed before change cutoff only. Cost-impacting changes after cutoff require ACFS admin intervention. ACFS admin can override all cutoffs.
BR-016
Driver records are scoped per LSP account. Drivers added by one LSP user are visible to all users within that same account, but NOT visible to other accounts. P4TC users do not have saved driver records.
BR-017
Booking requires acceptance of two separate documents: (1) booking terms and conditions (legal), (2) driver site induction acknowledgement. If the selected driver already has site_induction = true, the induction acceptance is skipped.
BR-018
DO validation is HBL-centric, not booking-centric. It is a separate capability from pickup verification. Can be performed by an offshore team. Warehouse staff doing pickup verification may also validate DOs inline.
BR-019
Fee calculation: chargeable_weight (max of weight vs volume) per HBL × rate (single flat value). Sum individual HBL charges + minimum charge = total booking fee. Rate is a single configurable value for Phase 1 — may become per-slot or per-region in future.
BR-020
Booking update notifications are sent to the booking party's account email when ACFS makes changes to a booking.
BR-021
Each HBL requires either a DO upload or a free release flag — one or the other per shipment. Free release removes the DO requirement for that tier entirely. This is a per-HBL choice made during the booking readiness step.
BR-022
Booking cancellation: LSP can cancel their own bookings. ACFS can cancel any booking (requires cancellation reason). Cancellation notification sent to booking party. Refund processed outside the system. HBLs revert to previous status.
BR-023
P4TC (one-off booking party) cannot self-service modify bookings. Must contact ACFS for any changes.
BR-024
User account removal is soft-delete (archive). Access is disabled and email notifications are disabled. User data is retained.
BR-025
Welcome email signin link expires in 72 hours. User must click and set password (LSP) or complete SSO login (ACFS) within this window.
BR-026
Slots with active bookings cannot be removed. ACFS must cancel or reschedule bookings before removing a slot.
BR-027
Admin booking modifications (add/remove HBLs, change slot) are fee-free for Phase 1. When HBLs are added or removed, the fee total recalculates to reflect the new weight but no additional payment is collected. No truck capacity validation on HBL add — carrier's responsibility.
BR-028
Booking "collected" status is derived, not manually set. A booking becomes "collected" when all its HBLs reach the "collected" milestone. No manual status change needed.
BR-029
Audit trail: slim version on booking (booking created, payment confirmed). Full hop history lives on the HBL — shows all delegation chain hops, assignment changes, and status transitions per shipment.
BR-030
LSP "My Bookings" reuses the same booking list and detail view as the ACFS admin bookings interface. LSP can edit truck/driver at any time and slot/HBL before change cutoff (per BR-015). Same component as ACFS admin, different permissions.
BR-031
Multiple DOs per HBL — one DO per delegation tier (one-to-many relationship). Each DO is validated individually by ACFS. ACFS browses between DOs for a given HBL and marks each as validated or flagged.
What is the exact data source for HBL hierarchy relationships?
Maximus has both lowest-level and master HBL references but NOT the parent-child relationship between them. AGS can provide the hierarchy. Matt and William are working on this — need confirmed approach before building the data integration.
Describe changes in plain English. I'll explain what I plan to change before making any edits.