Enrich the order evidence for review
Connect orders, customers, and refund history so one order shows customer tier and past-refund context together.
Question for this chapter
Which customer context should be attached before a refund request is judged?
Why this matters now
Amount alone makes every expensive order look risky. Tier alone can hide repeated refunds from a valued customer. Read the order, customer, and history in one row.
Try it
Confirm the source datasets under refund_ops:
raw_orders— 12 rowsraw_customers— 10 rowsrefund_history— 10 rows
Then open the order_enrichment pipeline and select Run. The join_order_customer code connects
orders and customers on customer_id, then left-joins each customer's refund count and amount.
Success looks like this
enriched_orders contains 12 rows. Inspect these columns together:
order_id, customer_id, customer_tier, total_amount,
past_refund_count, past_refund_total, status
For example, ORD-2025-0001 is a $1,299.99 order from gold customer CUS-001 with two past refunds.
That is evidence for the next score, not an approval or rejection.

Interpret the result
Enrichment does not make a decision. It gives reviewers a shared bundle so they begin from the same facts.
Next decision
You have assembled the review evidence. Next, classify the 12 orders by risk while using the result only to order the review queue.