> This page is for Service Management.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.moveworks.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.moveworks.com/_mcp/server.

# Route Message Brokering Chats to ServiceNow Queues

# Overview

Moveworks does not hold queues. ServiceNow Advanced Work Assignment (AWA) routes the chat, using the context variables Moveworks sends when it starts the conversation.

* **Single queue:** if your queue does not depend on any value from Moveworks, leave the Context Bender as is. AWA routes the chat by queue priority.
* **Multiple queues:** add the values your AWA queue conditions use to the Context Bender. Each output key becomes a context variable on the interaction.

Set up the integration first with [Configure ServiceNow Live Agent Message Brokering](/service-management/live-agent-handoff-assistant/live-agent-message-brokering-assistant/how-to-guides-for-message-brokering).

## Context Bender Inputs

The **Context Bender** on the Live Agent Handoff (**Ticketing Automation > Handoff > Live Agent Handoff**, **Snow Handoff Config**) can use these inputs:

| Input               | Value                                                                                                                                                                                                                                                                                          |
| :------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `domain`            | The handoff item's Metadata Domain without the `_DOMAIN` suffix, for example `IT` or `HR`                                                                                                                                                                                                      |
| `language`          | The user's language code, for example `en` or `de`                                                                                                                                                                                                                                             |
| Request form fields | Every field on the form the user submits, by field name. The default form has one field, `description`. To collect more, select a form for the item under **Deflection action** in Handoff Settings; each of its fields is then available by name. Multi-select values arrive comma-separated. |

Moveworks always adds `live_agent_only` and `short_description` (the form description, or the user's last message). If the Context Bender is empty, no domain or language is sent.

## Custom Context Variables

Key names are yours to choose, for example `u_issue_category`. Any key you add to the Context Bender is sent to ServiceNow as a context variable with that name, except `live_agent_only` and `short_description`, which Moveworks sets. Each value is a Bender expression built from the inputs above; a quoted string is a fixed value. User profile attributes, such as department or location, are not available as inputs. To route on them, ask for them on the request form.

This example assumes the item uses a form with a dropdown field named `issue_category`. It sends six context variables:

```json
{
  "language": {
    "COALESCE()": {
      "items": [
        "language OR null",
        "\"en\""
      ]
    }
  },
  "liveagent_optional_skills": "domain OR null",
  "mw_chat_source": "\"moveworks\"",
  "mw_queue_hint": {
    "CONDITIONAL()": {
      "condition": "domain == \"HR\"",
      "on_pass": "\"hr_chat\"",
      "on_fail": "\"it_chat\""
    }
  },
  "u_issue_category": "issue_category OR null",
  "u_issue_details": "description OR null"
}
```

| Key                         | Value sent                                                        | Use in AWA                                          |
| :-------------------------- | :---------------------------------------------------------------- | :-------------------------------------------------- |
| `language`                  | The user's language code, or `en` if none is set                  | Route to language-specific queues                   |
| `liveagent_optional_skills` | The domain, for example `IT` or `HR`                              | Route by team                                       |
| `mw_chat_source`            | Always `moveworks`                                                | Tell Moveworks chats apart from other chat channels |
| `mw_queue_hint`             | `hr_chat` for HR requests, `it_chat` for everything else          | Match one queue condition per value                 |
| `u_issue_category`          | The value the user picked in the form's `issue_category` dropdown | Route by issue type, for example hardware or access |
| `u_issue_details`           | The text the user entered in `description`                        | Give agents or routing rules the full request       |

The keys must match the context variables your AWA queue conditions check. If no queue matches a chat, ServiceNow ends it with a no-agents message even when agents are available. To learn more, read [Exploring Advanced Work Assignment](https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/administer/advanced-work-assignment/concept/awa-overview.html).