Agent follow-up outside the 24-hour window

How an AI agent resumes a conversation after 24 hours: approved templates, consent, error 131047, template category and cost.

A support agent does not always finish the conversation at once. It may need to say a ticket was resolved, remind someone of a pending item or pick a topic back up the next day. That is where the 24-hour service window stops being a detail and becomes the rule that decides whether the message goes out or comes back with an error.

Until when can the agent send free-form text?

For 24 hours counted from the customer’s last message. Inside that period, the agent replies with free-form text and any API message type; outside it, only approved templates. The agent’s reply does not extend the deadline: the clock restarts only when the customer writes again.

This is the rule Meta’s messaging policy describes: no template only within the window, which renews with each user message. The Hub guide on receiving messages shows the event’s occurred_at field, which marks the moment of the customer’s message. Store that moment with the contact on every incoming message: it is the only cheap way to know, at reply time, which path to take. The webhooks reference describes the event envelope.

Trying free-form text after the deadline returns error 131047. The window reopens when the contact replies, and the immediate fix is to send an approved template.

How does the agent resume a conversation after the deadline?

With an approved template, sent with the parameters that fill it. The template must exist and be approved in the language you send, because name and language form a pair. The agent does not write the text: it picks the template and supplies the variables.

// Before any message the agent initiates (reminder, ticket update) function escolherFormato(conversa, agora = Date.now()) { const aberta = agora - conversa.ultimaMensagemDoClienteEm < 24 * 3600 * 1000 if (aberta) return { tipo: 'texto' } // free text, inside the window if (!conversa.optIn) return { tipo: 'nenhum' } // no consent, no send return { tipo: 'template', nome: 'support_update', idioma: 'pt_BR' } } async function enviarRetorno(conversa, dados) { const f = escolherFormato(conversa) if (f.tipo === 'nenhum') return registrar(conversa, 'no opt-in: not sent') const corpo = f.tipo === 'texto' ? { to: conversa.contato, type: 'text', text: { body: dados.texto } } : { to: conversa.contato, type: 'template', template: { name: f.nome, language: { code: f.idioma }, components: [{ type: 'body', parameters: [{ type: 'text', text: dados.protocolo }] }], } } return enviar(conversa.canal, corpo, 'retorno-' + dados.protocolo) // stable key }

The snippet concentrates the decision in one function, which makes it testable. Three choices deserve attention. The format is decided by the window, not by the model, because it is a platform rule that allows no exception. Without recorded consent, nothing is sent outside the window. And the idempotency key is derived from the support case number, so repeating the job does not send the reminder twice.

  • Variables: the approved template has variable positions or names, and the send must fill them in the format it was created with. A wrong format comes back as a parameter error.
  • Language: the name and language pair must exist and be approved.
  • Content: the agent cannot change the template’s fixed text. To change the message, create and get another template approved.
  • Listing: query the channel’s approved templates before depending on a name.

See the quickstart for the send call itself, and the authentication page for the credentials used.

The contact’s consent to receive that kind of message. Meta’s policy says the business may only contact people who provided their number and opted in, that responsibility for the opt-in method and legal compliance lies with the sender, and that best practices include separate consent per message category and a clear way out.

  • Record consent: when, through which channel and for what purpose.
  • Follow the purpose: what the customer agreed to receive defines what the agent may send. A ticket notice is different from any other communication.
  • Make leaving easy: honor a request to stop and record it before the next send.
  • Do not infer consent from the customer having written once: the policy text speaks of opt-in to receive messages.
This is a summary of the policy text consulted, not legal advice. Responsibility for opt-in and compliance lies with the sender.

Does the template category change cost and quality?

Yes, both. The category sets the rate charged per delivered message, and how customers react to the template (blocks, reports, no reads) sets the quality, which can lead to the template being paused.

For a support follow-up, the natural category is utility, which Meta treats differently from marketing. In the Brazil table used by the Hub calculator, effective July 1, 2026 and checked on August 31, 2026, a utility template costs BRL 0.0350 per message in the first volume tier, against BRL 0.3217 for a marketing template, which has no tiers. Confirm current values on the pricing page, because Meta adjusts quarterly. Meta classifies each text and the result may differ from the category you chose.

AspectWhat matters for follow-up
CategorySets the rate and the template rules
QualityBlocks and reports lower the rating and can pause the template (error 132015)
ContentMust match the contact’s stated reason
FrequencyFew reminders per contact; insistence causes blocks

How do you run follow-up without surprises?

By treating each resumption as a traceable event, with a frequency cap and the window as the first check. The most common bug is a scheduled job that fires days later without re-evaluating the window.

  • Re-evaluate at send time: the window and the consent may have changed since scheduling.
  • Per-contact cap: a ceiling on resumptions per period, so it does not turn into insistence.
  • Handle refusals: a closed window requires a template; a paused template requires a replacement; revoked consent requires stopping.
  • If the customer answers the template, the window reopens and the agent goes back to free-form text. Treat that answer as the start of a new conversation, with the case context.

The handoff article in this series covers the case where a team member resumes, and the cost article shows how to count service and utility messages on the bill.

Frequently asked questions

Can the agent reply 25 hours after the customer’s last message?

Not with free-form text. After 24 hours, only an approved template. Free text outside the window comes back with error 131047.

Does my reply extend the window?

No. The clock counts from the customer’s last message, and only a new message from them restarts the deadline.

Can the agent write the template text on the fly?

No. The fixed text is approved beforehand. The agent picks the template and fills the variables. For another text, create and get a new template approved.

Do I need consent for a resolved-ticket notice?

Meta’s policy requires opt-in to contact people who did not write. What each purpose requires in practice is the sender’s responsibility; check with whoever owns compliance.

Fontes

Documentação oficial da Meta, conferida em 31 de outubro de 2026.