AI support agent on a text number
How to run two-way customer support over SMS, iMessage and WhatsApp from one number and one webhook, keep order ids in conversation state, and escalate to a human in the same thread.

A customer of a meal-kit company opens her messages, finds the thread from last week's delivery text and types "the ice packs were melted, chicken was warm". No ticket form, no "your estimated wait time is", no chat widget that forgets her the moment she closes the tab. Three minutes later: "Sorry about that. I have refunded the chicken from order 7781 and added a note for Thursday's driver. Want me to add a replacement to that box?"
That is support on a text number. The customer uses the app they already have open, the thread persists forever, and the agent does the first 80% of the work before a human ever sees it.
One webhook, three channels
SMS, iMessage and WhatsApp customers all reach you through the same agent.message event. The channel field says which. Your handler does not need three integrations; it needs one function that takes a message and history and returns a reply, and one POST /v1/messages call to send it. Voice transcripts arrive on the same event too, so a customer who calls and then texts is one thread to your code.
{"event": "agent.message","channel": "imessage","data": {"from": "+14155550122","message": "the ice packs were melted, chicken was warm","conversationId": "conv_9c2e"},"recentHistory": [{ "direction": "outbound", "content": "Hearth Kitchen: your box for Thu Nov 13 has been delivered." }],"conversationState": { "customerId": "cus_4412", "lastOrderId": "7781" }}
Notice conversationState. You set it when you sent the delivery text, and it has been riding on every event since. The agent does not ask "what is your order number". It already has it.
Keeping state on the conversation
The pattern that works: whenever your system learns something about the customer in this thread, write it to conversationState on the conversation. Order id, account id, which human last touched it, whether the customer has opted into marketing, the language they write in. The state is per conversation, not per message, so it survives weeks of silence. When the customer comes back next month with "same problem", the agent knows what "same" was.
recentHistory covers the recent turns. conversationState covers the facts. Between them, most support replies need no database round trip at all, and the ones that do (a refund, a reship) hit your own systems with ids already in hand.
Escalating without losing the thread
Some messages should go to a person: anything angry, anything legal, anything the agent has failed to resolve in two turns. Your handler sets an owner in conversationState, posts the thread into your support tool and stops auto-replying. The human answers through your own tooling or the dashboard, on the same number, and the customer sees one continuous conversation. When the human is done they clear the flag and the agent is back.
Tell the customer what is happening. "I am bringing in Sam from our team, he will reply here" is enough. Silence while a human reads the thread is what makes people type "hello??" four times.
Channel notes
- SMS is the default and reaches every phone. $0.02 a segment each way. Outbound from a US number needs 10DLC registration, $25 once for a sole proprietor or standard brand.
- iMessage gets read receipts and tapbacks, and a thumbs-up on "did that fix it?" is a resolution. The line is $250 a month to send and receive, nothing per message, no carrier registration.
- WhatsApp is where international customers are. Bring your own WhatsApp Business Account, we charge $0, Meta bills conversation fees directly. Beta.
- MMS at $0.03 lets the customer send a photo of the melted ice pack. The photo arrives on the same event.
What it costs
| Item | Price |
|---|---|
| Number | $3 per month |
| SMS, each direction | $0.02 per segment |
| MMS | $0.03 per message |
| iMessage line | $250 per month, nothing per message |
| $0 from us, Meta bills conversation fees | |
| 10DLC registration | $25 once for a sole proprietor or standard brand |
A support line handling 3,000 inbound texts a month with one reply each is about $120 on SMS. Prices are from the pricing page.
FAQ
Can one webhook handle SMS, iMessage and WhatsApp support? Yes. All three deliver the same agent.message event with a channel field, and you reply to all three with the same POST /v1/messages call.
How does the agent know which order the customer is asking about? You store the order id in conversationState when you send the delivery text. It rides on every later event in that conversation, so the agent has it before the customer says anything.
How do I hand a support conversation to a human? Mark the conversation in conversationState, route it to your support tool and stop auto-replying. The human answers on the same number and the customer stays in one thread.
Do customers need to opt in for support texting? They need to have given you their number and agreed to texts, which a checkout or account signup usually covers. Replies to a thread they started need no separate consent, and STOP is honoured per number automatically.
Can customers send photos? Yes, over MMS at $0.03 a message, over iMessage, or over WhatsApp. The image arrives on the same webhook event as text.


