↑↓ selectEnter openEsc close

    1. Elbuz
    2. Automation with AI agents
    3. AI in CRM

    Flows on ticket and chat events

    4 min readUpdated

    Elbuz starts a flow when something happens in a ticket or chat: a customer message, a missed response deadline, an assignee change. The flow tags, sets priority, assigns a person or messages the customer — no manual queue triage.

    When you need this:

    • Customer silent after the manager replied — in 30 minutes the flow reminds them in chat.
    • Complaint in a chat — AI spots it: the “Complaint” tag and high priority.
    • Calls or Instagram need a person at once — the flow assigns one, bypassing distribution.
    • Solved tickets need review — the flow tags them for managers.

    Where to start: build a ready-made scheme in Directories → Flows.

    What flows on events can do

    How to start a flow on ticket events

    The “On event” block with the source “Ticket: event (created, status, assignee, customer reply, SLA breached…)” starts the flow on every ticket event. What happened is shown in the ticket_event field; next to it is the state of the ticket at that moment. Field values are codes, not the labels from the window, and these codes are what you write in the “Condition (If)” block.

    Ticket events in the ticket_event field
    ticket_eventWhenWhat's in old_value
    createda ticket appeared: from an email, chat or callempty
    status, priority, assignee, department, tagsa person, distribution, another flow or the customer's reply changed this fieldthe previous value
    customer_replythe customer wrote in an open ticketthe status before their message: if it was “Pending” or “Solved”, the ticket becomes “Open” on its own, and a status event follows
    csatthe customer rated the replygood or bad
    sla_breacha response or resolution deadline passed, once per deadlinefirst — first reply, next — next reply, resolve — resolution
    Other event fields
    FieldValues
    statusnew, open, pending — “Pending”, on_hold — “On hold”, solved, closed
    prioritylow, normal, high, urgent
    channelemail, web — website chat, telegram, viber, whatsapp, facebook, instagram, phone — call
    department_id9 — Sales, 10 — Customer service
    segmentthe customer segment by orders from their card: new, repeat, regular, vip, sleeping (dormant), lost; empty for a ticket without a customer or a customer without orders
    othersticket_id, assignee_user_id, tags, subject, intent, contractor_id

    The “Ticket: update” block changes only what is filled in:

    • “Status”, “Priority”, “Assignee” (from the list of team members), “Department” (), “Add tags” (comma-separated, added to existing ones), “Internal note” (the customer doesn't see it; {{step:…}} placeholders work);
    • “Ticket” is the ticket_id from the “On event” step; an empty field means the ticket whose event started the flow;
    • the block sends nothing to the customer, even when it sets “Solved”;
    • the flow writes the changes and the note to the feed on behalf of “System”, so an @-mention in the note reaches everyone mentioned. The assigned assignee gets both the ticket's chat and the “Ticket #N is assigned to you” notification.
    Always narrow the event in the “Condition (If)” block (ticket_event = …), otherwise the flow runs on every ticket change, including changes made by other flows. A change made by the flow itself is an event too, but the same flow won't start on it: while it is running, a new event skips it rather than queuing — and so does an event of another ticket that arrives at that very moment.

    The AI consultant that builds a flow from your words knows both blocks and the ticket events from the table above, including csat. Describe the event in words (“when the customer gave the rating “Bad””) and check the built scheme in the builder before saving. Ready-made schemes are in the scenarios.

    How to start a flow on chat events

    The “On event” block with the source “Chat: event (customer message, team member replied, assigned, status, SLA breached…)” starts the flow on chat conversation events: Telegram, Viber, WhatsApp, Messenger, Instagram, website chat and marketplace chats (Rozetka, Prom, Allegro). This includes chats handled by AI and chats that didn't become a ticket. What happened is shown in the chat_event field.

    Chat events in the chat_event field
    chat_eventWhenWhat's in old_value
    createdthe customer's first message in a new chatempty
    client_messagethe customer wroteempty
    agent_replya live team member replied; an AI reply doesn't trigger this eventempty
    assignedthe assignee changed: manually, in bulk, by automatic distribution or by a flowID of the previous assignee; 0 — there was no assignee, and also on chat handover
    statusthe chat status changed — manually, by a flow, or on its own: the customer wrote in a closed chat, the snooze endedthe previous status: open, snoozed — “Snoozed”, closed
    tagsa tag was added to the chatempty
    handoffthe customer clicked the call-a-manager button in the widget, or AI handed the chat over to a personID of the team member who was called, or 0
    sla_breachthe “Target response time” passed, once per customer waitempty
    csatthe customer rated the conversationa rating from 1 to 5

    Other event fields: chat_id, status, priority (high or normal), assignee_user_id, contractor_id, tags (names separated by commas), customer_name. Three more:

    • channel — web (website chat), telegram, viber, whatsapp, facebook, instagram, marketplaces: rozetka, prom, allegro;
    • last_message — the customer's last message;
    • waited_minutes — how many minutes the flow waited.

    In the “On event” properties for a chat there are two fields:

    • “Events” — codes from the table separated by commas, for example agent_reply or created,client_message; empty — the flow starts on every chat event;
    • “Wait, min” — start after N minutes if during that time there was no public message in the chat (from the customer, a team member or AI) and the status didn't change. Otherwise the wait is quietly cancelled. A new event that matches the flow restarts the countdown. Up to 43,200 minutes, that is 30 days; 0 — at once.

    Assignment, status and tags reach the flow at once. Customer and team member messages, manager calls, ratings and missed response times are collected once a minute, so the flow starts with a delay of up to a minute. Per minute per chat there is no more than one customer event (created or client_message) and one agent_reply: if the customer wrote and a team member replied in the same minute, both arrive.

    How to change a chat and message the customer

    The “Chat: update / message customer” block changes only what is filled in:

    • “Chat” — empty means the chat whose event started the flow; a chat number or a {{step:…}} placeholder means any chat, so the block also works in a flow with a different start block;
    • “Status” — “Open” or “Closed (quietly, no rating request)”; “Priority” — “High” or “Normal”; “Assignee” — from the list of team members;
    • “Add tags” — names of existing chat tags separated by commas; the block doesn't create new tags and skips a name that doesn't exist;
    • “Internal note” — visible only to team members;
    • “Message to the customer” — goes to the customer's channel on behalf of the team member who replied last (if only AI replied — without a team member's name), at once, without “Pulse” or confirmation. In WhatsApp, Messenger and Instagram it is delivered only within the reply window. If it isn't delivered, the step ends with an error and the rest of the block's fields aren't applied: the chat stays as it was;
    • for a blocked customer the block does nothing — the step ends with an error. {{step:…}} placeholders work in all fields.
    Fill in the “Events” field. An empty field starts the flow on every chat event, and a flow with an “AI condition” pays for the check even when a tag was simply added to the chat. A change made by the flow itself is an event too: other flows start on it, but the same flow doesn't, because while it is running a new event skips it rather than queuing (and a flow with “Wait, min” isn't put into waiting by its own change either). An event of another chat that arrives at that very moment is skipped the same way.

    “Wait, min” is a shortcut just for chats: until the time passes, a run isn't even created. Any flow can use the “Wait” block, and for a chat it has the “Cancel if something happened in the chat” checkbox (pause in a flow).

    The AI consultant knows the “Chat” event, both fields and the “Chat: update / message customer”, “AI condition” and “Wait” blocks. Write like this:

    • “If the customer is silent for 30 minutes after the manager's reply, write to them in the chat: Do you have any other questions?” — the agent_reply event and “Wait, min” = 30;
    • “When a customer complains in the chat, add the “Complaint” tag and set high priority” — an “AI condition” before “Chat: update”.

    Ready-made schemes are in the scenarios.

    Scenarios

    Tickets: quality check, calls, dormant customers

    Schemes for flows on ticket events (n1 is the ID of the “On event” block in your scheme).

    TaskCondition (If)“Ticket: update”Result
    Solved — send for a quality checkticket_event = status and status = solved“Add tags” — quality-check, “Internal note” — “Check the reply: {{step:n1.subject}}”the manager picks out solved tickets with a tag filter; the customer notices nothing
    Call — high priority and a person right awayticket_event = created and channel = phone“Priority” — “High”, “Assignee” — the team member who calls backa ticket from a call doesn't wait for distribution and gets a shorter deadline if deadlines depend on priority (ticket settings)
    A dormant customer wrote — to the manager who wins customers backticket_event = created and segment = sleeping“Assignee” — the manager, “Add tags” — win-back, note “The customer hasn't bought for a long time — offer terms”the customer reaches not the operator on duty, but someone who knows how to win them back

    The consultant may not set the segment condition on its own — then add it in the “Condition (If)” block in the builder. VIP customers don't need a separate flow: a checkbox in the ticket settings gives them “High” priority (VIP customers).

    Chat: reminder, complaint, Instagram

    Schemes for flows on chat events. Flows built manually in the builder are saved disabled — turn on “Flow is active” once you've checked the scheme.

    Task“On event” → ChatNextResult
    The customer is silent for 30 minutes after a reply — remind them“Events” — agent_reply, “Wait, min” — 30“Chat: update / message customer”, “Message to the customer” — “Do you have any other questions?”if the customer replied earlier or the chat was closed, there is no reminder; if the manager replied again, the countdown restarts
    Complaint — tag and priority“Events” — client_message“AI condition” “Is the customer complaining?” → the “yes” output → “Chat: update”: “Add tags” — “Complaint”, “Priority” — “High”, note “The customer is complaining — review the conversation”a chat with a complaint gets “High” priority and can be found with a tag filter; every customer message is a paid AI check
    A new conversation from Instagram — straight to a person“Events” — created“Condition (If)” channel = instagram → “Chat: update”, “Assignee” — the team member who handles Instagrama customer from Instagram doesn't wait for distribution; the flow doesn't touch other channels

    What to do when a flow didn't run

    Common problems
    What you seeWhyWhat to do
    The event happened, but there is no run in the “Execution log” The flow is disabled: a flow built manually is saved disabled Turn on “Flow is active” and save
    A chat flow doesn't react to a reply “Events” lacks the needed code, or AI replied — agent_reply comes only from a live team member Check the codes in the “Events” field (chat events)
    The reminder with “Wait, min” didn't arrive During the wait a message from the customer, a team member or AI appeared in the chat, or the status changed — the wait was cancelled This is by design; the reminder goes only to a silent chat
    The “Chat: update / message customer” step with the “not delivered” error In WhatsApp, Messenger or Instagram the reply window has closed Write to the customer manually; the step didn't change the chat

    FAQ

    Can a flow close tickets or change the assignee on its own?

    Yes, with the “Ticket: update” block after “On event” with the “Ticket: event” source. It sends nothing to the customer, even when it sets “Solved” (flows on ticket events).

    Can a flow write to the customer in the chat on its own?

    Yes, with the “Chat: update / message customer” block: to the event's chat or to the chat whose number is set in the “Chat” field. The message goes at once, without “Pulse”; in WhatsApp, Messenger and Instagram — only within the reply window (change a chat and message the customer).

    Can I start a flow on a bad customer rating?

    Yes. In a ticket it's the csat event with good or bad in old_value; in a chat it's csat with a rating from 1 to 5. Narrow the event in the “Condition (If)” block (ticket events, chat events).

    Does an AI reply in a chat start a flow?

    No. The agent_reply event comes only from a live team member. An AI reply is a public message, so it cancels the “Wait, min” wait (chat events).

    I turned on a flow — why didn't it run on yesterday's messages?

    Chat events are collected only while there is an enabled chat flow. Messages that arrived before it was turned on don't start the flow.

    Where it is and who has access

    Menu
    Directories → Flows — the “On event” block, the “Source” field
    Other entry points
    AI consultant: a rule in words
    Access right
    the “Flows” window in group permissions
    Prepare
    chat and ticket tags, team members who will be assignees

    Related topics

    Was this article helpful?

    Missing a feature? Tell us.

    We will add it for free if other users need it too.

    If only you need it, we will agree on it separately.

    Article contents

    Suggest an improvement

    Try Elbuz free