picoflow.io Docs

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

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. 1 · Triage

    You
    Hi, I need help with an order I placed.
    Bot

    I’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. 2 · Triage

    You
    It's NW-100412 and the email is dana.whitfield@example.com
    Bot

    Your 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. 3 · Triage → Returns

    You
    I want to return the rain jacket.
    Bot

    I 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. 4 · Returns → Approval

    You
    It's too big for me.
    Bot

    Here’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:

    • too_large

    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. 5 · Approval → Returns

    You
    Actually, hold off for now.
    Bot

    I’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. 6 · Returns → Triage

    You
    Fine, send back the merino base layers instead, I no longer need them.
    Bot

    I’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. 7 · Triage → Billing

    You
    One more thing, the charge on this order looks wrong to me.
    Bot

    Please provide a short factual description of the issue with the charge, and I will assist you further.

  8. 8 · Billing → Escalate

    You
    Yes, CH-88301. I was only expecting to pay for the jacket and the base layers, not that much.
    Bot

    I’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. 9 · Triage → completed · completed

    You
    That's everything, thanks.
    Bot

    If 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

AreaContract
Order verificationOrder number and email or ZIP resolve through the local order book.
Return decisionAdjudicateStep applies policy and computes a refund without an LLM decision.
ApprovalA refund over the agent authority limit must have explicit confirmation before it is committed.
BillingThe 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.