Reply to a ticket with an AI draft

A support agent opens a ticket and asks an AI assistant to draft a reply and a refund. The agent edits, sends or rejects the draft, and a refund over $100 needs a team lead's approval; an experiment sends simple drafts with no refund without the agent's review. If the assistant fails, the agent writes the reply by hand; if no draft arrives within 30 seconds, a toast sends the agent back to the ticket to try again.

14 screens and steps21 arrows0 warnings

What UJN shows here Point at a note to see its part of the drawing

Reply to a ticket with an AI draft  AI_REPLYAn AI assistant drafts the reply and the refund; the agent decides what is sentStart Agent opens a ticketStartAgent opens a ticketTicket (View) Customer message and order Route: /tickets/:idViewTicketCustomer message and order/tickets/:idAsk for a draft (Action) Removes card dataActionAsk for a draftRemoves card dataAI assistant (System, external) Host: api.ai.exampleSystem, externalAI assistantapi.ai.exampleDrafting a reply (Waiting) Until the draft arrivesWaitingDrafting a replyUntil the draft arrivesDraft arrives (Event) Timeout: 30 sEventDraft arrives30 sNo draft yet (Toast) Try again from the ticketToastNo draft yetTry again from the ticketReview draft (View) Edit the reply and refund amount Route: /tickets/:id/draftViewReview draftEdit the reply and refund amount/tickets/:id/draftReply editor (View) Written by hand Route: /tickets/:id/replyViewReply editorWritten by hand/tickets/:id/replyCheck refund (Action) Limit is $100ActionCheck refundLimit is $100Team lead (Actor) Role: Support leadActorTeam leadSupport leadIssue refund (Action)ActionIssue refundSend reply (Message) Channel: emailMessageSend replyemailEnd, success Customer answeredEnd, successCustomer answeredNo label Navigation from from_queue to TicketDraft with AI Navigation from Ticket to Ask for a draftDraft with AINo label Navigation, call from Ask for a draft to AI assistant Payload: {ticket_text, order_items} Context: Card numbers and payment details are never sent to the AI service{ticket_text, order_items}No label Navigation from Ask for a draft to Drafting a replyNo label Navigation from Ask for a draft to Draft arrivesCancel Return from Drafting a reply to TicketCancelneeds review Navigation from Draft arrives to Review draft Payload: {reply_draft, refund_amount}needs review{reply_draft, refund_amount}simple, no refund Navigation from Draft arrives to Send reply Flags: experiment (an A/B test or pilot)simple, no refund◇failed Negative from Draft arrives to Reply editorfailedtimeout Negative from Draft arrives to No draft yettimeoutNo label Return from No draft yet to TicketSend Navigation from Review draft to Check refund Payload: {reply, refund_amount}Send{reply, refund_amount}Reject Negative from Review draft to Reply editorRejectSend Navigation from Reply editor to Check refund Payload: {reply, refund_amount}Send{reply, refund_amount}no refund Navigation from Check refund to Send replyno refundrefund up to $100 Navigation from Check refund to Issue refundrefund up to $100over $100 Navigation from Check refund to Team leadover $100Approve Navigation from Team lead to Issue refundApproveReject Negative from Team lead to Reply editorRejectNo label Navigation from Issue refund to Send replyNo label Navigation from Send reply to sent
The source (47 lines)
ai-approval.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey AI_REPLY "Reply to a ticket with an AI draft"description: "An AI assistant drafts the reply and the refund; the agent decides what is sent"unique_id_friendly: ai_reply start from_queue { description: "Agent opens a ticket" }view ticket { title: "Ticket"; description: "Customer message and order"; route: /tickets/:id }action ask_ai { title: "Ask for a draft"; description: "Removes card data" }system assistant { type: external; title: "AI assistant"; host: api.ai.example }view drafting { type: waiting; title: "Drafting a reply"; description: "Until the draft arrives" }action draft_ready { type: event; title: "Draft arrives"; timeout: 30 s }view no_draft { type: toast; title: "No draft yet"; description: "Try again from the ticket" }view review { title: "Review draft"; description: "Edit the reply and refund amount"; route: /tickets/:id/draft }view write_reply { title: "Reply editor"; description: "Written by hand"; route: /tickets/:id/reply }action submit { title: "Check refund"; description: "Limit is $100" }actor lead { title: "Team lead"; role: Support lead }action issue_refund { title: "Issue refund" }action send_reply { type: message; title: "Send reply"; channel: email }end sent { type: success; description: "Customer answered" } from_queue --> ticketticket --> ask_ai : [Draft with AI]ask_ai --> assistant{  payload: [ticket_text, order_items]  context: "Card numbers and payment details are never sent to the AI service"}ask_ai --> draftingask_ai --> draft_readydrafting ..> ticket : [Cancel]draft_ready --> review : needs review { payload: [reply_draft, refund_amount] }draft_ready --> send_reply : simple, no refund { flags: [experiment] }draft_ready -x-> write_reply : faileddraft_ready -x-> no_draft : timeoutno_draft ..> ticketreview --> submit : [Send] { payload: [reply, refund_amount] }review -x-> write_reply : [Reject]write_reply --> submit : [Send] { payload: [reply, refund_amount] }submit --> send_reply : no refundsubmit --> issue_refund : refund up to $100submit --> lead : over $100lead --> issue_refund : [Approve]lead -x-> write_reply : [Reject]issue_refund --> send_replysend_reply -right-> sent@endujn