# Assign To (team)

Route the conversation into a team's queue, and optionally also hand it straight to one member of the workspace by round robin or fewest open contacts.

## Getting here

**Automate → Workflows**, open a workflow, click **+** on the canvas, then pick **Assign To (team)** under **Add Steps**.

## Before you start

- An **owner**, **admin** or **agent** can add this step and save the workflow. Publishing it is an **owner** or **admin** action.
- Building and running workflows depends on your plan; see [pricing](/pricing).
- At least one team must already exist in the workspace for this step to route into.
- Nothing outside Inchat has to be connected. The step only writes to the conversation.

## Set up

1. Open the workflow and click **+** where the assignment belongs.
2. Pick **Assign To (team)**.
3. Under **Team**, choose the team the conversation should route into.
4. Under **Assignment Logic**, choose **Leave it in the team's queue** to route only, or **Assign to users round robin** / **Assign to the user with least open contacts** to also hand it to a person.
5. Optional, under **Advanced Settings**: cap how many open contacts a teammate may already be holding, and switch on **Add Timeout Branch** with a message to send if nobody has answered in time.
6. Save the step, then publish the workflow.

## Fields

| Field | What it means | Default | Limits |
| --- | --- | --- | --- |
| Team | The team the conversation is routed into. Always written, whichever Assignment Logic is picked. | — | — |
| Assignment Logic | **Leave it in the team's queue** files the conversation into the team without naming a person. **Assign to users round robin** and **Assign to the user with least open contacts** additionally pick one person to assign it to — see Limits for who that person is drawn from. | Leave it in the team's queue | — |
| Only assign to online users | Intended to skip teammates who are away. | off | Changes nothing today, exactly as on **Assign To (human)** — see Limits. |
| Only assign to users with fewer than … open contacts assigned to them | Skips any teammate already holding that many open conversations or more, counted across the whole workspace. | — | Offered and saved only together with an Assignment Logic other than the team's queue. |
| Add Timeout Branch | Queues a message to the customer if the person picked has not answered them by the time the timeout passes. | off; 10 minutes when switched on | Only applies when a person was picked, not when the conversation was only left in the team's queue. |

## How it works

- The step always writes the conversation's team, whatever Assignment Logic is chosen — this is what puts it in that team's queue.
- If **Leave it in the team's queue** is chosen, the step does no more than that: the conversation's assignee is left exactly as it was — untouched if it already had one, still unassigned if it did not.
- If **Assign to users round robin** or **Assign to the user with least open contacts** is chosen, the step goes on to pick a person the same way **Assign To (human)** does for the workspace — round robin steps off the conversation's current assignee by user id; least open contacts counts open conversations per teammate across the whole workspace.
- A picked person is written onto the conversation's assignee exactly as **Assign To (human)** does, after checking they are still a member of this workspace.
- A Timeout Branch, when a person was picked, works exactly as it does on **Assign To (human)**: it queues a message for later and the run continues to the next step immediately, without pausing.

## When it fails

- The chosen team no longer exists in this workspace: the step fails with **no team with id … in this workspace — it may have been deleted**, and the conversation's team is left as it was.
- The team lookup succeeds but the person-picking step has nobody inside the caps: the step fails with **no teammate available to assign** — but the conversation's team has already been written and is not rolled back, so it is left routed to that team's queue with its assignee exactly as it was before the step ran (still whoever it was, or still nobody).
- A failed assignment does not end the run, exactly as on **Assign To (human)** — the flow moves to the next step regardless.
- You read the reason in the workflow's **Activity** tab: pick the run under **Execution log** and the failed step carries its own line of text.
- Saving is refused if no team is chosen — **Pick a team for the “Assign to team” action.**

## Limits

- **Assign to users round robin** and **Assign to the user with least open contacts** do not filter by the team just chosen — they pick from every member of the workspace, exactly like the same two choices on **Assign To (human)**. Choosing a team files the conversation into that team's queue; it does not narrow who round robin or least-open-contacts can hand it to. If a workspace uses teams to decide who is even eligible, only **Leave it in the team's queue** (a person claims it themselves) enforces that boundary today.
- **Only assign to online users** has no effect on this step, for the same reason as on **Assign To (human)**: the list it filters marks every workspace member as available.
- The step does not check channel access — it can hand a conversation to a teammate whose channel allowlist does not include that channel.
- It does not notify the assignee, and it sends the customer nothing beyond a Timeout Branch message if one is configured and reached.
- It does not pause the AI agent — a thread assigned this way is still a thread the AI may answer on.
- Round robin remembers only the conversation's current assignee, not a rota kept for the team or the workspace.

## Best practices

- Use **Leave it in the team's queue** when the point is that the right group should see it and pick it up themselves, rather than have the step guess who.
- If a queue needs to spread automatically inside a specific team, hand-pick the person elsewhere in the flow instead — today's round robin and least-open-contacts on this step draw from the whole workspace, not that team.

## Use cases

- A billing question routes into the billing team's queue for a person to claim, with no automatic pick.
- A general enquiry routes into the support team's queue and is also handed to whoever in the workspace currently has the fewest open contacts, with a timeout message if they do not answer in time.

## FAQ and troubleshooting

### Does Assign to a user in a specific team only pick from that team?

Not today. Choosing a team files the conversation into that team's queue; the round robin and fewest-open-contacts picks that come after it draw from the whole workspace, exactly as they do on Assign To (human).

### What happens if I pick a team but leave the Assignment Logic as the team's queue?

The conversation is filed under that team and its assignee is left exactly as it was, no more. If it had none, a person still has to claim it; if it already had one, they keep it.

## Related

- [Assign To (human)](https://inchat.inseller.my/help/workflows/assign-to-human)
- [Assign To (AI)](https://inchat.inseller.my/help/workflows/assign-to-ai-agent)
- [Escalate](https://inchat.inseller.my/help/workflows/escalate)
- [Pause AI / Unassign](https://inchat.inseller.my/help/workflows/pause-ai-unassign)
- [Create a Task](https://inchat.inseller.my/help/workflows/create-a-task)

---

Source files: `src/lib/workflows/ai-builder/spec.ts`, `src/lib/workflows/canvas-model.ts`, `src/components/workflows/WorkflowStepConfigDrawer.tsx`, `src/lib/workflows/engine-record-actions.ts`, `src/lib/workflows/assign-routing.ts`, `src/lib/workflows/form-payload.ts`, `src/lib/workflows/engine.test.ts`
