Condition: the agent belongs to a team
Use the Agent belongs to team node to branch your workflows by which team the conversation's assigned agent is on.
Watch this step in the video · Detect language and agent in team
What it is and when to use it
The Agent belongs to team node is a condition (router) that checks whether an agent is on a team and sends the flow down the Yes or No branch. It's the key building block for advanced routing: apply different SLAs per team, notify the right lead, escalate beyond the sales team, or tag conversations by area.
By default it evaluates the agent assigned to the conversation, but it can also check a specific user. The check can be belongs to any team or belongs to a specific team.
Requirements
- At least one team created in the workspace (Settings → Teams menu) with members.
- A workflow where the conversation already has (or can have) an assigned agent, so the node has someone to evaluate.
Steps to set it up
- Open Workflows and enter your workflow editor.
- Drag the Agent belongs to team node from the palette (Condition category).
- In Configure, choose the Agent to evaluate:
- Assigned to the conversation (recommended): uses the current agent.
- Specific user: provide a user by ID or a
$variable.
- Choose the Team mode:
- Any team: takes Yes if the agent is on at least one team.
- Specific team: select the team to check.
- Wire the Yes and No branches to the next nodes per your logic.
- Save and activate the workflow.
Variables it exposes
After evaluating, the node makes these variables available downstream:
$agent_in_team(boolean)$agent_id(the evaluated user)$agent_team_idsand$agent_team_names$agent_team_count$matched_team_nameand$agent_team_role(member or lead)$agent_team_members(teammate names)
Use them, for example, to compose a message like: "Your case was routed to the $matched_team_name team."
Verification
Activate the workflow and trigger it on a conversation with an agent you know is (or isn't) on the team. Check the execution history: you'll see the branch taken and the value of $agent_in_team. Test with an agent on no team too, to confirm the No branch.
If it doesn't work
- Always takes No: the conversation probably has no assigned agent yet. Place the node after an assignment, or use Specific user mode.
- Wrong team doesn't match: in Specific team, verify you selected the active workspace's team; an agent may be on several teams but only this workspace counts.
- No members show: confirm the team has members under Settings → Teams.
Tips
- Combine this node with Detect language or Business hours for truly fine routing (language + area + availability).
- Because the node is workspace-isolated, it's safe to reuse the same team across workflows without mixing data between workspaces.
Related articles
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.
-
Workflows complete guide
Workflows in depth, in 54 chapters: triggers, nodes, variables, testing, history, templates, import and export, with every setting explained and a real workflow end to end.
-
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.