SaaS billing desk
Sort billing messages, check unknown charges for account takeover, process cancellations as asked, and match the reply to the customer's mood.
Scenario paths
Pick a predefined path to highlight it through the chain. No model is called; outcomes are illustrative.
- Steps
- Endpoints
- Refund request resolution
- Send payment update link
- Cancel and confirm
- Cancel, then support follow-up
- Cancel, mention pausing
- Billing queue
- Billing priority queue
- Security team
- Billing agent
What each endpoint means
Refund request resolution · Handoff
Duplicate and post-cancel charges continue in the refund chain.
Continues in Refund request resolutionSend payment update link · Automated
A secure link to update the card; no card details in the conversation.
Cancel and confirm · Automated
Cancelled as asked; the reason is stored for reporting.
Cancel, then support follow-up · Automated
Cancelled as asked; support later asks about the technical problem.
Cancel, mention pausing · Automated
Cancelled as asked; the confirmation mentions that a paused plan is available for next time.
Billing queue · Automated
Standard billing queue.
Billing priority queue · Automated
Top of the billing queue with an acknowledgement sent.
Security team · Human review
A security-trained person verifies the owner and secures the account.
Billing agent · Human review
An experienced billing agent handles it personally.
Steps
Name the billing issue.
- Unrecognized chargeAccount takeover signal
- Duplicate or post-cancel chargeRefund request resolution
- Plan or price questionCustomer frustration
- Failed paymentSend payment update link
- CancellationCancellation reason
- Billing agentBilling agent
Question, inputs and notes
Asks:What billing issue is the customer raising?
Receives
- Inputmessage
- Inputaccount
Check whether someone else may have used the account.
- Security teamSecurity team
- Possible signalBilling agent
- Continue normal flowCustomer frustration
Question, inputs and notes
Asks:Does this message, with these account events, describe signs that someone other than the customer accessed or used the account?
Receives
- Inputmessage
- Inputsecurity_events
Branches
- Possible signal: A billing agent checks with the account owner through a known contact.
- Cancellation reasonChoice
Record why they're leaving. The cancellation is not held up.
- Too expensiveMissing featureSwitching toolsNot using enoughRecord as unclearCancel and confirm
- Technical problemsCancel, then support follow-up
- Temporary pauseCancel, mention pausing
Question, inputs and notes
Asks:What is the main reason the customer gives for cancelling?
Receives
- Inputmessage
- From step 1Issue: cancellation
- Customer frustrationScore
Match the replier to the customer's mood.
- Standard replyBilling queue
- Prioritize and acknowledgeBilling priority queue
- Experienced agentNeeds a personBilling agent
Question, inputs and notes
Asks:How frustrated does the customer sound in this message?
Receives
- Inputmessage
- Inputprior_contacts
About this chain
Goal and input
Every billing message ends in the refund flow, a card update link, a processed cancellation, the right billing queue, the security team, or a person.
The customer's message, account and billing facts, and recent security events.
- message
- The customer's message.
- account
- Plan, invoices and status from your billing system.
- security_events
- Recent login and account changes.
- prior_contacts
- Earlier contacts about the same issue, counted in code.
How it runs
- The cancellation branch has no path that stops or delays a cancellation; every reason, including an unclear one, ends in the cancellation being processed.
- Billing issue, takeover signal and frustration can be asked in one fan-out request; code follows the branches above to decide which answers count.
Sources (4)
Primary documentation this chain builds on.
- SourcedTypeSafe docs · DocumentationSystem One
- SourcedTypeSafe docs · PatternSpeculative fan-out
- SourcedTypeSafe docs · PatternRouting by probability
- SourcedHugging Face · Model cardKev-4B model card