Connector administration, ODS health, synchronization, and maintenance
Canonical table counts, semantic view health, import job status, and sync watermarks — across all four ODS domains.
Recent import_jobs records for all four Wherefour sync pipelines. Shows last 20 runs.
Current watermark timestamps for each sync pipeline. Stalled watermarks indicate a loader issue.
Standard incremental synchronization. Retrieves new and changed records since the last successful sync. Safe to run at any time — skips records that have not changed. This is the correct action for routine operations.
Incremental sync of vendors into the suppliers canonical table.
Incremental sync of inventory items into the inventory_items canonical table.
Incremental sync of formulas into the manufacturing_boms canonical table.
Incremental sync of purchase orders into the purchase_orders canonical table.
Incremental sync of customers into the customers canonical table.
Full snapshot of open AR transactions into customer_ar_open_items. Replaces table on each run (truncate-and-reload).
Incremental sync of sales orders into the customer_orders canonical table (with lines and custom lines).
Incremental sync of QB invoices (paid + unpaid) into customer_invoices. Upserts by invoice ID — balance updates in-place as payments are applied.
Reprocess all supplier records regardless of sync state.
Reprocess all inventory item records regardless of sync state.
Reprocess all BOM records regardless of sync state.
Reprocess all purchase order records regardless of sync state.
Reprocess all customer records regardless of sync state.
Reloads all invoices from the last 13 months. Ignores the watermark and re-fetches every record. Use after a database rebuild or when invoice counts look wrong.
Reprocess all sales order records regardless of sync state.
Every table in the Operational Data Store — what it holds, what populates it, whether it is safe to clear, and how it is rebuilt. Use this reference before performing any manual database maintenance.
| Table | Purpose | Populated By | Safe to Clear | Rebuilt By | Notes |
|---|---|---|---|---|---|
| customers | Canonical customer identity — name, type, contact, commercial terms, cross-system IDs | QuickBooks Customer Sync | With caution | Force Re-Sync Customers | Clearing requires clearing source_record_map first. FK target for future order entities. |
| customer_addresses | Billing and shipping addresses for each customer (one row per address type) | QuickBooks Customer Sync | Yes | Any Customer Sync or Force Re-Sync | Automatically re-created on next sync. Safe to clear for maintenance. |
| customer_ar_open_items | Canonical AR fact table. All open receivable transactions from CustomerBalanceDetail report. Truncate-and-reload on each sync. | QuickBooks Accounts Receivable Sync | Yes | Sync Accounts Receivable | Full snapshot per sync run. Aging days and bucket calculated at import. Safe to clear — next sync restores current state. |
| vw_customer_ar_balances | Current balance per customer — SUM(open_amount) from customer_ar_open_items | Derived (no sync) | View | — | Semantic view. Always reflects current customer_ar_open_items snapshot. |
| vw_customer_ar_aging | Balance bucketed by aging: Current / 1–30 / 31–60 / 61–90 / 90+ | Derived (no sync) | View | — | Semantic view. Aging buckets computed from aging_days on customer_ar_open_items. |
| vw_customer_collections | Collections operational queue — balance, oldest due date, days past due, open documents per customer | Derived (no sync) | View | — | Semantic view. Collection status and assigned collector are future fields (currently NULL). |
| Table | Purpose | Populated By | Safe to Clear | Rebuilt By | Notes |
|---|---|---|---|---|---|
| suppliers | Canonical supplier / vendor identity — name, contact, payment terms | Wherefour Supplier Sync | No | Force Re-Sync Suppliers | FK target for purchase_orders.supplier_id and supplier_materials.supplier_id. Clearing breaks PO and SM relationships. |
| inventory_items | Wherefour inventory catalog — raw material and finished good items | Wherefour Item Sync | With caution | Force Re-Sync Items | Source data for supplier_materials seed linkage. Clearing may require re-running supplier identity resolution. |
| manufacturing_boms | Formula / BOM definitions from Wherefour — active and historical revisions | Wherefour BOM Sync | With caution | Force Re-Sync BOMs | ODS-003: active_flag governs current revision. Clearing loses active-state governance history. |
| manufacturing_bom_components | Line items for each BOM — ingredient / packaging components | Wherefour BOM Sync | Yes | Force Re-Sync BOMs | Fully rebuilt on every BOM sync. Safe to clear. |
| purchase_orders | Procurement transactions — PO number, date, status, supplier, totals | Wherefour PO Sync | With caution | Force Re-Sync POs | Requires suppliers to be populated first. Run Supplier Sync before PO Force Re-Sync. |
| purchase_order_lines | Line items for each PO — item, quantity, unit cost | Wherefour PO Sync | Yes | Force Re-Sync POs | Fully rebuilt on every PO sync. Safe to clear. |
| customer_orders | Sales orders from Wherefour — order number, dates, status, amounts, delivery method | Wherefour Customer Orders Sync | With caution | Force Re-Sync Customer Orders | FK parent for customer_order_lines and customer_order_custom_lines. Linked to customers via wherefour_customer_id — clearing requires clearing lines first. |
| customer_order_lines | Standard product line items for each order — SKU, product name, category, quantity, unit cost | Wherefour Customer Orders Sync | Yes | Force Re-Sync Customer Orders | Fully rebuilt on every order sync (delete/re-insert per order). Safe to clear. |
| customer_order_custom_lines | Custom / non-inventory line items for each order — name, description, quantity, unit price | Wherefour Customer Orders Sync | Yes | Force Re-Sync Customer Orders | Fully rebuilt on every order sync (delete/re-insert per order). Safe to clear. |
| v_customer_order_master | Order header with customer name (LEFT JOIN), line count, and custom line count | Derived (no sync) | View | — | Semantic view. Always reflects current customer_orders state. |
| v_customer_order_line | Order line detail with parent order context (order number, customer, dates) | Derived (no sync) | View | — | Semantic view. Always reflects current customer_order_lines state. |
| Table | Purpose | Populated By | Safe to Clear | Rebuilt By | Notes |
|---|---|---|---|---|---|
| source_record_map | Cross-system identity — maps source system IDs to canonical ODS record IDs | All sync operations | With caution | Force Re-Sync for each connector | Clearing causes the next sync to treat every record as new (full insert). Required step before rebuilding a canonical table from scratch. |
| sync_state | Watermark timestamps — records the last successful sync point per connector | All sync operations (on completion) | Yes | Next successful sync run | Clearing causes the next sync to perform a full scan (same as Force Re-Sync). Safe to clear if a full rescan is acceptable. |
| import_jobs | Audit log — one row per watermark-based entity sync run | All Wherefour and QB entity syncs | Yes | Next sync run | Historical record only. Clearing removes sync history but has no operational impact. |
| integration_report_runs | Audit log — one row per QB Report API import run (AR Balance, AR Open Items) | AR Balance Sync, AR Open Items Sync | Yes | Next report sync run | Distinct from import_jobs: report imports are point-in-time snapshots, not watermark-based. Clearing removes run history only. |
import_jobs, sync_state, customer_addresses, manufacturing_bom_components, purchase_order_linescustomers, inventory_items, manufacturing_boms, purchase_orders, source_record_map — clear only as part of a deliberate rebuild sequencesuppliers without also clearing and rebuilding purchase_orders and supplier_materialssource_record_map → Clear canonical table → Run Force Re-Syncsupplier_id from the suppliers table at ingest timeChecks whether ODS migrations have been applied to the live D1 database.
Queries live D1 for current BOM counts. Use ?tenant=snl to scope.