Documentation

← All agent examples

Refund and return requests with approval for large amounts

Pulls the order number, amount and reason out of a customer's refund or return request and checks it against the refund policy you write into the prompt. The check uses only what the customer wrote, with no order lookup. A request is refunded automatically only when the model judges it within policy and the amount it states is more than 0 and at most 50; everything else, including any request that states no amount, waits for a person to approve or deny it.

Customer support
E-commerce
refund
return
RMA
order
policy
human in the loop
approval
webhook

How it starts

When you run it.

What it needs

No knowledge base, memory bank or connection to create first.

Steps

Read the request and check the policy

Prompt Call

Parse and validate the request

Extract Content

Auto-approve or review

Switch

When: Auto-approve:

Is an amount stated and 50 or less?

If / Else

If yes:

Send the refund

Webhook Call

Otherwise:

Review the refund

Human-in-the-Loop

Was it approved?

If / Else

If yes:

Send the approved refund

Webhook Call

Record the decision

Text

Record the limit check

Text

Otherwise:

Review the refund

Human-in-the-Loop

Was it approved?

If / Else

If yes:

Send the approved refund

Webhook Call

Record the decision

Text

Show the assessment

Display Result