maiven gateway · online··
manifest · 1d ago
Sign in
Back to catalog
MAIVENmodelmarts

mart_order_outcomes

beta
mart table

Win/loss of the SLA promise for every order — OTIF, cycle time, line accuracy, and value, per client.

Definition

One row per order (grain order_id), sourced from int_whse__order_enriched. Carries the SLA outcome trio (is_otif / is_on_time / is_in_full), cycle_time_hrs (order→ship), line_accuracy_pct, order_value, and the client_id / site_id / consignee_id FKs. De-identified — consignee_id is a surrogate, never the recipient's name/address/email. This is the per-order table the fulfillment metric aggregates over; read rows here (via query_records('fulfillment_order')) to name which orders breached SLA. Client-scoped: the client_account_manager row policy restricts rows to the caller's assigned client_id.

Watch out for
  • highReading open orders as SLA failures

    Open orders have NULL ship_date / is_otif / cycle_time_hrs. Filter ship_date IS NOT NULL (or is_otif IN (0,1)) before treating a row as a decided outcome.

  • highAssuming a manager sees all orders

    Row policy silently scopes to the caller's client_id — two client managers get disjoint, non-empty row sets; ops/compliance/AI personas see all. A "missing" order is usually a tenant-scope boundary, not absent data.

  • mediumAggregating rates from rows instead of the metric

    For OTIF/accuracy rollups use the fulfillment / pick_accuracy metrics; these rows are for naming individual orders, not window-correct rates.

Questions this answers
  • “Which orders for this client breached SLA in June, and what was the pick accuracy?”
  • “List the slowest-cycle orders shipped last month.”
  • “Show high-value late orders for chilled goods.”
18 of 18
Column
Type
Description
Tests · PII
order_id
String
PK — grain of this mart.
client_id
String
Multi-tenant key. The client_account_manager row policy filters on this.
site_id
Nullable(String)
Fulfilling site FK.
consignee_id
Nullable(String)
Pseudonymous FK — never the consignee's name/address/email. Not pii-tagged (surrogate).
client_segment
String
automotive / chemicals / fmcg / fashion / high_tech / life_sciences / unknown.
site_region
String
EU / UK / NA / APAC / unknown.
dest_region
String
Ship-to region (from order dest_region); coalesced to unknown.
temp_class
String
ambient / chilled / frozen.
carrier
Nullable(String)
Carrier code.
order_date
Nullable(Date)
Order placed.
ship_date
Nullable(Date)
Shipped (NULL while open).
promised_date
Nullable(Date)
SLA promise date.
is_otif
Nullable(UInt8)
On-time-in-full flag (1/0).
is_on_time
Nullable(UInt8)
ship_date ≤ promised_date.
is_in_full
Nullable(UInt8)
Shipped complete (passthrough of order-grain flag).
cycle_time_hrs
Nullable(Int64)
dateDiff('hour', order_date, ship_date); NULL while open.
line_accuracy_pct
Nullable(Float64)
accurate_lines / total_lines · 100.
order_value
Nullable(Decimal(18, 2))
Order value (alias of raw order_value_eur).