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:

  1. Write one record per action
  2. Keep the facts as they were
  3. Put the record’s ID on the refund
  4. Keep it as long as a question can come

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, 17 October ASKEDREADDID CHECKED The customer on order1042, signed in:“My mug arrivedbroken.” Photo attached Order 1042: €36 paid,delivered 14 OctoberMug, €12, reportedbroken, photo on the caseAsked on 17 October Example Shop’s playbook,version 1.0.0Answer: allowedClause 2.4: up to €50needs no approvalApproved by: noneneeded Refunded €12 onorder 1042Key T-5521-1Store’s reply: R-881,at 10:14Support agent,prompt version 14

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.
One record, as an example. The answer and the clause are as the rules engine returned them for these facts; the box at the end of this part says which engine.

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 A record that keeps Refund €12 on order 1042. Opened in March, order 1042shows €36 refunded and themug returned. Was €12 within your rules on17 October? It can’t say. Order 1042 as read on 17 October:€36 paid, delivered 14 October,mug reported broken, photo onthe case. Rules 1.0.0, clause 2.4:allowed. Opened in March, it still sayswhat the agent saw.

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.

The same refund, recorded two ways, as an example. Opened months later, only the second still shows 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 ShopifyIn the helpdeskThe rule Record rec-7341 The refund’s metadata ornote: rec-7341An internal note on theconversation: rec-7341Asked, read,checked, didExample Shop’s playbook,version 1.0.0, clause 2.4

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.

Why did it refund this? The same ID on the refund and on the conversation leads back to the record from either end. An example.

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.

The payment, then the refund Card disputes: typically 120 daysYour company’s own period for records, if longer Keep until thelater end, thendelete

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

How long to keep a record, as an example: until a dispute can no longer arrive, or longer if your own rules for records say so. Then delete it.

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

  1. Stripe API reference, “The Refund object”, read on 21 October 2026.
  2. Stripe, “Metadata”, read on 21 October 2026.
  3. Stripe, “How disputes work”, read on 21 October 2026.
  4. Shopify, “RefundInput”, GraphQL Admin API, read on 21 October 2026.
  5. Gorgias, “View event logs for AI Agent Actions”, read on 21 October 2026.
  6. Zendesk help, “Reviewing conversation logs for AI agents”, read on 21 October 2026.
  7. OpenTelemetry, semantic conventions for generative AI, read on 21 October 2026.
  8. Regulation (EU) 2016/679 (GDPR), Article 5(1)(e), as adopted, read on 21 October 2026.
  9. Ada, “Data retention”, read on 21 October 2026.