Skip to content

Reply window and templates

Some messaging channels accept free-text messages from a business only for a limited time after the contact’s last message. WhatsApp is the best-known case: you can reply freely for 24 hours; after that, you can only send a template that Meta approved in advance. amabledata applies these rules for you in the inbox and in the New message dialog of each contact, so that you never send a message the provider would refuse.

  • Where: the composer at the bottom of a thread in CRM › Conversations (/t/<workspace>/conversations), and New message in the Conversations card of a contact.
  • Who: anyone with conversations:write (see Limits and permissions).
  • Which channels: only channels whose app declares a reply window. Today this is WhatsApp through the Kapso WhatsApp app (24 hours). Channels without a reply window accept free text at any time. See Channels.

Each channel may declare a reply window, from 1 to 720 hours. For such a channel:

  • The window opens every time the contact sends a message, and stays open for the declared number of hours after that message.
  • While the window is open, you can send free text (and, optionally, a template).
  • When the window is closed, free text is refused: you can only send an approved template.
  • A conversation in which the contact never wrote (for example one that you start from the contact page) counts as closed: you must start it with a template.
  • Sending a template does not reopen the window. It reopens only when the contact answers.
  • Internal notes are never sent, so they are always allowed.

The check is based on elapsed time since the contact’s last incoming message, and it is enforced both in the composer and on the server: a free-text reply sent through the API to a closed window is refused.

A channel that declares a reply window must also offer templates; that way a closed conversation can always be reopened.

A template is a message prepared and approved on the provider’s side (for WhatsApp, reviewed by Meta). amabledata does not store templates: every time you need them, it asks the channel app for the templates that can be sent right now (approved and supported). Each template has:

  • a name, a language and a category (for WhatsApp: marketing, utility or authentication);
  • a body text with placeholders written as {{key}};
  • a list of parameters (up to 20), each with a key and, optionally, an example value.

You create and manage templates in the channel app. With Kapso WhatsApp, open the app’s WhatsApp templates page to submit templates to Meta and follow their review.

When you send a template, amabledata passes the template id and the parameter values to the app, which builds the provider message from its own copy of the template. The thread first shows the preview text you saw in the composer, marked with a small Template label; if the app returns the final rendered text, the thread updates to show exactly what the contact received.

Situation What the composer shows
Channel without reply window Free-text box. No banner.
Reply window open, channel offers templates Free-text box, plus a Template button to send a template anyway.
Reply window closed, channel offers templates Amber banner “More than {hours} hours since the contact last wrote: the channel only accepts an approved template until they answer.” and the template picker instead of the text box.
Reply window closed, channel offers no templates Amber banner “More than {hours} hours since the contact last wrote: this channel cannot reopen the conversation until they write again.” The text box is disabled.
Note mode (Internal note pressed) Free-text box for the note, no banner, whatever the window.

{hours} is the channel’s reply window (24 for WhatsApp).

Reply with a template when the window is closed

Section titled “Reply with a template when the window is closed”
  1. Open the conversation in CRM › Conversations. The amber banner tells you the window is closed and the template picker is shown.

  2. Open the selector Choose a template. Each option reads “name · language · category”.

  3. Fill every parameter field. Each field is labelled with the parameter key, and shows the example value when the template has one (“key · example”).

  4. Check the Preview box under the fields: it shows the body with your values. Placeholders you have not filled stay visible as {{key}}.

  5. Click Send. It is enabled only when a template is selected and every parameter has a value.

After sending, the composer resets. When the contact answers, the window opens again and the normal text box comes back.

  1. Open the conversation and click Template under the text box (the button is shown only for channels that offer templates and only while the window is open).

  2. Choose the template, fill the parameters and check the preview.

  3. Click Send. To go back to free text without sending, click Template again.

  1. Open the contact and click New message in the Conversations card.

  2. Choose the channel if more than one is available.

  3. If the channel has a reply window and the contact has not written on it recently, the dialog says “To write first, this channel requires an approved template.” and shows the template picker. Choose the template and fill its parameters.

  4. Click Send. The inbox opens on the conversation.

If the contact wrote recently on that channel (within the window), the dialog shows a normal text box instead.

Element Details
Choose a template Required. Lists the templates the app returned (at most 500).
Parameter fields One per parameter, all required, up to 1,000 characters each. Leading and trailing spaces are trimmed.
Preview The template body with the values filled in.
Loading “Loading…” while the app answers.
No templates “No approved template yet: create one from the channel app and wait for the review.”
App not answering “The channel app does not answer: templates cannot be loaded right now.”

The list of templates is kept for one minute in your browser, then asked again to the app.

GET /api/v2/t/<workspace>/conversations/channels/<channel id>/templates returns { "data": [...] } with these fields. It needs conversations:read.

Field Type Limits
id string 1–200 characters.
name string 1–200 characters.
language string or null Up to 20 characters.
category string or null Up to 40 characters.
text string Up to 4,096 characters, with {{key}} placeholders.
params array Up to 20 items { "key", "example" }; key is 1–64 letters, digits or _; example up to 200 characters or null.

Entries that do not match these rules are skipped.

Replies (POST /api/v2/t/<workspace>/conversations/<id>/messages) and new conversations (POST /api/v2/t/<workspace>/conversations) accept a template object instead of, or together with, text:

{
"text": "Hi Anna, your order 1042 has shipped.",
"template": { "id": "order_shipped", "params": { "name": "Anna", "order": "1042" } }
}
Field Rules
template.id Required, 1–200 characters.
template.params Object of key → value; keys 1–64 letters, digits or _; values up to 1,000 characters. Default {}.
text Optional with a template: the preview to show in the thread until the app returns the final text. Up to 4,096 characters.
note Cannot be combined with a template.

See REST API for authentication and conventions.

Action Permission Roles
See templates of a channel conversations:read Owner, Admin, Marketer, Sales, Analyst, Viewer
Send templates and free text conversations:write Owner, Admin, Marketer, Sales
Create or edit templates Done in the channel app (for Kapso WhatsApp, its WhatsApp templates page). —
Limit Value
Reply window 1–720 hours, as declared by the channel (WhatsApp: 24)
Templates listed 500 per channel
Parameters per template 20
Parameter value 1,000 characters
Time for the app to list templates 8 seconds
Symptom Cause Fix
The text box is replaced by Choose a template The reply window is closed: the contact last wrote more than the window ago, or never wrote. Send an approved template, or wait for the contact to write.
“No approved template yet: create one from the channel app and wait for the review.” The app has no template that can be sent now (none created, or all still in review or rejected). Create a template in the channel app and wait for the provider’s approval.
“The channel app does not answer: templates cannot be loaded right now.” The app did not answer within 8 seconds, answered with an error, or is paused. Retry later; check that the app is active in Settings › Apps.
Send stays disabled with a template selected A parameter is empty. Fill every parameter field.
“Not delivered: <reason>” on a template message The app or the provider refused it (for example a missing parameter or a template no longer approved). Fix the cause the reason describes and send again.
“template: the reply window of this channel is closed: send a template to reopen the conversation” (API) Free text sent to a closed window. Send a template instead.
“text: text or template is required” (API) Neither text nor template was sent. Provide one of them.
“template: notes cannot be templates” (API) note: true combined with a template. Send the note without the template.