← All manuals IM2

Background Job — QuickBooks Posting Engine (picks → QB)

(background process — no screen)
Technical Spec Ver 1 Updated 2026-09-06 Matches the live screen

Background Job — QuickBooks Posting Engine

Turns a completed pick/issue session into QuickBooks documents. Code: app/ro_post.py (generated from skills/requirements_orders/scripts/post_pick_to_qb.py, verified live against production QuickBooks 2026-09-02).

Trigger / schedule

Not scheduled — it is request-driven. There is no timer, cron or queue. Entry points in app/ro_pick.py:

Global lockout: ro_pick.POSTING_ENABLED = False ("Posting is not allowed during test." — Dave, 2026-09-02). Until that flag is flipped, every post attempt returns 403/ok:false and no QuickBooks document is created. Permission is additionally gated by _require_post(user).

Inputs

Rules

Tables written

TableChange
ro_txnone row per posted line: pick_id, order_no, line_key, sku, direction ('Issue'/'Return'), qty, qb_doc_type, qb_doc_id, qb_doc_number, txn_date, operator, source='Workbench'. Surplus rows get qb_doc_type = NULL.
ro_pickon success status='POSTED', posted_by, posted_at, updated_at, qb_invoice_id/_number, qb_credit_id/_number. On failure _do_post writes post_error in a separate small transaction.
ro_detailzero-adjustment columns for explicitly zeroed lines.
ro_headerback-fills qb_customer_id, qb_customer_name, class_ref when they were resolved during the post.

External calls

QuickBooks Online via app/qb.py (QBO, direct Intuit API, credentials in /opt/im2/env): POST Invoice and/or POST CreditMemo. dry_run=True returns the line counts and makes no QB call.

Failure behaviour / idempotency

Logs to look at

Known limits