Predictika · grocery-store returns and refunds

An AI agent's return decision, checked before it is processed

An AI sales agent at the service desk prepares a return, refund or exchange decision. Before it is processed, the agent sends it to Predictika, which checks it against a declarative model of the return rules and returns a verdict, every reason and the figures it computed.

Scope: Grocery-store return, refund and exchange decisions: item categories, payment method, receipt, return window, coupon cap and loyalty points. See everything this validator covers

This validator models grocery-store return, refund and exchange decisions, not just the scenarios shown below.

  • Items — alcohol and pharmacy items are never returnable; gift cards, produce and meat are returnable only when defective or spoiled.
  • Payment and receipt — a purchase paid with EBT goes back only as store credit or an exchange; a refund needs a receipt; a customer with three or more receiptless returns in 30 days needs a manager.
  • Windows and amounts — 30 days for general merchandise and 15 days for electronics; a refund cannot exceed the price paid after any coupon; loyalty points earned must be taken back on a refund or store credit.

Any grocery-store return decision that touches these rules is in scope — not only the scenarios pictured here. Not covered: price lookup, tax, state-specific rules, pharmacy regulations, value differences on exchanges and fraud scoring. The windows and the three-return threshold are typical policy values chosen for this model, not any specific retailer's policy.

The AI sales agentPrepares the return decision from the customer's request and says it is ready to process.
Predictika validatorChecks every rule at once and returns the verdict, each finding, and the computed figures.

7 scenarios in 3 groups · each group runs from the agent’s first attempt to the outcome · click one to switch

What the agent proposes

The AI sales agent says

Illustrative agent statement. The validator receives the structured request below.

Proposing agent: AI sales agent (scripted)

Before sending, the agent must call Recorded run

Predictika validator


      
Waiting for the call.

Where rules-based systems get it wrong

Click to expand

Our assessment of what a typical rules-based CPQ (product rules, price rules and validation rules, as in Salesforce CPQ) does with the same cases. It is a judgment about effort and reliability, not a claim that nothing can be built.

What the validator caughtTypical rules-based returns systemPredictika
A refund that must not exceed what was paid after a couponOnly if someone is vigilant
The coupon has to be prorated per item and the cap re-derived on every refund; it works, but each coupon type needs its own rule.
The amount paid after the coupon is computed on every call and compared with the amount requested.
EBT purchases that go back only as store credit or an exchangeOnly if someone is vigilant
A rule has to link the original payment method to the return type, and it is easy to miss on exchanges and partial returns.
Payment method and return type travel in one request and the rule is checked with all the others.
Loyalty points that must be taken back on a refundOnly with workarounds
The points sit in a separate loyalty system, so the desk usually relies on the cashier to reverse them.
Points earned and the reversal flag arrive in the same request, and a refund without the reversal is blocked.
Repeat receiptless returns that need a managerOnly with workarounds
The count of earlier returns lives in another system or is checked after the fact.
The count arrives with the request and the escalation is part of the same answer.
Every problem returned in one answerOnly with workarounds
Rules tend to fire one at a time as each step is completed, so one error is fixed and the next appears.
All findings come back together, whatever order the choices arrived in.

What this validator catches: findings from its test cases

Click to expand

Every rule is checked on every call, in any order the choices arrive; one problem never hides another. Blocking findings stop the return; approval findings need a person to sign off; everything else is computed.

1Alcohol cannot be returned.
2Pharmacy items cannot be returned.
3A gift card can be returned only if it is defective.
4Produce and meat can be returned only if they are spoiled or defective.
5A purchase paid with EBT cannot be refunded in cash; it must go back as store credit or an exchange.
6A refund needs a receipt; without one the return must be store credit or an exchange.
7General merchandise can be returned within 30 days; this item was bought 31 days ago.
8Electronics can be returned within 15 days; this item was bought 16 days ago.
9The requested amount of $50.00 is more than the $40.00 paid after the coupon.
10The requested amount of $25.00 is more than the original price of $20.00.
11The original purchase earned 20 loyalty points, which must be taken back on a refund or store credit.
12The customer already has 3 receiptless returns in the last 30 days; a fourth or later cannot be approved automatically and a manager must review it.
13The requested amount of $40.00 is more than the $35.00 paid after the coupon.
14The original purchase earned 40 loyalty points, which must be taken back on a refund or store credit.

Scenarios and results

Click to expand

The recorded result of the validator for each scenario on this page: the request the AI agent sent, the verdict, and every finding, in the order they appear above.

1. EBT groceries with a coupon: EBT groceries returned for cash, with a coupon

