🇪🇸 Español 🇬🇧 English 🇧🇷 Português

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.

Jul 11, 2026

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_match variable 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 writesLook up previous conversation node → "Found and assigned" branch with $last_agent_online = trueTransfer 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_online before 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_match always evaluates true in that case.
Was this helpful?

Related articles