pinecall template
An agent sends a contact one WhatsApp template; the sandbox answers and sends nothing.
pinecall template <agent> <name> --to <number> --language <code> [--var <words>]… [--from <number>] [--text <words>] [--metadata <json>]
$ pinecall template reminder visit_reminder --to +14155550142 --language en_US --var Ana --var "tomorrow at 9:30"
reminder would send visit_reminder to +14155550142 · sandbox · simulated: nothing was sent
→ --prod sends it: Meta charges the number's account for a template
$ pinecall template reminder visit_reminder --to +14155550142 --language en_US --var Ana --var "tomorrow at 9:30" --prod
reminder sent visit_reminder to +14155550142 from +14155550134 · production · wamid.HBgLMTQxNTU1NTAxNDIVAgARGBI4MjdBQTFFQzEyNDY5NERFQjcA
The agent sends the contact one WhatsApp template: the message approved at Meta that opens a
conversation there, and the one Meta charges for, on the account of whoever owns the number. <name>
is the template's name and --language the code of the language it was approved in; each --var
fills the body's next {{n}}, in order. In production it leaves from the number the agent answers
WhatsApp at (--from picks one of several) and the line ends with Meta's id of the message. In the
sandbox nothing is sent: the answer says what would have gone, and the agent needs no WhatsApp
number there. A contact who asked for no more messages is written to by nobody (pinecall data consent <number> says who did). What Meta refuses (a template it does not know, a number not on
WhatsApp) is said in its own words.
--text is what the template says once filled, and it puts the message on the contact's
conversation: those words are the first turn of an outbound WhatsApp call, what the contact answers
reaches the agent with them before it, and a second line names the call (pinecall sessions <call>).
--metadata is what that call's call.started carries. Somebody must be holding the agent. A
contact whose conversation is still open is written on it, and no template is sent. With no --text
the template is said on no conversation: what they answer opens one as any message does.