offdataai
Supply Chain & Logistics · data model template

ERP Order Management data model

Normalized (3NF) OLTP model of an ERP order-management module modeled on SAP SD / Oracle EBS / NetSuite structures. Each business entity is its own table with a surrogate key and natural business key, connected with foreign keys from child detail tables toward customer/order/product roots. Customer contact and tax identifiers are PII-masked under GDPR.

Operational order-to-cash data for an ERP: sold-to customers and their ship-to/bill-to addresses, a product master priced through versioned price lists, sales orders and order lines, outbound shipments, AR invoices and invoice lines, and applied customer payments — anchored to org-unit, currency, and unit-of-measure reference tables. It is a normalized (3NF) relational model that mirrors the source system, suited to operational databases and to landing source data faithfully.

3NFSupply Chain & LogisticsGDPRSOX
14
tables
119
columns
29
relationships
6
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: PostgreSQL). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

referencemaster_dataordersfulfillmentbilling

Design decisions

  • Order-to-cash decomposition

    Splitting sales order, shipment, invoice, and payment into separate documents mirrors the standard ERP O2C process flow, where each step is a distinct posted document with its own lifecycle and number range.

  • Versioned price lists rather than a price on the product

    Net unit prices vary by sales org, currency, customer group, and validity window; a price-list header with line items keeps the product master clean and supports time-bounded pricing.

  • Normalized (3NF) for transactional integrity

    Order management is write-heavy OLTP requiring referential integrity and minimal update anomalies, so a fully normalized relational model on Postgres is preferred over a dimensional star.

  • PII classification on customer identifiers

    Email, phone, postal address, and tax ID are personal data under GDPR and are tagged/masked so the governance report flags them and downstream extracts redact them by default.

Tables in the ERP Order Management model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Tables (12)

org_unit

Grain: one row per selling organization / company code

ColumnTypeKeys
org_unit_keybigintPK
org_codevarcharBK
org_namevarchar
functional_currency_keybigint
countryvarchar
is_activeboolean

customer

Grain: one row per sold-to customer master record

Sold-to party master.

ColumnTypeKeys
customer_keybigintPK
org_unit_keybigint
customer_numbervarcharBK
legal_namevarchar
contact_emailvarcharPII
contact_phonevarcharPII
tax_idvarcharPII
credit_limitdecimal
default_currency_keybigint
payment_termsvarchar
customer_groupvarchar
is_activeboolean

address

Grain: one row per customer address (ship-to / bill-to)

ColumnTypeKeys
address_keybigintPK
customer_keybigint
address_typevarchar
line1varcharPII
line2varcharPII
cityvarchar
regionvarchar
postal_codevarcharPII
countryvarchar
is_defaultboolean

product

Grain: one row per material / product master record

ColumnTypeKeys
product_keybigintPK
skuvarcharBK
product_namevarchar
product_categoryvarchar
base_uom_keybigint
weight_kgdecimal
is_serializedboolean
is_activeboolean

price_list

Grain: one row per versioned price list header

ColumnTypeKeys
price_list_keybigintPK
org_unit_keybigint
currency_keybigint
price_list_codevarcharBK
descriptionvarchar
valid_fromdate
valid_todate
is_activeboolean

price_list_item

Grain: one row per product price on a price list

ColumnTypeKeys
price_list_item_keybigintPK
price_list_keybigint
product_keybigint
unit_pricedecimal
min_quantitydecimal

sales_order

Grain: one row per sales order header

Sales document header.

ColumnTypeKeys
sales_order_keybigintPK
org_unit_keybigint
customer_keybigint
ship_to_address_keybigint
bill_to_address_keybigint
currency_keybigint
order_numbervarcharBK
order_datedate
requested_delivery_datedate
order_statusvarchar
order_total_amountdecimal
po_referencevarchar

order_line

Grain: one row per sales-order line item

ColumnTypeKeys
order_line_keybigintPK
sales_order_keybigint
product_keybigint
uom_keybigint
line_numberinteger
ordered_quantitydecimal
unit_pricedecimal
discount_amountdecimal
net_amountdecimal
requested_datedate
line_statusvarchar

shipment

Grain: one row per outbound shipment / delivery document

ColumnTypeKeys
shipment_keybigintPK
sales_order_keybigint
ship_from_org_keybigint
ship_to_address_keybigint
delivery_numbervarcharBK
carriervarchar
tracking_numbervarchar
shipped_datedate
delivered_datedate
shipment_statusvarchar

invoice

Grain: one row per AR invoice / billing document

Accounts-receivable billing document.

ColumnTypeKeys
invoice_keybigintPK
sales_order_keybigint
customer_keybigint
currency_keybigint
invoice_numbervarcharBK
invoice_datedate
due_datedate
net_amountdecimal
tax_amountdecimal
gross_amountdecimal
invoice_statusvarchar

invoice_line

Grain: one row per invoice line item

ColumnTypeKeys
invoice_line_keybigintPK
invoice_keybigint
order_line_keybigint
product_keybigint
billed_quantitydecimal
unit_pricedecimal
net_amountdecimal
tax_amountdecimal
tax_codevarchar

payment

Grain: one row per customer payment applied to an invoice

ColumnTypeKeys
payment_keybigintPK
invoice_keybigint
customer_keybigint
currency_keybigint
payment_referencevarcharBK
payment_methodvarchar
amountdecimal
received_attimestamp
payment_statusvarchar

Lookup tables (2)

currency

Grain: one row per ISO 4217 currency

ColumnTypeKeys
currency_keybigintPK
currency_codevarcharBK
currency_namevarchar
minor_unitsmallint

uom

Grain: one row per unit of measure

ColumnTypeKeys
uom_keybigintPK
uom_codevarcharBK
uom_namevarchar
dimensionvarchar

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • org_unit.functional_currency_key → currency (many-to-one)
  • customer.org_unit_key → org_unit (many-to-one)
  • customer.default_currency_key → currency (many-to-one)
  • address.customer_key → customer (many-to-one)
  • product.base_uom_key → uom (many-to-one)
  • price_list.org_unit_key → org_unit (many-to-one)
  • price_list.currency_key → currency (many-to-one)
  • price_list_item.price_list_key → price_list (many-to-one)
  • price_list_item.product_key → product (many-to-one)
  • sales_order.org_unit_key → org_unit (many-to-one)
  • sales_order.customer_key → customer (many-to-one)
  • sales_order.ship_to_address_key → address (many-to-one)
  • sales_order.bill_to_address_key → address (many-to-one)
  • sales_order.currency_key → currency (many-to-one)
  • order_line.sales_order_key → sales_order (many-to-one)
  • order_line.product_key → product (many-to-one)
  • order_line.uom_key → uom (many-to-one)
  • shipment.sales_order_key → sales_order (many-to-one)
  • shipment.ship_from_org_key → org_unit (many-to-one)
  • shipment.ship_to_address_key → address (many-to-one)
  • invoice.sales_order_key → sales_order (many-to-one)
  • invoice.customer_key → customer (many-to-one)
  • invoice.currency_key → currency (many-to-one)
  • invoice_line.invoice_key → invoice (many-to-one)
  • invoice_line.order_line_key → order_line (many-to-one)
  • invoice_line.product_key → product (many-to-one)
  • payment.invoice_key → invoice (many-to-one)
  • payment.customer_key → customer (many-to-one)
  • payment.currency_key → currency (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time