Skip to main content

Template Hooks

A Template Hook attaches automation to one approved WhatsApp template. It does two separate jobs:

  • Handlings react when the customer replies to the template — for example, tapping a button or submitting a flow.
  • Follow-up runs after a delay when the customer does not reply — it can send another template, run an execute action, or both.

Template Hooks are under Broadcasts → Template Hooks. Each template can have one hook.

Create a template hook​

  1. Open Broadcasts → Template Hooks and select Add hook.
  2. Choose the Template. The summary below it shows the template's buttons and how many body, header, and link variables it has.
  3. Optionally turn on Schedule delayed follow-up and configure it (see Follow-up).
  4. Under Handlings, select Add handling for each reply you want to react to.
  5. Save the hook.

The template cannot be changed after the hook is created. To attach the hook to a different template, create a new hook.

Handlings: when the customer replies​

A handling runs when an inbound WhatsApp message is a reply to the hooked template. Flowcall uses the template quoted in the reply; if WhatsApp does not include one, it uses the most recent template sent to the customer.

Trigger on​

OptionMatches
Any replyEvery reply to the template.
Specific buttonA tap on the selected quick-reply button. The button title must match.
Text reply / no buttonA reply that is neither a button tap nor a flow submission.
Flow form submissionA submitted WhatsApp Flow. Add Flow filters to match specific values.

Flow filters compare a flow variable with a value. All filters must match. A handling with no filters matches every submission.

Several handlings can match the same reply. They all run, in the order they are listed.

What a handling does​

Each handling needs at least one of the following:

  • Send fixed response — reply to the customer with fixed text.
  • Run execute action — call an execute action. Map each input from a template variable (body[0], header[0], and so on), a flow variable, the reply's raw text or button title, or a literal value.
  • Stop propagation (skip AI / workflow) — after the handling runs, do not pass the message to the AI agent or workflow. Without this option, the message continues to the AI agent as usual.

Handlings run only when AI is handling the conversation. They do not run when AI is disabled for the account or WhatsApp, or when the customer's conversation is set to manual.

Follow-up: when the customer does not reply​

Turn on Schedule delayed follow-up to do something after a delay if the customer stays silent.

SettingDescription
Delay before follow-up (minutes)From 1 minute to 30 days (43,200 minutes). For example, 1440 is 24 hours.
Follow-up template (optional)A second template to send when the delay ends.
Follow-up variablesValues for the follow-up template, taken from the original template's variables or entered as literals.
Run execute action after the same delayAn execute action that runs when the delay ends, with the same timing as the follow-up template.

You need a follow-up template, an execute action, or both. With both, they are scheduled for the same moment.

When the follow-up is scheduled​

The follow-up is scheduled when the hooked template is sent successfully — when WhatsApp accepts the message. The delay is counted from the send time, not from delivery or read.

A follow-up is not scheduled when:

  • the template was sent as part of a campaign or segment broadcast — follow-ups apply only to templates sent by events, flows, the API, and other one-to-one sends;
  • the send failed; or
  • the message is itself a follow-up. Follow-ups do not chain, even if the follow-up template has its own hook.

When the follow-up is cancelled​

The follow-up is cancelled as soon as the customer sends any inbound WhatsApp message after the template was sent and before the delay ends. This cancels both the follow-up template and the follow-up execute action.

Any message counts, including:

  • a tap on one of the template's buttons;
  • a text reply;
  • a flow submission or list reply;
  • an image, video, audio, document, or location; and
  • a reaction.

The message does not have to be a reply to the hooked template. Any inbound message from that phone number cancels every pending follow-up for that customer on the account.

A message that arrives after the delay has ended cannot cancel the follow-up — the template or action has already run.

Button taps cancel the follow-up

If the template has buttons, a tap on any of them cancels the follow-up. For example, with a delivery-confirmation template that has Received and Not received buttons, a follow-up that closes the ticket runs only if the customer taps neither button. To close the ticket when the customer taps Received, add a Specific button handling for Received that runs the same execute action.

Map follow-up action inputs​

Each follow-up execute action input can use:

SourceValue used
Template variableA variable from the original template, such as body[1] — ticket_id.
Literal valueThe fixed text entered next to the source.
Data pointA Data Library data point, resolved when the action runs. Map its own inputs from template variables or literals.

An input left without a source is not sent to the action. A value that is unavailable is sent as an empty string.

The follow-up does not have a customer reply, so reply and flow sources are not available.

Changes and scheduled follow-ups​

The follow-up template message, its variables, and the execute action configuration are saved when the follow-up is scheduled. Editing or deleting the hook does not change a follow-up that is already scheduled; the new configuration applies to templates sent afterwards.

Where to see results​

  • The follow-up appears in the template event log with status pending until it runs, then sent or failed. A cancelled follow-up shows cancelled.
  • When a follow-up execute action runs, a system message in the customer's conversation records whether it succeeded or failed.
  • Execute-action calls are recorded in API Logs.

Example: confirm replacement delivery​

Template replacement_delivered_cx_confirmation asks the customer whether they received a replacement, with Received and Not received buttons. Body variables are customer_name and ticket_id.

Hook configuration:

  • Delay before follow-up: 1440 (24 hours).
  • Follow-up template: resolved_csat, with customer_name ← body[0] and ticket_id ← body[1].
  • Execute action: freshdesk_close_ticket, with ticket_id ← body[1] and cf_resolution_type ← literal Issue Resolved - With Replacement.
  • Handling: Specific button → Not received → run an action that reopens or escalates the ticket, with Stop propagation on.

Result:

  • The customer taps Not received → the handling runs and the follow-up is cancelled.
  • The customer taps Received or sends any other message within 24 hours → the follow-up is cancelled. Add a Received handling if the ticket should still be closed.
  • The customer does not respond for 24 hours → resolved_csat is sent and the Freshdesk ticket is closed.