Fulfillment¶
Current fulfillment split¶
Fulfillment is split across marketplace state, exzen-core, Otto, n8n, and printers.
Marketplace orders¶
For Shopee/Lazada marketplace orders, Otto is the current production waybill and label-printing agent.
Otto begins work only after marketplace state indicates the order is fulfillment-ready. It does not turn a newly placed Shopee order into READY_TO_SHIP; it processes orders after that readiness point.
Otto pipeline:
- Webhook or fallback poll discovers eligible order.
- Connector validates/arranges marketplace logistics.
- Otto retries tracking/document readiness.
- Otto downloads the waybill PDF.
- Otto claims and deduplicates the job in SQLite.
- Otto normalizes and renders the PDF for the printer.
- Printer queue serializes physical output.
- n8n archives the waybill to Google Drive on a best-effort basis.
- Otto resynchronizes marketplace state and cancellation status.
Telegram/Mini App orders¶
Telegram customer orders run through exzen-core:
- Mini App loads product cache from
exzen-core. - Checkout creates SQLite order/item rows.
- Auto-approval inserts order lines into Google
OrdersasFor Allocation. - Apps Script allocates inventory from
Imports. exzen-corehandles direct SPX booking/waybill flows for Telegram orders.
Deleting the old Apps Script spx.gs did not remove this working direct-SPX path in exzen-core.