Billing Ticket Router
ivy.agent.billing-ticket-router · v1.1.0
ivyx
Has a model decide whether a support ticket is about billing, mails a billing ticket to the billing team, and drafts a short reply for every ticket.
Steps
In the order the agent's file lists them, each with where its inputs come from and the values the file fixes. A branch or a loop is a step too.
- 01Model turnDecide if the ticket is about billing
Analyze the ticket text and determine if it relates to billing. Return true if it is about billing, false otherwise.
- takes
contextfrom the agent's input,message- returns
is_billing
- 02BranchOnly a billing ticket
Lets what follows run only when output.is_billing of step 1 is true.
- 03Ivy NodeMail the ticket to billingivy.node.email-send
Sends a plain-text or HTML email through an SMTP server in one step and returns the recipients it went to.
Runs only on the then branch of step 2.
- takes
bodyfrom the agent's input,messagesubjectfrom the agent's inputfrom_addrfrom the agent's input,usernameusernamefrom the agent's inputtofrom the agent's inputsmtp_hostfrom the agent's inputsmtp_portfrom the agent's inputuse_tlsfrom the agent's input,smtp_tls- set
smtp_hostsmtp.gmail.comsmtp_port587use_tlstruesubjectSupport ticket: billing- secret
passwordthe stored secret mail-password- returns
sent
- 04Model turnDraft a short reply
Draft a short, polite reply to the customer acknowledging their ticket.
- takes
contextfrom the agent's input,message- returns
reply
Nodes it brings
Adding this agent in IVYX Studio adds these nodes with it. A node your workspace already has is kept as it is, even at another version.
What it touches
Collected from what each of its nodes declares and what the agent's own file declares, such as moving a robot, plus the model call when a step is a model turn. A declaration is the author's statement, and it is what policy rules select on.
What it needs
- A stored secret named
mail-password. The agent's file carries the name, never the value.
Inputs
| Field | Type | Description |
|---|---|---|
| messagerequired | string | The ticket text. |
| usernamerequired | string | The sending address, which is the login name; its password is the stored secret mail-password. |
| torequired | string | The billing team's address. |
| subject | string | The subject of the mail to billing. |
| smtp_host | string | The SMTP server; smtp.gmail.com when left out. |
| smtp_port | integer | The SMTP port; 587 when left out. |
| smtp_tls | boolean | Upgrade SMTP with STARTTLS; on when left out. |
Outputs
| Field | Type | Description |
|---|---|---|
| is_billing | boolean | True when the ticket is about billing. |
| sent | boolean | True once the server accepted the mail to billing; absent when nothing was sent. |
| reply | string | The drafted reply to the customer. |
Tests
2 of 2 test cases passed on Oct 7, 2026, in the publisher's own environment, before this version was published. The registry keeps that record; it does not run the cases again.
Requires: python:3.9, a model core, an SMTP server (Gmail unless smtp_host says otherwise) with the sending account's password stored as the secret mail-password, for the cases, GreenMail on 127.0.0.1:3025 (mkdata-mail.py)
- billing-ticket
A double charge is billing: it is mailed to billing and a reply is drafted.
- given
smtp_host127.0.0.1smtp_port3025smtp_tlsfalsemessageHello, I was charged twice for invoice 1042 this month. Please refund the duplicate charge.usernameagent@ivyx.testtoagent@ivyx.test- expects
is_billingequals truesentequals truereplymatches \w
- product-ticket
A broken button is not billing: nothing is mailed and a reply is drafted.
- given
smtp_host127.0.0.1smtp_port3025smtp_tlsfalsemessageHi, the export button in the dashboard does nothing when I click it. Can you help?usernameagent@ivyx.testtoagent@ivyx.test- expects
is_billingequals falsereplymatches \w