whatsapp integration holding its
credential, and a whatsapp.message.inbound trigger
pointing at a published text agent. The same integration sends
template batches and, on Twilio, takes
WhatsApp calls.
Talqing does not register senders or create templates; do both at your BSP. Your
BSP and Meta bill you for WhatsApp traffic; Talqing charges its
per-message platform fee when the agent
answers.
Set it up
1
Connect the number
In WhatsApp → Numbers, press Connect number.For Gupshup,
- Twilio — the Account SID and the account’s Auth Token (not an API
key: Twilio signs its webhooks with the Auth Token). Find numbers lists
the account’s senders (
POST /v1/whatsapp/twilio-senders); onlyONLINEsenders can be picked. Each becomes its own integration. - Gupshup — the app ID, the app name exactly as Gupshup shows it, an API key from the app’s Settings → API Keys, and the WhatsApp number.
ONLINE, and Gupshup must accept the key for that app. The
credential is stored as a workspace secret.credentials_ref is the API key and provider_account_info is
{"bsp": "gupshup", "app_id": "…", "app_name": "AcmeSupport", "sender_e164": "+919876543210"}.One number is one integration; a second connection for the same number is
refused. The number cannot be changed later — connect the other number
instead. Rotate the credential with a PATCH of credentials_ref.2
Choose who answers messages
Pick a published text agent in the number’s Messages cell, or create the
trigger over the API:Enabling registers Talqing’s webhook with the BSP. On Twilio it replaces any
URL set on that sender. On Gupshup it appears in the app’s Webhooks tab as
talqing-<integration id>; leave it there. Disabling the trigger, or
disabling or deleting the integration, removes it.3
Message the number
Send the number a WhatsApp message. On Twilio you see a typing indicator
(Gupshup has none), then the reply. The thread appears under
Conversations with surface
whatsapp.Using a number from another carrier
Twilio registers any number you own as a WhatsApp sender, including one rented from a carrier such as Plivo; the carrier keeps its phone calls and Twilio carries WhatsApp. Meta verifies the number with a code by SMS or voice call, so if the number already answers calls through a Talqing agent, forward it to a phone you can answer while you register, then put it back (Run setup again on the number in Telephony → Phone Numbers). A message sent before the new sender isONLINE fails with Twilio 63007. On a number that does both, a
person is one contact whether they call it or message it on WhatsApp — see below.
What the agent knows
The contact key isphone:<your number>:<their number> — the same contact their
phone calls and WhatsApp calls to that number use, with one userdata. Someone who
hides their number on WhatsApp is whatsapp:<your number>:<their WhatsApp id>.
Their 24-hour WhatsApp window — when free-form messages are allowed — is on the
conversation’s contact as
ref.whatsapp_window_expires_at. Any message or call from
them refreshes it, answered or not.
Someone who first heard from you through a batch
also carries that row’s columns as {{userdata.<column>}}, and the template sits
in the thread as the agent’s first message. The same goes for a template or
message you posted with userdata: a chat their reply
starts begins from the userdata of everything posted since the thread’s last
session, so even an agent on context: none knows what the send carried.
To message someone yourself — a template, text as the agent, a note for the agent,
or an instruction it acts on — see posting into a conversation.
One chat until it ends
All of a person’s messages join one chat. It ends when the agent runsend_call, you call
POST /v1/chats/{id}/end, or 24 hours pass without a message from them
(inactivity_timeout); their next
message starts a new chat, in a new conversation unless the agent’s
conversation.context is transcript.
Analysis and session.completed happen when a
chat ends, so give the agent an end_call tool.
On an inactivity_timeout WhatsApp’s 24-hour window has usually closed, so a
message the agent’s on_exit hook sends is not delivered (it is recorded as
failed); the hook’s tools and userdata changes still run.
- A reply to a template joins the template’s conversation, whatever
contextsays. - Switching the Messages agent ends the chats it opened (
close_reason: "replaced") at once; the new agent answers their next message in a new chat. Turning Messages off ends every open chat (messages_off). - A post or batch can choose the agent instead; that chat keeps running whatever Messages is switched to.
- A message to a number with no agent on Messages, and none chosen for them, is stored in the thread and starts no chat.
{{vars.*}}, secrets, overrides and labels come from the post that chose the agent, or else from your inbound webhook, asked once when a chat opens, for an agent that turns it on; otherwise the agent runs on its declared defaults.
What is delivered
What reaches the agent:
A button’s
payload is what you attached to it in the template; it is stored for your
systems and never shown to the agent. replied_to is the provider_message_id of the
template message the tap answers. Up to 4 files per message are kept. Buttons, files
and captions are read on Twilio senders; Gupshup reads plain text only and drops
everything else.
Every stored file also fires conversation.attachment.received
as soon as it is stored, with a link to download it.
Replies are text. One longer than 4,096 characters is split at the last line or word
break and sent in order.
WhatsApp lets a business send free-form messages only within 24 hours of the
customer’s last message. A reply is always inside that window; starting a
conversation takes an approved template, which is what
batches send.
reply_mode
When something fails
Next
WhatsApp calls
Answer calls to a Twilio number with a voice agent.
Creating a batch
Start conversations with an approved template.