Skip to main content

Event Hooks

Event Hooks run an execute action after an event in Flowcall. Use them when an action should happen outside an active flow—for example, send conversation details to a CRM a few minutes after a customer returns on WhatsApp.

Event Hooks are under Broadcasts → Event Hooks. The currently available event is Conversation session started.

When a conversation session starts​

For WhatsApp, Flowcall starts a new conversation session when:

  • the customer sends an inbound message;
  • the customer has not sent a WhatsApp message for at least 24 hours; and
  • no workflow is active for that conversation.

A customer's first-ever inbound WhatsApp message also starts a session. Messages received while a workflow is already active continue that workflow and do not create this event.

The hook is scheduled from the time of the first message in the new session. Each hook runs once for that session after its configured delay.

Which ticket the hook uses​

The ticket is resolved when the delayed hook runs, not when the session first starts. Flowcall selects the customer's ticket whose creation time is closest to the session start time. This lets a ticket created shortly after the first message become the action's input.

The same selected ticket is used for:

  • the Ticket task condition;
  • ticket-field input mappings; and
  • data points resolved from ticket shared state.

If Flowcall cannot find a ticket for the customer, the action cannot run.

Create an event hook​

  1. Open Broadcasts → Event Hooks and select Add hook.
  2. Enter a unique Name.
  3. Leave Event set to Conversation session started.
  4. Set the Delay in minutes. The allowed range is 1 minute to 30 days.
  5. Optionally choose one or more values under Ticket task condition.
  6. Choose the Execute action to run.
  7. Map every action input and API input.
  8. Turn on Enabled, then select Save hook.

The execute action must already exist in the Data Library. Its configured inputs determine which mapping rows appear in the hook.

Limit a hook by ticket task​

Use Ticket task condition when the action should run only for tickets created by particular tasks.

  • Select one or more tasks to allow tickets created by any of those tasks.
  • Select No task to allow a ticket that is not linked to a task.
  • Select both tasks and No task to allow either case.
  • Leave the field empty to allow every ticket, regardless of task.

Flowcall first selects the ticket closest to the event and then checks this condition. It does not search for another ticket when the closest ticket does not match. A non-matching run is skipped without calling the execute action.

Map action inputs​

Every input required by the selected execute action must have a source. The available sources are:

SourceValue used
Ticket fieldA field from the selected ticket. Use a path such as id, taskId, or payload.subject.
Event fieldA value captured when the session started.
LiteralThe same fixed text on every run.
Data pointA built-in or Data Library value inferred from the selected ticket. Available for API inputs only.

Event fields​

The Event field source can provide:

FieldWhat it contains
Account IDThe account where the session started.
Customer IDThe customer who sent the message.
Channelwhatsapp for the current event.
Session started atThe date and time of the first message in the new session.
First message IDThe WhatsApp message ID that started the session.

Data points from the selected ticket​

For an API input, choose Data point to resolve a value from the selected ticket's shared state. This includes built-in values such as customerPhone and compatible data points from your Data Library.

Library data points are available when their source is Order, Customer, Order list, or Standalone. These sources can be resolved from the conversation and ticket data already stored by Flowcall. Data points backed directly by a Custom API or Google Sheet are not available in an Event Hook because the hook does not make an additional lookup to calculate an input.

For example, an action that sends a ticket to an external help desk could map:

API inputSourceSelected value
phoneData pointcustomerPhone
ticket_idTicket fieldid
conversation_started_atEvent fieldSession started at
sourceLiteralflowcall_whatsapp

Objects and lists are passed to the action as JSON text. A value that is unavailable is passed as an empty string, so make sure the selected ticket normally contains every value required by the external API.

Changes and scheduled runs​

When a session starts, Flowcall saves the hook configuration for that scheduled run. Editing, disabling, or deleting the hook does not change a run that has already been scheduled. The new configuration applies to future conversation sessions.

Execute-action calls are recorded in API Logs, where you can inspect the request and troubleshoot failures.

  • Data Points — built-in and reusable values available to flows and hooks.
  • Execute Actions — configure the side effect an Event Hook runs.
  • Custom APIs — configure the endpoint behind an execute action.
  • Broadcasts — other outbound and event-driven automation.