Genius ERP Sales Order Relationship Map Sales Order Header is centered with first-ring transaction tables, second-ring production and fulfillment tables, and outer lookup and cost-calculation satellites. Genius ERP Sales Order Relationship Map Distance from center means relationship closeness. Direct SO joins are first-ring; lookups and cost inputs sit farther out. Production spine Shipping side Accounting / invoice side Cost calculation side SO detail lines JobCode Job.SalesOrder Job WorkOrderCode materials production actuals actual labor input line item context cost formulas unresolved inputs ShippingHeader.SO header details ShippingLink container parent only CustomerOrder -> SO.Code invoice lines ShippingOrder / HeaderLink revenue lines BillToCustomer -> Code profitability bridge SalesOrderHeaderEntity API PK / join key: Code Genius SO number PoNumber = source order # Center of the universe SalesOrderDetailEntity API PK: Id SalesOrderHeaderCode JobCode -> Job.Job line item bridge JobEntity API PK: Id join key: Job SalesOrder -> SO.Code Product, CustomerId WorkOrderEntity API PK: Id join key: WorkOrder Job -> Job.Job SalesOrderNumber is conditional DirectLabourEntity API PK: Id JobCode, WorkOrderCode Time, HourlyRate, Operation outer labor/cost input, not SO table ShippingHeaderEntity API PK / join key: Code SalesOrderHeaderCode ShippingLink -> Shipping.Id actual shipping document ShippingDetailEntity API PK: Id ShippingHeaderCode SO detail, invoice, job richest shipping joins ShippingEntity API PK: Id alternate: ShippingNumber container/load parent only CustomerInvoiceHeader PK: CustomerInvoiceHeaderCode CustomerOrder -> SO.Code ShippingOrder -> ShipHeader AmountTotal, DocumentType CustomerInvoiceDetail API PK: Id InvoiceHeaderCode CustomerOrder, JobCode SalesOrderDetailId CustomerEntity API PK: Id join key: Code invoice + SO bill/ship lookup Invoice Profitability View invoice revenue minus production cost MaterialConsumptionEntity API PK: Id Job -> Job.Job WorkOrder -> WorkOrder material actuals ProductionEntryEntity API PK: Id Job, WorkOrder, ParentWo RealCost, WipAmount IcAmount, MfgVariance no direct SO field Open Cost Questions IcAmount source: TBD standard hours: TBD TransactionType=2: TBD do not overstate yet Cost Calculation / Accounting Bridge WipAmount = -RealCost MfgVarianceAmount = RealCost - IcAmount Reach SO through ProductionEntry.Job -> JobEntity.SalesOrder ShippingEntity = load/container parent reached via ShippingHeader.ShippingLink use Header + Detail for SO, invoice, job Proof basis: live Genius API schema + exact parent-record spot checks from steiPete review, 2026-07-14. API pagination: use limit, not top. Business navigation flows outward; YAML edge direction remains child field -> parent field.

Glossary: What These Tables Mean

These descriptions explain each Genius ERP table in business terms. The diagram shows how the tables connect; the glossary explains what each table is responsible for and what kind of records usually live inside it.

Sales Order Center

SalesOrderHeaderEntity Table

Purpose: The master sales order record. This is the commercial order the business recognizes as the center of the transaction.

Contains: The Genius sales order number, bill-to and ship-to customer references, order-level status/context, and links outward to production, shipping, and invoicing. At HandiRamp, PoNumber is overloaded: it often stores the source order number from inside sales, WooCommerce, ASC, Home Depot, and similar channels, not a literal PO.

SalesOrderDetailEntity Table

Purpose: The individual order lines under the sales order. This is where ordered products begin to connect to manufacturing jobs.

Contains: Line numbers, item codes, item descriptions, quantities, the parent sales order code, and job references when a line is manufactured or fulfilled through a production job.

Production Spine

JobEntity Table

