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

metric_returns_rate

beta
metric table

Return rate (returns per shipped order), disposition mix, and processing cycle time by segment and region.

Definition

Returns rolled up from the per-return `mart_returns` to (return_month × client_segment × site_region × disposition), where `return_month` is `toStartOfMonth(return_date)`. `return_count` counts returns; `return_value_sum` is the summed value of returned goods (Nullable(Decimal(38,2)) — sum() of Decimal(14,2) promotes to Decimal(38,2)); `avg_return_cycle_days` is the average processing cycle time (Nullable(Float64) — avg() semantics). `shipped_order_count` is the shipped-order denominator, materialized from `mart_fulfillment_daily` at the COARSER (return_month × client_segment × site_region) grain (NO disposition) and repeated across the disposition rows for that month/segment/region. `return_rate` is a FORMULA measure (sum(return_count) / nullif(sum(shipped_order_count), 0)). Both feeds coalesce `client_segment` / `site_region` identically to `unknown` so no bucket drops. The rate is APPROXIMATE — returns are matched to their shipping calendar month, not their exact shipping cohort.

Watch out for
  • highSlicing return_rate by disposition

    `return_rate` is APPROXIMATE and the shipped denominator carries NO disposition — `shipped_order_count` is repeated across disposition buckets. Do NOT slice `return_rate` by `disposition` (it would double-count the denominator). Returns are matched to their shipping CALENDAR MONTH, not their exact shipping cohort.

  • highReading return_count as the return rate

    `return_count` is a raw count of returns, not a rate. Request the `return_rate` formula measure — it divides by `shipped_order_count` with `nullif` window-correctly. Use `return_count` for volume / disposition mix, `return_rate` for the rate.

  • mediumSumming avg_return_cycle_days across buckets

    `avg_return_cycle_days` is an avg() measure — the metric layer re-runs avg() over the chosen window. Do not roll it up client-side (summing or averaging pre-averaged values is biased).

Questions this answers
  • “What is the return rate by segment this year?”
  • “What is the disposition mix of returns by region?”
  • “What is the average return processing cycle time by segment?”
Related metrics
  • fulfillment

    Supplies the shipped-order count (`order_count`) that is this metric's return-rate denominator — pair to read returns against upstream fulfillment volume for the same segment / region.

8 of 8
Column
Type
Description
Tests · PII
return_month
Date
First day of the return month (toStartOfMonth of return_date). Grain + sort key.
1 test
client_segment
LowCardinality(String)
Owning-client segment — automotive / chemicals / fmcg / fashion / high_tech / life_sciences; `unknown` when unmapped. Dimension + sort key. Coalesced identically to the shipped feed.
1 test
site_region
LowCardinality(String)
Handling-site region — EU / UK / NA / APAC; `unknown` when unmapped. Dimension + sort key. Coalesced identically to the shipped feed.
1 test
disposition
LowCardinality(String)
Return disposition — restock / repair / recycle / scrap; `unknown` when unmapped. Dimension + sort key. NOT carried by the shipped denominator (do not slice return_rate by it).
1 test
return_count
UInt64
Count of returns in the bucket. Numerator of the `return_rate` formula measure.
1 test
shipped_order_count
UInt64
Shipped-order denominator from `mart_fulfillment_daily` at the coarser (return_month × client_segment × site_region) grain — NO disposition, repeated across the disposition rows. Denominator of the `return_rate` formula measure. 0 when no matching shipped bucket exists.
1 test
avg_return_cycle_days
Nullable(Float64)
Average return processing cycle time (days) in the bucket. Exposed as the `avg_return_cycle_days` measure (avg). Nullable(Float64) per §0.3 (avg() returns Nullable(Float64)).
return_value_sum
Nullable(Decimal(38, 2))
Sum of returned-goods value in the bucket. Exposed as the `return_value_sum` measure (sum). Nullable(Decimal(38,2)) per §0.3 (sum() of Decimal(14,2) promotes to Decimal(38,2)).