---
title: Channel window and WhatsApp templates
summary: A channel lets the business answer for a day after the client's last message. After that Instagram and Messenger take no reply from Talemo, and WhatsApp takes only a template approved by Meta, which Talemo uses for visit confirmations, move messages, reminders and cancellations, for a message to a client who did not come and for an invitation to come again.
tools: [talemo_get_channel, talemo_list_channel_templates, talemo_set_channel_template, talemo_send_message]
related: [channels-and-connections, who-answers, conversation-and-person, handoff-to-people, draft-replies]
search: [24 hour window, message templates, WhatsApp Business API rules]
---

# Channel window and WhatsApp templates

## The window

The business answers a client in the channel the client wrote from, and only inside
the channel window: a day after the client's last message. A new message from the
client opens the window for another day.

- **Instagram and Messenger.** After a day the window is closed: "You can't answer
  from here — open the chat in the Instagram app" (or in Messenger of the page).
  Talemo does not ask Meta for the right to answer later.
- **WhatsApp.** After a day WhatsApp takes only a template, and a free-text reply
  cannot be sent from Talemo. A reply from the WhatsApp Business app on the business
  phone still reaches the conversation.
- **A client who has not written since the channel was connected.** Talemo cannot
  start a chat with such a client.

The conversation says when the window is closed. A reply that cannot go out stays in
the conversation as "Not sent: {reason}", and **Send again** is offered when the
reason may pass and the window is still open. If the client wrote, nobody answered
and the window closed, the case "The {channel} window with {name} closed" waits in
[Waiting for you](../work/item-kinds.md) until the client gets an answer.

WhatsApp messages from Talemo need a payment method at Meta, otherwise they do not go
out. Meta charges for every message of the business by its own rates; the first 1,000
replies a month per number carry no charge. That is Meta's bill to the salon's account,
and it is not taken from the Talemo balance.

## Templates

Outside the window WhatsApp lets the business write first only with a template that
Meta has approved. Talemo has six, **Booking confirmation**, **Visit moved**, **Visit reminder**,
**Booking cancellation**, **Missed visit** and **Time to come again**; each has a Talemo
text in Russian and English, and Talemo submits them itself. The first five are service
messages. **Time to come again** is an invitation, that is advertising: it goes to Meta as
marketing, and only a text that Meta approved as marketing goes to a client outside the
window.

**Phone and messengers → Message templates** lists each template, the clients it is
for and its status at Meta: approved, under review, rejected, paused, turned off,
waiting to be sent or not accepted. A text that Meta counts as advertising is not sent,
except for **Time to come again**, which is advertising by design.

The assistant writes the words of a template, not a person: the page has no field for the
text. **Write with the assistant** (a button in the row of a template that has no text or
was rejected, a menu item on a template with a text) sends the assistant a request. It
reads the sample, the Talemo text in Russian and English, and writes the template in the
language of the business as a plain service message about the visit, with no discount,
promotion or link: Meta takes such a text for advertising and does not approve it. The
invitation **Time to come again** is the one exception: the assistant writes it as an
invitation to come again, with the line that tells the client to reply STOP, and it goes to
Meta as marketing. The rules of Meta for the text:

- the confirmation and the reminder have five fields: **Name**, **Service**, the
  specialist (**Master**, **Trainer** or another word of the industry), **Date and time**
  and **Where**; the move has six: the same five and **Previous time**; the cancellation has three: **Name**, **Service** and **Date and time**,
  because the canceled visit has let the master and the place go; the missed visit and the
  invitation have three too: **Name**, **Service** and **Date** of the visit;
- each field stands in the text once, the text cannot start or end with a field, two
  fields cannot stand side by side, and the whole text is at most 1024 characters;
- with the text the assistant sends an example: a value for each field, one line, in the
  language of the template. Meta shows it in its review.

Before anything goes out the assistant shows a card: the text read with the example, as
the client will see it, and the line "It will go to Meta for review. Until Meta approves it,
the previous text keeps working." **Allow** (in the app **Send to Meta**) sends the text to Meta, and
until the person allows it nothing is sent. The card appears in every way of working of
the assistant: the text goes to Meta and to clients. In Waiting for you and on Today
such a decision is signed with the kind of the template and the language, like "Booking
cancellation · German"; on the web, on Today, its main button is **Look**: it opens the
task with the text, and **Allow** is there.

A new text works after Meta approves it, and the previous one works meanwhile. Meta
reviews each language separately. **Return the Talemo text** goes back to the standard
words, and the assistant is not needed for it. Talemo has its own text only in Russian
and English; for another language the page says above the list that Talemo has no text
there, and the assistant writes the template.

If Meta does not approve a text, the case "Meta didn't approve the booking
confirmation in {language}" appears. **Fix with the assistant** sends the assistant a
request to read the reason and propose a fixed text; in the app it opens the chat with a
card of that template. Until a text is approved, clients with that
language on their card get no confirmation, reminder or cancellation once a day has passed since
their last message. Clients in other languages still get theirs.

## Confirmations, reminders and cancellations from Talemo