Purpose: The production job created to fulfill a sales order requirement. It is the bridge between the customer's order and shop-floor work.

Contains: Job numbers, linked sales order numbers, product/item references, customer context, purchase number context, and manufacturing job metadata.

WorkOrderEntity Table

Purpose: The work order breaks a job into executable manufacturing work. This is closer to what the shop needs to make, assemble, or complete.

Contains: Work order numbers, linked job numbers, product/item references, work order status, parent work order relationships, and conditional sales order references.

DirectLabourEntity Table

Purpose: Labor actually recorded against a job, work order, and operation. It explains who spent time doing production work.

Contains: Employee references, job/work order links, operation codes, entry dates, labor hours, hourly rates, machine time, wage codes, and production-completion flags.

Shipping Side

ShippingHeaderEntity Table

Purpose: The shipment document for an order. This is the useful shipping-level record that connects back to the sales order and invoice flow.

Contains: Shipping header codes, sales order references, customer references, shipping dates/context, and a link up to the broader shipping load/container record.

ShippingDetailEntity Table

Purpose: The shipped line-item detail under a shipping header. This is the richest shipping join point for order, invoice, job, and sales order detail analysis.

Contains: Shipping detail rows, shipping header codes, sales order detail links, customer invoice links, job references, item references, and shipped-line context.

ShippingEntity Table

Purpose: The load or container parent for shipping activity. It is not the direct sales order, invoice, or job join.

Contains: Shipping/load identifiers, alternate shipping numbers, shipping dates, weights, notes, and grouped shipping headers. Use header and detail tables for order-level shipping facts.

Accounting / Invoice Side

CustomerInvoiceHeader Table

Purpose: The invoice-level billing record. This is where the sales order becomes revenue, credit, payment terms, due dates, and posting status.

Contains: Invoice numbers, bill-to customer codes, invoice dates, totals, tax amounts, document type, paid/due dates, fiscal periods, source sales order references, and shipping header links.

CustomerInvoiceDetail Table

Purpose: The invoice line items under an invoice header. This is where billed products, quantities, and line-level revenue can be analyzed.

Contains: Invoice detail rows, invoice header links, item codes, ordered/billed quantities, customer order references, job references, and sales order detail links.

CustomerEntity Table

Purpose: The customer master record used as a lookup from orders, invoices, and shipping documents.

Contains: Customer codes, names, contact information, addresses, groups, payment terms, currency, active status, and accounting customer links.

Invoice Profitability View Derived view

Purpose: A reporting concept that compares invoice revenue against production cost. It is not a confirmed Genius source table in this map.

Contains: A proposed rollup of invoice revenue, production cost, and margin/profitability measures after the cost model is fully proven.

Cost Calculation Side

MaterialConsumptionEntity Table

Purpose: Material usage recorded against jobs and work orders. It helps explain what physical inventory was consumed to produce the order.

Contains: Consumed item references, job/work order links, material quantities, inventory/location context, and material audit detail. Current evidence says it should explain cost, not be added blindly on top of production cost.

ProductionEntryEntity Table

Purpose: Posted production completion and cost activity. This is the current best top-line source for actual production cost.

Contains: Job/work order links, produced and rejected quantities, production dates, real cost, WIP amount, inventory-credit amount, manufacturing variance, hierarchy level, and production batch references.

Cost Calculation / Accounting Bridge Interpretation

Purpose: The accounting logic used to interpret production cost fields and connect them back to sales order profitability.

Contains: Verified formulas such as WipAmount = -RealCost and MfgVarianceAmount = RealCost - IcAmount, plus the rule that SO context is reached through ProductionEntry -> Job -> SalesOrder.

Open Cost Questions Research queue

Purpose: Known gaps that must be resolved before making final cost, margin, or labor-efficiency claims.

Contains: Unresolved items such as the source of IcAmount, where standard labor hours live, how overhead is absorbed, how multi-level work orders should roll up, and what TransactionType=2 means.