Preview. Workflow campaigns that message on WhatsApp are being rolled out to pilot accounts. This page is the contract your gateway implements for them; nothing changes for agents you already run.
- The customer’s reply reaches Osvi through Send Message or Send Message (Async), as any inbound message does.
- The agent’s replies come back to you on the Chat Delivery Webhook.
Where it’s sent
Template requests go to the same place as every other delivery: the chat agent’s Delivery URL, with the agent’s Delivery headers. The agent’s Settings tab has both, in the Delivery card. A chat agent needs a delivery URL before it can be added to a workflow campaign.Telling the two apart
Every template request carries"kind": "template". Ordinary reply deliveries have no kind field. Treat a missing kind as an ordinary reply, so an endpoint that already handles replies keeps working unchanged.
The template envelope
Registering templates
You choose which templates a workflow may send. Under the chat agent’s Settings, in the Delivery card, list each approved template with:- its name and language;
- its placeholders, in order, with a short description of each (for example “1: the contact’s first name”).
Your response
Answer within 15 seconds.
A 2xx body is optional. If you send one, Osvi keeps the provider’s message id with the step:
Retries
Retries follow the same schedule as reply deliveries: up to 6 attempts in total, a few seconds apart at first and up to about a minute apart later. ARetry-After header on a 429 is respected.
Every attempt carries the same idempotency_key. If you already sent the template for that key, answer 2xx again and don’t send it a second time.
Throughput
When a campaign’s batch starts, Osvi sends template requests at a steady rate per agent, not all at once. If your provider limits your sending rate, answer 429 with aRetry-After header and Osvi slows down.
What a test request looks like
When the operator sends a test message from the workflow editor, Osvi sends the same envelope, with the operator’s own number ascustomer_id. Treat it like any other request.
Checklist for your gateway
- Route envelopes by
kind:templatesends a template, and nokindsends the reply text as you do today. - Send the template with your WhatsApp provider, using
template.name,template.languageandtemplate.params. - De-duplicate on
idempotency_key. - Answer 2xx when the provider accepts the message, 4xx with a
reasonwhen it refuses for good, and 429 or 5xx when it’s worth trying again. - Forward the customer’s replies to Osvi for the same
customer_idand agent, as you already do. - Give us a stage (sandbox) delivery URL to test against before your production one.
