Node: Look up previous conversation
How to use the node that looks up a contact's prior conversation to decide which agent should get the new one.
The Look up previous conversation node checks a contact's recent history to find their last conversation (open, or in whatever status you define) and, based on what it finds, decides where the flow continues. It's ideal for rules like "if this customer already talked to an agent, route them back to that same agent."
When to use it
- At the start of a welcome flow, to reconnect the customer with the same agent who helped them before instead of assigning someone new.
- For team-continuity rules: "if the customer was already handled by Sales and is still on Sales, keep the assignment."
Configuration
- Statuses to consider (default: Open and Snoozed): which conversation statuses count as a "valid previous one" (Open, Pending, Snoozed, Resolved, Closed).
- Team (optional): when set, only conversations on that team count, and the
$last_agent_team_matchvariable tells you whether the assigned agent actually belongs to that team. - Max age (default: 720 hours = 30 days): ignores conversations older than this limit. Set to 0 to disable the age filter.
- Exclude current conversation (on by default): when the flow runs inside a live conversation, it's excluded from the search so it doesn't "find itself".
Output branches
- Found and assigned: a prior conversation exists with an agent assigned.
- Found unassigned: a prior conversation exists, but with no agent.
- Not found: no prior conversation matches the filters.
Variables it produces
$last_conversation_id, $last_status, $last_team_id, $last_agent_id (only when there's an agent), $last_agent_online (whether they're currently online), $last_agent_team_match.
Example
A WhatsApp flow: trigger New contact writes → Look up previous conversation node → "Found and assigned" branch with $last_agent_online = true → Transfer to an agent node using $last_agent_id. If the agent isn't online, the same branch falls through to normal team routing instead.
Tips
- Combine it with a condition on
$last_agent_onlinebefore transferring, so you don't hand off to a disconnected agent. - If your operation doesn't split by team, leave "Team" empty:
$last_agent_team_matchalways evaluates true in that case.
Related articles
-
Build your first workflow
Omnifox workflows automate your operation: a trigger starts the automation and action nodes do the work. Build a welcome message in minutes.
-
Workflow triggers catalog
Learn which events can start a workflow automatically in Omnifox.
-
Action nodes available in workflows
Discover the actions a workflow can run automatically.
-
Conditions and branching (if/then) in a workflow
Make your flows take decisions and follow different paths based on each contact data.
-
Ready-to-use workflow templates
Start your automations in minutes from prebuilt flows you can customize.