The agent's request. Please process a refund of $40.00 for groceries the customer paid for with EBT 2 days ago, using a $5.00 coupon, and keep the 40 loyalty points earned. The customer has the receipt. It is ready to process.

Verdict: Blocked.

  • EBT purchase cannot be refunded in cash. A purchase paid with EBT cannot be refunded in cash; it must go back as store credit or an exchange.
  • Refund is more than was paid after the coupon. The requested amount of $40.00 is more than the $35.00 paid after the coupon.
  • Loyalty points not taken back. The original purchase earned 40 loyalty points, which must be taken back on a refund or store credit.

2. EBT groceries with a coupon: The agent resubmits after fixing the errors

The agent's request. Please process $40.00 in store credit for groceries the customer paid for with EBT 2 days ago, using a $5.00 coupon, and take back the 40 loyalty points earned. The customer has the receipt. It is ready to process.

Verdict: Blocked.

  • Refund is more than was paid after the coupon. The requested amount of $40.00 is more than the $35.00 paid after the coupon.

3. EBT groceries with a coupon: The agent resubmits after fixing the errors

The agent's request. Please process $35.00 in store credit for groceries the customer paid for with EBT 2 days ago, using a $5.00 coupon, and take back the 40 loyalty points earned. The customer has the receipt. It is ready to process.

Verdict: Allowed.

  • Return summary. The most that can be returned for this item is $35.00, the price paid after any coupon.

4. Receipts: Cash refund with no receipt

The agent's request. Please process a cash refund of $45.00 for a household item the customer paid for in cash 12 days ago. The customer has no receipt and has made 1 other receiptless return in the last 30 days. It is ready to process.

Verdict: Blocked.

  • Refund needs a receipt. A refund needs a receipt; without one the return must be store credit or an exchange.

5. Receipts: The agent resubmits after fixing the errors

The agent's request. Please process $45.00 in store credit for a household item the customer paid for in cash 12 days ago. The customer has no receipt and has made 1 other receiptless return in the last 30 days. It is ready to process.

Verdict: Allowed.

  • Return summary. The most that can be returned for this item is $45.00, the price paid after any coupon.

6. Gift cards: Gift card returned for a refund

The agent's request. Please process a refund of $100.00 for a gift card bought 6 days ago. The customer has the receipt. It is ready to process.

Verdict: Blocked.

  • Gift card is not defective. A gift card can be returned only if it is defective.

7. Gift cards: The agent resubmits after fixing the errors

The agent's request. Please process a refund of $100.00 for a gift card bought 6 days ago that is defective. The customer has the receipt. It is ready to process.

Verdict: Allowed.

  • Return summary. The most that can be returned for this item is $100.00, the price paid after any coupon.

Narration transcript

Click to expand

The text of the narrated walkthrough, step by step.

  1. Welcome to a demo of Predictika's Validator. An AI sales agent at the service desk prepares a return, refund or exchange decision. Before it is processed, the agent sends it to Predictika, which checks it against a declarative model of the return rules and returns a verdict, every reason and the figures it computed.
  2. I will start with the first request by the agent.
  3. The agent says. Please process a refund of $40.00 for groceries the customer paid for with EBT 2 days ago, using a $5.00 coupon, and keep the 40 loyalty points earned. The customer has the receipt. The rest of the request is on screen.
  4. Before it goes out, the agent calls the validator.
  5. Blocked, with three findings, all in one answer. A purchase paid with EBT cannot be refunded in cash; it must go back as store credit or an exchange. The requested amount of $40.00 is more than the $35.00 paid after the coupon. The original purchase earned 40 loyalty points, which must be taken back on a refund or store credit.
  6. The validator returned three blocking findings in one answer. A check that reads one field at a time would pass most of this; it shows only when the choices in the return are checked against each other.
  7. What this shows: for a refund that must not exceed what was paid after a coupon, a rules-based returns system does this reliably only when someone is vigilant.
  8. Now the agent resubmits.
  9. The corrected request. It changes the return type to store credit and the loyalty points taken back to yes.
  10. It calls the validator again.
  11. Still blocked, with one finding, all in one answer. The requested amount of $40.00 is more than the $35.00 paid after the coupon.
  12. Two findings cleared; still blocked on refund is more than was paid after the coupon.
  13. The agent resubmits once more.
  14. The revised request. It changes the amount requested to $35.00.
  15. It calls the validator once more.
  16. This time the validator clears it.
  17. The earlier finding is cleared, and the validator's total, None, matches the return.
  18. Three problems caught in one call, fixed in two passes, and a clean return. That is the value of Predictika's validator: catching mistakes before the return is processed.