Skip to content

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:

  1. Webhook or fallback poll discovers eligible order.
  2. Connector validates/arranges marketplace logistics.
  3. Otto retries tracking/document readiness.
  4. Otto downloads the waybill PDF.
  5. Otto claims and deduplicates the job in SQLite.
  6. Otto normalizes and renders the PDF for the printer.
  7. Printer queue serializes physical output.
  8. n8n archives the waybill to Google Drive on a best-effort basis.
  9. Otto resynchronizes marketplace state and cancellation status.

Telegram/Mini App orders

Telegram customer orders run through exzen-core:

  1. Mini App loads product cache from exzen-core.
  2. Checkout creates SQLite order/item rows.
  3. Auto-approval inserts order lines into Google Orders as For Allocation.
  4. Apps Script allocates inventory from Imports.
  5. exzen-core handles 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.