EzFlowEzFlow Docs
Chatflows

Chatflow sessions

How active WhatsApp conversations are tracked and managed as sessions.

A Chatflow session is a record of one user's in-progress or completed conversation with a Chatflow. EzFlow creates a session the moment the CHATFLOW node fires inside a parent Workflow and keeps it alive until the conversation reaches an Exit node or times out.

What a session tracks

FieldDescription
chatflowIdWhich Chatflow definition is running
channelWHATSAPP or SLACK
recipientPhoneThe user's phone number (WhatsApp sessions)
currentNodeIdThe node the bot is currently waiting at
variablesKey-value map of data collected during the conversation
messageHistoryOrdered list of sent and received messages with timestamps
statusCurrent state of the session (see below)
retryCountNumber of timeout retries sent so far
maxRetriesMaximum retries before the session is abandoned (default: 3)
nodeTimeoutSeconds to wait for a user reply before retrying (default: 120)

Session status

StatusMeaning
ACTIVEThe conversation is in progress; the session is waiting for the user or executing a node
COMPLETEDThe conversation reached an Exit node; variables are available to the parent Workflow
FAILEDThe session encountered an unrecoverable error
TIMEOUTThe user did not reply within the allowed retries and the session was abandoned

How inbound messages are routed

When EzFlow receives an inbound WhatsApp message, it looks up an ACTIVE session matching the WhatsApp integration ID and the sender's phone number. If a matching session exists, the message text is appended to messageHistory and execution resumes from currentNodeId. If no active session exists, the message is ignored by the Chatflow engine (it may still be processed by other parts of the platform).

Slack conversations work the same way, matched by Slack channel and user ID.

Timeouts and retries

EzFlow checks active sessions every 5 seconds. If a session has not received a reply within nodeTimeout seconds since the last activity:

  1. The retry count increments.
  2. A configurable timeout message is sent to the user.
  3. Steps 1–2 repeat until retryCount reaches maxRetries.
  4. When maxRetries is exhausted, the session moves to TIMEOUT and the parent Workflow resumes with chatflowCompleted: false.

The default nodeTimeout is 120 seconds and the default maxRetries is 3, giving a maximum wait time of about 8 minutes before a session times out.

Session completion

When execution reaches an Exit node, EzFlow marks the session COMPLETED, writes the final variables map, and emits a completion event that resumes the parent Workflow. The parent Workflow receives the collected variables and can use them in downstream nodes — for example, to look up a record or send a follow-up message.

Session logs

Every state change — node transitions, sent messages, received messages, retries, and completion — is recorded in a ChatflowSessionLog entry attached to the session. Logs include the node ID, a timestamp, and any variables captured at that point.

  • Node types — which nodes wait for user input and which run without pausing
  • WAIT_FOR_USER_RESPONSE — the internal orchestrator node that pauses execution until a reply arrives
  • CHATFLOW node — the Workflow node that starts a session and receives the completed variables
  • Chatflows overview — the difference between Chatflows and Workflows

On this page