SupportFlow tutorial
1. A nine-turn live replay
Start with a recorded support-case session: order verification, a consent-gated return request, a billing handoff, and terminal completion.
This is the current recorded model-backed execution of SupportFlow’s nine-turn scenario, with the clock frozen to 2027-07-15. The interaction shows the stage boundaries and the approval prompt. The policy, refund arithmetic, ticket creation, and post-run durable-state assertions are explained and tested in the later lessons; model wording is not the policy authority.
Run it yourself
- 1
- 2
cd pico-demo
npm run test:support-flow
With OPENAI_API_KEY and PICOFLOW_KEY, the live scenario runs through one memory-backed session. Without live credentials, the deterministic policy tests still run and the live case is skipped.
Captured live transcript
-
1 · Triage
YouHi, I need help with an order I placed.
BotI’d be happy to help with your order. Could you please provide the order number along with the email address or ZIP code associated with it?
-
2 · Triage
YouIt's NW-100412 and the email is dana.whitfield@example.com
BotYour order NW-100412 was placed on 2027-06-28 and delivered on 2027-07-03 via UPS. The tracking number is 1Z999AA10123456784. How can I assist you further with this order?
-
3 · Triage → Returns
YouI want to return the rain jacket.
BotI can help with that.
What’s the main reason you’re returning the rain jacket? Please pick the closest option:
- It arrived damaged
- I received the wrong item
- It’s too small
- It’s too large
- It’s not as described
- I just no longer need it
-
4 · Returns → Approval
BotHere’s what I have ready for your order NW-100412:
A refund is pending for:
| Line |
Amount |
| Timberline 3L Rain Jacket x1 |
$289.00 |
| Items subtotal |
$289.00 |
| Net refund to Visa ending 4021 |
$289.00 |
Reason selected:
Additional note on the request:
- The net refund of 289.00 exceeds the 250 agent approval limit.
Do you want me to proceed with this $289.00 refund to your Visa ending in 4021?
Please reply yes to approve, or no if you do not want to proceed.
-
5 · Approval → Returns
YouActually, hold off for now.
BotI’ve routed your request to our returns department. They will assist you with returning the Timberline 3L Rain Jacket. Is there anything else you need help with?
-
6 · Returns → Triage
YouFine, send back the merino base layers instead, I no longer need them.
BotI’ve routed your request to our returns department for the Cascade Merino Base Layers. They’ll assist you with the return process. Is there anything else I can help you with today?
-
7 · Triage → Billing
YouOne more thing, the charge on this order looks wrong to me.
BotPlease provide a short factual description of the issue with the charge, and I will assist you further.
-
8 · Billing → Escalate
YouYes, CH-88301. I was only expecting to pay for the jacket and the base layers, not that much.
BotI’ve routed your concern about the incorrect charge to our billing department. They’ll review the issue and assist you further. Is there anything else you need help with?
-
9 · Triage → completed · completed
YouThat's everything, thanks.
BotIf you have any other questions in the future or need further assistance, feel free to reach out. Have a great day!
What is code-owned
| Area | Contract |
|---|
| Order verification | Order number and email or ZIP resolve through the local order book. |
| Return decision | AdjudicateStep applies policy and computes a refund without an LLM decision. |
| Approval | A refund over the agent authority limit must have explicit confirmation before it is committed. |
| Billing | The disputed amount is derived from ledger entries before EscalateStep creates the ticket. |
Next
2. Designing a support case maps the hub-and-spoke routes, durable owners, and deterministic workers behind this session.