Fini handles refunds and returns end to end inside a deterministic Intent Rule: it identifies the customer, looks up the order or charge in your system through an Action, checks eligibility against your policy, submits the refund or creates the return through a second Action, and replies with the real amount, reference and timeline your API returned. Anything outside policy, above the amount you allow the agent to approve, or marked as sensitive goes to your team as an internal note or an escalation with the conversation history, and the AI Steps trace in the Inbox shows every step the rule ran. The agent never decides on its own whether a refund is allowed. Your API and the Checks in your rule make that decision, the agent collects what’s needed and explains the outcome. Policy questions that aren’t requests (“what’s your return window?”) are answered from your Knowledge articles without running the rule at all.

What Fini handles and what it hands to your team

How it works in Fini

A refund flow is the same four-piece shape as the Cancellation flow walkthrough: a User Attribute for context, Actions for the work, an Intent Rule for orchestration, and Reply Rules for overrides. Returns add a branch, which is the multi-intent pattern from the Order status and changes walkthrough.

Example behavior tree

The tree below is an example to adapt, not a template that ships with Fini. Rename tags, fields and Actions to match your system, and set the auto-approve limit to your own policy (100 is a placeholder).
How it runs:
  1. The intent Check is a deterministic backstop on the planner’s routing. If the conversation isn’t tagged refund_request, the Steps short-circuits, the rule does nothing on this message, and the agent falls through to its default reply from Knowledge.
  2. The customer Check stops the rule cleanly if the customer couldn’t be identified. To ask for the account email instead, wrap the rule in a Fallback whose second child is a Reply, the graceful-recovery pattern in Intent Rules.
  3. The eligibility Tool runs before anything with side effects. Its outputs sit outside the inner Fallback, so every branch below can use blocker_reason and refund_amount.
  4. The Fallback tries the auto-approve path first. If the refund is eligible but above your limit, the second branch tells the customer a teammate will follow up, which Conversation Status records as Escalated to Human Agent. If the refund isn’t eligible, the last Reply explains why using the reason your API returned.
To confirm (internal, remove before publish): Is a Reply that tells the customer “a teammate will follow up” the recommended way for an Intent Rule to escalate (so Conversation Status tags it Escalated to Human Agent and the helpdesk handoff fires), or is there a dedicated escalate step we should document instead?
For returns, make the root a Fallback with one Steps branch per intent: the refund branch above, and a return branch with its own intent Check (Topic Equals return_request) that calls a Create Return Action and replies with the return label or drop-off instructions it returns. One rule with a Fallback root handling several related intents is the shape the Order status and changes walkthrough builds step by step.
Make the submit Action idempotent. A customer can send the same message twice before the first reply arrives, and each message re-runs the rule from the root. Pass a deterministic idempotency key in the Submit Refund body (for example ${order_id}-refund) so a duplicate Tool call doesn’t refund twice.

What you need

Guardrails and escalation

Decide up front which refunds the agent may complete on its own, and encode each boundary in the layer built for it.
Reply Rules gate the reply, not the Tools. When an Internal Comment rule matches, the rule still runs and Submit Refund still fires; only the customer-facing confirmation is held. If a human must approve before money moves, stop the tree before the submit Tool (as the above-limit branch does) and let your team complete the refund in your own system.

What to measure

Open Analytics after a week of production traffic and scope it to this use case with the Tags filter (your refund and return tags) or the Intent rule filter. When a number moves, open the conversations behind it in Inbox and read the AI Steps trace. The first red dot shows where the rule stopped.

Order status and changes

Step-by-step build of a multi-intent order rule with eligibility checks, a cancel Action and blocked-path replies.

Cancellation flow

The canonical intent, identify, act, confirm walkthrough that refund flows share.

Intent Rules

Node types, Fallback patterns and chaining Tools, including a refund chain.

Reply Rules

Internal Comment, No Reply and Direct Reply, and how priority works.

Actions

Typed inputs and outputs, Data Steps and testing with Play.

Disputes and chargebacks

When the customer contests a charge instead of requesting a refund.
For a comparison of refund automation tools, see the guide on usefini.com.