Talemo sends them to the card's main contact (see
[Contacts of a card](../clients/contact-points.md)). Inside the window the message
is plain text, in the language the client writes in that chat. Outside it WhatsApp gets the
approved template in that language, or else in the language of the card, or else in the first
service language, and Instagram gets nothing. A move message outside the window goes with its own
template, and until Meta approves it, with the approved confirmation template and the new time.
Messenger never gets them: it gives no address that can
be the main contact. The visit shows the reason, for example
"the chat window has closed: the client wrote more than a day ago". A cancellation of a
visit goes the same way, with the template **Booking cancellation**; whether it is
written at all depends on who canceled the visit (see
[Visit notices](../booking/visit-notices.md)).

The message to a client who did not come, from a rule (see [Rules](../booking/rules.md)), goes
the same way, with the template **Missed visit**. The invitation to come again goes only to a client
whose card has the mark of consent to invitations and offers (see
[Turning off reminders, confirmations and cancellation notices](../clients/reminders-opt-out.md)),
at most one in 30 days; inside the window as plain text, outside it as the template **Time to come
again** — and only if Meta approved that template as marketing. A text Meta approved under another
category does not go: the visit says the template is not approved.

## Who can do it

Asking the assistant to write a template and returning the Talemo text need the right to
change channels. For a channel of the whole business the role must cover every branch.
The text of a template is written only by the assistant built into Talemo for the staff: a
text sent by a person, a business key or a program connected from outside is refused with
status 403 and code `channel.template_by_assistant`, and so is a `dry_run`.
`talemo_list_channel_templates` reads the templates and cannot change them.

## Tools and refusals

- `talemo_send_message` writes to a client in their conversation (`conversation_id`, `text`), in the channel they wrote from. The answer says whether the message is queued, and its outcome lands in the conversation. A reply by a person pauses the online admin in that conversation until someone returns it, and makes the person responsible for the conversation. Before a reply goes to a client, show the person the exact text and ask once.
- A message goes only inside the channel window: more than a day after the client's last message, or before they ever wrote, Instagram and Messenger are refused with status 409, code `channel.window_closed`, and WhatsApp with `channel.template_required`, because only a message template goes there. These are answers, not failures: tell the person the window is closed and that the answer can go from the channel's own app, or, for WhatsApp, with a template.
- A channel that has to be connected again is refused with `channel.revoked`, a client the channel cannot reach with `channel.recipient_unreachable`, and WhatsApp without a payment method at Meta with `channel.payment_missing`.
- With `step` and `options` the options of the step's field go with the text as buttons: quick replies in Instagram and Messenger, buttons or a list in WhatsApp, numbered lines where buttons do not fit. `talemo_get_conversation` shows under the message which options went and which one was picked.
- With `slots` the free times that `talemo_find_times` found go as buttons: up to ten, each as the search gave it (`branch_id`, `start`, `resource_ids`, `service_ids`). Talemo puts the label of each button — the day and the time — in the language of the client, and the text of the message names the day and asks to pick, without listing the times or counting them. `slots` do not go with `step`, `options` or a file. A time that is taken or has passed is refused with status 409, code `reply.slot_unavailable` (`params.option` is which one, counted from 1, and `params.reason` is `taken` or `past`): find times again. `move_visit_id` goes with `slots` only: it is a live visit of this client in the branch of the times, and when the client taps a time, Talemo moves that visit to it; without it the tap books a new visit. A visit that does not fit is refused with status 422 and code `record.reference_missing`, `params.field` `move_visit_id` and `params.reason`: `not_found` — there is no such visit or it is not this client's, `not_in_branch` — it is in another branch than the times, `inactive` — it is cancelled or has already taken place, `forbidden` — the online admin has no right to move visits. When the client taps a button, Talemo itself moves the visit or books the time before the online admin's turn, and the online admin answers from the result.
- In a conversation in drafts mode the online admin sends nothing itself: with `dry_run` it is shown what would go, and the message waits as a draft for a person to send, change or drop.
- `talemo_get_channel` shows whether the channel is connected, the assistant and its mode, and for WhatsApp whether Meta refused a message for a missing payment method.
- `talemo_list_channel_templates` shows the message templates of a WhatsApp channel by language: the confirmation, the reminder and the cancellation of a visit, the message to a client who did not come and the invitation to come again, the text that works now, the edit waiting for Meta, and what Meta said — the status, the category and the reason. For each kind it has a sample: the Talemo text in Russian and English with the fields numbered and what stands under each. This connection only reads the templates: the assistant of the staff writes the text.
- `talemo_set_channel_template` writes the text of a template (`connection_id`, `kind`, `language`, `text`, `example`) and sends it to Meta; only the assistant of the staff has it, and it is not listed to a business key, to Claude or to ChatGPT. Call it with `dry_run` first: `latest.preview` of the answer is the text as the client will read it. The person always approves a card with that text, whatever way of working they chose, so do not ask them to type yes, and until they allow it nothing is sent. `example` is one value for each field, one line, without `{{`. Without `text` the text of Talemo comes back: only Russian and English have one, and another language is refused with `channel.template_invalid` and the rule `kit_missing`. A text against the rules is refused with `channel.template_invalid`, `rule` (`length`, `variables`, `edge` or `adjacent`) and `kind`: fix the text and call again. An example that does not fit is `request.body_invalid` with `field` `example`. The same text with the same example makes no new version, unless Meta rejected, paused or turned off the last one or it did not go out: then it goes again. A person without the right to change channels gets `role.forbidden`.
