AI agents for customer support · Part 14 of 14
Keeping a record of what the agent did, and why
What to keep for every action the agent takes, so that when someone asks why it refunded an order, one record shows them what it saw, the rule it checked, and what it did.
The short version
Write one record for every action the agent takes, at the moment it acts. It answers four questions: what the customer asked, what the agent read, what it checked, and what it did. Keep the facts as values, because the order will change after. Put the record’s ID on the refund and on the conversation, so a question can start from either end. And keep it as long as a dispute can still arrive. Four steps:
Step 1Write one record per action
Write the record when the agent acts, from what it had in hand, in four parts: what was asked, what the agent read, what it checked, and what it did, with the system’s reply (part 7). Then “why did it refund this?” is answered from one record.
Record rec-7341
refund R-881- Asked
- The customer on order 1042, signed in: “My mug arrived broken.” Photo attached.
- Read
- Order 1042: €36 paid, delivered 14 October. Mug, €12, reported broken, photo on the case. Asked on 17 October.
- Checked
- Example Shop’s playbook, version 1.0.0. Answer: allowed. Clause 2.4: up to €50 needs no approval. Approved by: none needed.
- Did
- Refunded €12 on order 1042, key T-5521-1. Store’s reply: R-881, at 10:14. Support agent, prompt version 14.
Your helpdesk’s logs hold part of it. Open Gorgias’s event log for AI Agent Actions to see each request an action sent and the reply it got; Zendesk’s conversation logs show the actions, the API requests and the agent’s plan, down to the procedure step behind each message. Neither page mentions a version of your rules, so record the rule and its version yourself. If you build your own agent, OpenTelemetry’s draft conventions for generative AI name the fields of a tool call, from its name to its result.
Step 2Keep the facts as they were
Store the facts as the agent read them, as values. The order keeps changing after it acts: a person refunds the rest, the customer sends an item back, the carrier corrects a date. A record that only points to order 1042 shows you the order as it is today. Name the rule’s version for the same reason, since the limit may have changed since (part 8).
A record that points
Refund €12 on order 1042.
Opened in March, order 1042 shows €36 refunded and the mug returned. Was €12 within your rules on 17 October? It can’t say.
A record that keeps
Order 1042 as read on 17 October: €36 paid, delivered 14 October, mug reported broken, photo on the case. Rules 1.0.0, clause 2.4: allowed.
Opened in March, it still says what the agent saw.
Step 3Put the record’s ID on the refund
Questions start in different places: finance from a refund in the payments system, your support lead from the conversation. So write the record’s ID in both. In Stripe, a refund carries metadata, “key-value pairs that you can attach to an object”, and Stripe’s guide says data too big for metadata belongs in your own database, with its ID in metadata, and that card or bank details never go there. In Shopify, a refund takes a note. In the helpdesk, add an internal note to the conversation.
In Stripe or Shopify
The refund’s metadata or note: rec-7341.
In the helpdesk
An internal note on the conversation: rec-7341.
Record rec-7341
Asked, read, checked, did.
The rule
Example Shop’s playbook, version 1.0.0, clause 2.4.
Step 4Keep it as long as a question can come
Keep each record at least as long as the payment can be disputed. Stripe says card networks “typically allow cardholders to initiate disputes within 120 days of the original payment”, and allow more time in some situations. Keep it longer if your company’s own rules for records say so, then delete it: in the EU, the GDPR allows personal data to be kept “for no longer than is necessary for the purposes for which the personal data are processed”. Check your vendor’s limits too: Ada deletes end user data after two years, and says to export what you need before then.
Card disputes
Typically within 120 days of the payment, sometimes later.
Your company’s own period for records
If it runs longer.
Keep until the later end, then delete
The whole series
This is the last of 14 parts. See all 14 parts, or start again at part 1: how to set up an AI support agent.
Where Himmel fits
Himmel keeps a record of every check: the facts it was sent, the rule and version it cited, the answer, and who approved. The agent puts the check’s ID on whatever it then does, such as the refund, and the answer can be reproduced from it later. The check in the record above is the answer Himmel’s engine returned for that case.
Sources
- Stripe API reference, “The Refund object”, read on 21 October 2026.
- Stripe, “Metadata”, read on 21 October 2026.
- Stripe, “How disputes work”, read on 21 October 2026.
- Shopify, “RefundInput”, GraphQL Admin API, read on 21 October 2026.
- Gorgias, “View event logs for AI Agent Actions”, read on 21 October 2026.
- Zendesk help, “Reviewing conversation logs for AI agents”, read on 21 October 2026.
- OpenTelemetry, semantic conventions for generative AI, read on 21 October 2026.
- Regulation (EU) 2016/679 (GDPR), Article 5(1)(e), as adopted, read on 21 October 2026.
- Ada, “Data retention”, read on 21 October 2026.
