Skip to content

Settle an online shop's returns with coupon allocation, return windows, restocking fees and refund routing

Exact prompt

# Settle an online shop's returns: coupon allocation, return windows, restocking fees, shipping and refund routing Inputs: `orders.json` (orders with delivered_at, payments, coupon, shipping_fee and lines), `returns.csv` (return_id, order_id, line, qty, reason, received_at) and `returns-policy.json`. Times carry their own UTC offsets. Everything is synthetic and in dollars. `returns-policy.json` and these rules are the record; where `support-macro.txt` disagrees, the rules win. Rules: - An order's coupon is spread over its lines in proportion to each line's subtotal (unit_price × qty): percent coupons take value% of the order subtotal, fixed coupons take value. Each line's share is rounded half-up to the cent, and any leftover cent difference goes to the line with the largest subtotal (ties: lowest line number). A line's net is its subtotal minus its share. - A return is eligible if received_at is no more than window_days × 24 hours after delivered_at (real instants). final_sale lines can only be returned for reason defective or wrong_item. - An eligible return's refund is the line's net × returned qty / line qty, rounded half-up to the cent. reason changed_mind pays a restocking fee of the category's restocking_pct of that refund, rounded half-up to the cent; the refund paid is refund − fee. - shipping_fee is refunded once per order if any eligible return on it has reason defective or wrong_item, or if eligible returns cover every unit of the order. - Routing: process an order's eligible returns by received_at, then the shipping refund. Each amount goes to the gift card first, up to what was paid by gift card minus what has already gone back to it, and the rest to the card. - Write `out/refunds.json`: `{"returns": {"<return_id>": {"eligible": true|false, "refund": <paid refund or 0>, "restocking_fee": <fee or 0>}, ...}, "orders": {"<order_id>": {"shipping_refund": <dollars>, "to_gift_card": <dollars>, "to_card": <dollars>}, ...}}` (orders: every order with at least one return). ## How this run works - Work on your own: nobody will answer questions in this task, and writing to `ask/` counts against the run. - Write only under `out/`. Create `out/` if it is missing. Inputs are synthetic; don't fetch anything from the network. - Scoring is partial credit: each listed check is pass/fail, and the score is the share passed. Numbers are compared to within 0.005 unless the task says otherwise.

Settle a batch of returns for a synthetic online shop. Order coupons (percent or fixed) are spread over lines with a leftover-cent rule, return windows are measured between offset-stamped instants and some returns land hours either side of the limit, final-sale lines only come back as defective or wrong item, changed-mind returns pay a category restocking fee, shipping is refunded once under two triggers, and refunds go back to the gift card first. A support macro gets the coupon, window and routing rules wrong. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Success criteria: coupon_allocation eligibility restocking shipping routing

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.0074, 30s).

Run this on another model

All runs (3)

100% pass rate across 3 eligible runs: 3 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
AClaude Opus 5.5default · thinking on$0.1624s0Fully autonomouspassTrust 80%2026-10-24
AClaude Haiku 5.5default · thinking on$0.007430s0Fully autonomouspassTrust 80%2026-10-24
AClaude Sonnet 5.5default · thinking on$0.0615s0Fully autonomouspassTrust 80%2026-10-24

Embed this result

A live badge for this use case. It links back here and updates as new runs are published.

UseCaseRank badge for Settle an online shop's returns with coupon allocation, return windows, restocking fees and refund routing

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.