> 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.

# Lab #7: Handoff — Live Agent

## Overview

* **Learning Objectives:** Configure Moveworks to broker live agent chat sessions between users and ServiceNow agents using the Virtual Agent API integration.
* **Estimated Time:** 30 minutes
* **Prerequisites:**
  * Access to a ServiceNow lab instance with the following update sets already applied:
    * `Moveworks Live Agent VA API Config` (Virtual Agent API scope)
    * `Moveworks Live Agent AWA Config` (Global scope)
  * Access to your tenant's **MyMoveworks** portal with the **Agent Studio** module
  * ServiceNow admin credentials for your lab instance

***

### Key Concepts

Live Agent Message Brokering allows Moveworks to act as a bridge between end users in their chat platform (Slack, Teams, etc.) and live agents in ServiceNow's Service Operations Workspace. When the AI Assistant cannot resolve a user's issue, it can seamlessly hand off the conversation to a human agent.

* **Message Brokering vs. Deep Link:** Message brokering keeps the conversation within the user's native chat platform (Slack/Teams). The alternative deep link approach redirects users to a ServiceNow portal. Message brokering provides a better user experience.
* **Virtual Agent API:** Moveworks uses ServiceNow's Virtual Agent Bot-to-Bot API (`/api/sn_va_as_service/bot/integration`) to initiate conversations and relay messages between users and agents.
* **Agent Availability:** Moveworks checks the `awa_agent_presence_capacity` table to determine if agents are available before offering the handoff option.
* **AWA Routing:** Interactions must be routed through Advanced Work Assignment (AWA) queues. Without a properly configured queue, assignment rule, and eligibility pool, interactions will immediately close.

***

## 🛠️ 1: Walkthrough

### 1.1 Verify ServiceNow Prerequisites

**Warning:** The update sets handle most of the ServiceNow configuration. Before proceeding, verify the setup was applied correctly.

#### Verify Virtual Agent API Plugin

1. In your ServiceNow instance, navigate to **System Applications > All Available Applications > All**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/98dc94e57cc32044f668a426ec4bd9ee2378232c0b0e67eef709aaed906194ca/docs/assets/images/setup-labs/lab7_eb359535-09f5-4e88-96b6-623c9383312c_image.png)
2. Search for **Virtual Agent API** and confirm it is installed
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/7135fcfa454a98a94f759fae01e1cf0a27397574f31ee6599fba3882da5d0894/docs/assets/images/setup-labs/lab7_2ab81d65-73c4-47ae-a28f-f800e9d9ab3f_image.png)
3. Search for **Agent Chat** plugin and confirm it is installed
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/caf313e848e25d18930a521ff07ecf30966f62b237e4539b41ad6afcbd8b91c6/docs/assets/images/setup-labs/lab7_32a0094a-0e05-4772-a9f5-ed28329247ef_image.png)

#### Verify Update Set Configurations

Run the following script in **Scripts - Background** to confirm the update sets were applied correctly:

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/a767abfbaba3026de8de2655d3f7347117dbea5ec565c35e39e9f8e3be215998/docs/assets/images/setup-labs/lab7_d8ef4995-ef0c-420b-a11c-63e6babb61da_image.png)

```javascript
(function() {
    gs.print('=== Verifying VA API Config ===');

    var rest = new GlideRecord('sys_rest_message');
    rest.addQuery('name', 'VA Bot to Bot');
    rest.query();
    if (rest.next()) {
        gs.print('VA Bot to Bot endpoint: ' + rest.rest_endpoint);
    } else {
        gs.print('ERROR: VA Bot to Bot REST message not found');
    }

    var post = new GlideRecord('sys_rest_message_fn');
    post.addQuery('rest_message', rest.sys_id);
    post.addQuery('http_method', 'POST');
    post.query();
    if (post.next()) {
        gs.print('POST endpoint: ' + post.rest_endpoint);
    } else {
        gs.print('ERROR: POST method not found');
    }

    gs.print('\n=== Verifying AWA Config ===');

    var q = new GlideRecord('awa_queue');
    q.addQuery('name', 'Moveworks Labs Live Agent Chat Queue');
    q.query();
    if (q.next()) {
        gs.print('Queue: ' + q.name + ' | active=' + q.active + ' | channel=' + q.service_channel.getDisplayValue());
    } else {
        gs.print('Chat queue not found');
    }

    var ar = new GlideRecord('awa_assignment_rule');
    ar.addQuery('name', 'Chat - Most Capacity');
    ar.query();
    if (ar.next()) {
        gs.print('Assignment Rule: ' + ar.name + ' | active=' + ar.active);
    } else {
        gs.print('Assignment rule not found');
    }

    var ep = new GlideRecord('awa_eligibility_pool');
    ep.addQuery('display_name', 'Agent Chat Group : Chat - Most Capacity');
    ep.query();
    if (ep.next()) {
        gs.print('Eligibility Pool: ' + ep.display_name);
    } else {
        gs.print('ERROR: Eligibility pool not found');
    }

    gs.print('\n=== Verification Complete ===');
})();
```

**Expected Output:**

**Note:** All lines should show the expected values. If any line shows `ERROR`, the update set may not have been applied correctly. Contact your lab instructor.

```
*** Script: === Verifying VA API Config ===
*** Script: VA Bot to Bot endpoint: https://api.moveworks.ai
*** Script: POST endpoint: https://api.moveworks.ai/rest/LiveAgentService/SnowSendMessageToUser
*** Script: 
=== Verifying AWA Config ===
*** Script: Queue: Moveworks Labs Live Agent Chat Queue | active=true | channel=Chat
*** Script: Assignment Rule: Chat - Most Capacity | active=undefined
*** Script: Eligibility Pool: Agent Chat Group : Chat - Most Capacity
*** Script: 
=== Verification Complete ===
```

***

### 1.2 Generate API Key

1. Navigate to the **MyMoveworks** portal
2. Open the **HTTP Connectors** App
3. Click on **Credentials** and click **Create**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/117ee2d806f288a7c43e8279ff9a621ef4558bf75b40471d37040fca082f23b2/docs/assets/images/setup-labs/lab7_b858dc76-02c6-44da-8e6e-53d3457c8026_image.png)
4. Enter a **Credential Name** (e.g., `ServiceNow Live Agent API Key`)
5. Choose **API Key**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/ce2abe055277ea0689b70494fd61f3e3d84714e9d794142447888b6ffb47bb81/docs/assets/images/setup-labs/lab7_3cb6d753-dcd5-4067-b2ac-15ea39b793b0_image.png)

**Warning:** Once you click **Publish**, copy and paste the API Key immediately and save it in a secure location. This key will not be displayed again.

6. Click **Publish** and save the API Key securely
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/8d50bceb68a92e352351bd4dab7db6e6a03859aaeaa7db3877c9b486ca9812eb/docs/assets/images/setup-labs/lab7_8344717f-b3c2-449e-a34e-e2dad3742f35_image.png)

***

### 1.3 Set Auth Profile Password in ServiceNow

The update set creates the auth profile but **cannot transport the password**. You must enter the API key you just generated.

1. In your ServiceNow instance, navigate to **Outbound > REST Message**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/5ab650405f7d3d50f32ca4f6a52af9911de7296f7131067d1cc7dcd7d46d4fe7/docs/assets/images/setup-labs/lab7_08ab085d-e9ae-4e30-827b-4e477f1b183b_image.png)
2. Click into **VA Bot to Bot**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/5d8585f63dac65799ad1096b3bb7acf1fc886ce9f8e1fb618db3b2ca9c82d628/docs/assets/images/setup-labs/lab7_f201291d-0c7b-479f-a053-22fa5ac57026_image.png)
3. Open the **POST** method record called `postMessage` (listed under HTTP Methods)
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/72f454c869f756ddf3f8e9a1c41894620cf445acd48f45aaa58c8fa93d72c90f/docs/assets/images/setup-labs/lab7_45aad845-d0ad-4bf4-b409-b5c81c137eeb_image.png)
4. Go to the **Authentication** tab and open the auth profile **Moveworks Live Agent Auth** (click the "i" icon and select open record)

**Note:** Some of these configurations reside within the **Virtual Agent API** application scope rather than the **Global** scope. You can learn more about application scopes [here](https://www.servicenow.com/docs/r/xanadu/servicenow-platform/proactive-service-experience-workflows/c_ApplicationScopes.html?contentId=2yXhmVG58QtS4oKeyJGmgA).

To complete the remaining steps, please click the link below to allow the changes to occur within the **Virtual Agent API** scope.

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/a0d9515b1829199c39d075a8c3a4e481884351b7a46cfd9dd764b8ad892e6508/docs/assets/images/setup-labs/lab7_9ed9a1c5-f399-4924-b424-0786deebd89c_image.png)

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/f7d51398cf0ec988ec39400e7131a80c41b0a30061dac7a9df4217456ba36394/docs/assets/images/setup-labs/lab7_d0c52574-422d-4eff-8b4c-192066d90893_image.png)

5. Enter the API key from Section 1.2 as the **Password**

**Note:** To complete the remaining steps, please click the link below to allow the changes to occur within the **Virtual Agent API** scope.

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/75aed873eabca127ffdd7cfb60f640338ebd507c23ab99bc707a1e08561f11b4/docs/assets/images/setup-labs/lab7_c8ecb2f8-a9a4-4ba0-8098-322599ade0f5_image.png)

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/4b29a8599de5803f845e6e3a14bd2ece9604679ca3a053025bbe7587ba521d84/docs/assets/images/setup-labs/lab7_7b4a9869-a53a-41ea-bd20-eccb7e94995b_image.png)

6. Click **Update**

***

### 1.4 Set Token Verification Password in ServiceNow

The update set creates the token verification record but **cannot transport the password**. You must set it manually.

1. Navigate to `[your_instance]/token_verification_list.do`
2. Open the record named **Moveworks Live Agent Message Brokering - IT**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/409c07197fadfd1b4a07ef8a7b7f8089c88ce90958791d5937fa993e147e43b1/docs/assets/images/setup-labs/lab7_cba29903-3805-49ce-bc04-df916782d460_image.png)
3. Set any secure password in **Token** — **save this password securely, you will need it in Section 1.6**
4. Click **Update**

***

### 1.5 Configure Live Agent Handoff

1. In MyMoveworks, navigate to **Handoff > Live Agent Handoff**
2. Click **Create** to add a new configuration
3. Set **Configuration** to **Agent Broker Handoff**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/f6f37cd8d738703f2f56df732d67c56bf1f5fb4159e0eb5526500f30050fbc42/docs/assets/images/setup-labs/lab7_284e70f6-edce-48c1-bf8c-cb9e28ef54c9_image.png)
4. Open the **Live Agent Handoff** dropdown and set the **Handoff Identifier** (e.g., `agent_broker_instance_1`)
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/0e9ebe74ba29b1801acf54e9ad5f4d1c662224137c3785181d76430cc4ff026c/docs/assets/images/setup-labs/lab7_aad69141-786a-4266-af6f-d2f5cd753e88_image.png)
5. Configure the **Snow Handoff Config Context Bender** with the following default payload:

```javascript
{
  "language": "language OR null",
  "liveagent_optional_skills": "domain OR null"
}
```

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/1595470f4f7a93a7feeab8d03d74b7412327addadd6cf834305dd76ecabfd51e/docs/assets/images/setup-labs/lab7_03473333-c18e-40be-8ad2-1e5e87aff83b_image.png)

6. Set the **Integration ID** to the ServiceNow connector that will be used as the live agent chat platform
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/9d2e80acbdc0e4a8054e29c28b94e1ceefea1c1686e11b657c62081465545333/docs/assets/images/setup-labs/lab7_a7bbc21b-fe56-445b-8bec-68f62db7db77_image.png)
7. Set **Enable Live Agent** to **TRUE**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/5ea02755bbd170e01ad4394a5be5a2e1ec92fa17575a1b85405882551bf6de5e/docs/assets/images/setup-labs/lab7_e8ec82a1-5f4c-4e16-9919-8e0f9fa522bc_image.png)
8. Click **Run** and enter your email. This confirms the DSL rule evaluates to **TRUE** for your profile, ensuring that Live Agent is correctly enabled for you.
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/0354bcb2199cb5f543f9db11a511794d36e6c32bc61628d5e3a8a8362a2e9fa2/docs/assets/images/setup-labs/lab7_ccaefa61-f238-42b9-96d2-57b8ed0db9d7_image.png)

| **Field Name**         | **Action / Value to Enter**     |
| ---------------------- | ------------------------------- |
| **Configuration**      | Agent Broker Handoff            |
| **Handoff Identifier** | `agent_broker_instance_1`       |
| **Trigger Rule**       | `context.domain == "IT_DOMAIN"` |
| **Integration ID**     | Your ServiceNow connector       |
| **Enable Live Agent**  | TRUE                            |

***

### 1.6 Configure Smart Handoff

1. Navigate to **Handoff > Handoff Settings**
2. Expand **Setup items for categories**, then add a new **Item Display Key** with the following values (you may need to scroll to the bottom and click **Add +**)

| **Field Name**            | **Action / Value to Enter**                                                 |
| ------------------------- | --------------------------------------------------------------------------- |
| **Item display key**      | `agent_broker_instance_1`                                                   |
| **Metadata Domain**       | `IT_DOMAIN`                                                                 |
| **Handoff Type**          | `AGENT_HANDOFF`                                                             |
| **Pretrigger Rule**       | `IF (context.domain_candidates[0].domain == "IT_DOMAIN") THEN 1.0 ELSE 0.5` |
| **Category display keys** | IT                                                                          |

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/08400759a93dbd4ae61e6ba92275d0977273f27873de1026b975650beb67538f/docs/assets/images/setup-labs/lab7_5ccf551b-0366-4745-acf6-12ca1efc9863_image.png)

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/c5a904744e84c4337607184ce45365a89affb7bc1abc8a5dfca458289d6c5d1b/docs/assets/images/setup-labs/lab7_0310ab3a-e076-494f-9586-e9c5767f789a_image.png)

3. Navigate to **Display Configurations > Handoff**
4. Scroll down within the Handoff configurations and ensure the **Handoff Identifier** (`agent_broker_instance_1`) is set under **Map of actions for handoff items**
5. Set the **Value** field to a user-friendly name (e.g., `Live Chat`) — this is what users will see when selecting this handoff option (if these values are already preset, you are done and can move on to the next step)
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/fc014b63bda36e1291b9eec0401e2d7f3505972583262e4de77629726377c6a2/docs/assets/images/setup-labs/lab7_32c22069-7bbe-4623-b44d-48e453694570_image.png)

**Note:** If the Handoff Identifier is not set in Display Configurations, the "Start agent chat" button will not appear in the AI Assistant.

***

### 1.7 Update ServiceNow Connector with Token

1. In Moveworks Setup, navigate to **Connectors > Built-in Connectors**
2. Find the ServiceNow connector for your lab instance and click **Edit**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/acf15a87b6cc65050bab3b8270384675b6b0142a8489188914fa5e15806c5db2/docs/assets/images/setup-labs/lab7_895143ca-647f-4d45-a00a-2825c6400dc6_image.png)
3. Add the token password from **Section 1.4** to the **ServiceNow Virtual Agent API Token** field
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/86c86994ea9b98e411111f9814982f48af95e5a2968748968264fada79f7b5eb/docs/assets/images/setup-labs/lab7_99616774-6685-41d7-9ff2-16ec53180553_image.png)
4. Click **Save**

***

### 1.8 Set Up Your Agent in ServiceNow

Run the following script in **Scripts - Background** to configure your user as a live agent. Replace `CHANGE_ME` with your ServiceNow username:

**Note 1:** Make sure the instance is set to **Global** scope.

**Note 2:** The script is pre-configured to set up `moveworks.admin (Jordan Taylor)` as the live agent. You cannot answer your own live agent chat — the agent receiving the chat must be a different user than the one initiating the handoff.

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/c20692f4d4c51a018b3ab9e8f5a03abca648e827eaaaf16e860c01bb2abc7a3a/docs/assets/images/setup-labs/lab7_ea51fa54-3402-4df3-856d-6568f5135e19_image.png)

```javascript
(function() {
    var userName = 'moveworks.admin';  // <-- Set your moveworks.admin here

    var user = new GlideRecord('sys_user');
    user.addQuery('user_name', userName);
    user.query();
    if (!user.next()) { gs.print('User not found: ' + userName); return; }
    gs.print('Setting up agent: ' + user.getDisplayValue() + ' (' + userName + ')');

    // Add to Agent Chat Group
    var grp = new GlideRecord('sys_user_group');
    grp.addQuery('name', 'Agent Chat Group');
    grp.query();
    if (!grp.next()) { gs.print('ERROR: Agent Chat Group not found'); return; }

    var gm = new GlideRecord('sys_user_grmember');
    gm.addQuery('group', grp.sys_id);
    gm.addQuery('user', user.sys_id);
    gm.query();
    if (!gm.next()) {
        gm.newRecord();
        gm.group = grp.sys_id;
        gm.user = user.sys_id;
        gm.insert();
        gs.print('  Added to Agent Chat Group');
    } else {
        gs.print('  Already in Agent Chat Group');
    }

    // Grant awa_agent role
    var role = new GlideRecord('sys_user_role');
    role.addQuery('name', 'awa_agent');
    role.query();
    if (role.next()) {
        var hr = new GlideRecord('sys_user_has_role');
        hr.addQuery('user', user.sys_id);
        hr.addQuery('role', role.sys_id);
        hr.query();
        if (!hr.next()) {
            hr.newRecord();
            hr.user = user.sys_id;
            hr.role = role.sys_id;
            hr.insert();
            gs.print('  Granted awa_agent role');
        } else {
            gs.print('  Already has awa_agent role');
        }
    }

    // Create agent presence
    var ap = new GlideRecord('awa_agent_presence');
    ap.addQuery('agent', user.sys_id);
    ap.query();
    if (!ap.next()) {
        ap.newRecord();
        ap.agent = user.sys_id;
        var ps = new GlideRecord('awa_presence_state');
        ps.addQuery('name', 'Available');
        ps.query();
        if (ps.next()) ap.current_presence_state = ps.sys_id;
        ap.insert();
        gs.print('  Created agent presence (Available)');
    } else {
        gs.print('  Agent presence exists | state=' + ap.current_presence_state.getDisplayValue());
    }

    // Create Chat capacity
    var ch = new GlideRecord('awa_service_channel');
    ch.addQuery('name', 'Chat');
    ch.query();
    if (ch.next()) {
        var ac = new GlideRecord('awa_agent_capacity');
        ac.addQuery('user', user.sys_id);
        ac.addQuery('channel', ch.sys_id);
        ac.query();
        if (!ac.next()) {
            ac.newRecord();
            ac.user = user.sys_id;
            ac.channel = ch.sys_id;
            ac.applied_max_capacity = 4;
            ac.insert();
            gs.print('  Created Chat capacity (max=4)');
        } else {
            gs.print('  Chat capacity exists');
        }

        // Create Chat availability
        var aca = new GlideRecord('awa_agent_channel_availability');
        aca.addQuery('agent', user.sys_id);
        aca.addQuery('service_channel', ch.sys_id);
        aca.query();
        if (!aca.next()) {
            aca.newRecord();
            aca.agent = user.sys_id;
            aca.service_channel = ch.sys_id;
            aca.available = true;
            aca.insert();
            gs.print('  Created Chat availability (available=true)');
        } else {
            gs.print('  Chat availability exists');
        }
    }

    gs.print('\nDone! Set your status to Available in Service Operations Workspace.');
})();
```

**Expected Output:**

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/3eb78defc0cefe88412d2af4151705f381b24a93c23c7ef0176cab6babfc19b5/docs/assets/images/setup-labs/lab7_a5ff862e-5a73-4b41-ab1c-ad13d4c34a8c_Screenshot_2026-03-27_at_5.19.59_PM.png)

**Impersonate** `moveworks.admin (Jordan Taylor)`

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/06e9189621aee71eae5487aa64a551ac7b65763326623a315307de54187409b9/docs/assets/images/setup-labs/lab7_5564434b-51ff-4202-a85c-f3bf4d8cdcff_Screenshot_2026-03-27_at_5.24.33_PM.png)

After running the script, open **Service Operations Workspace** in ServiceNow and set your status to **Available**.

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/e79c6bbaa47c29bda26bf039209c121e470daabdf1a215003227df3f99e7422a/docs/assets/images/setup-labs/lab7_8b221550-bdfe-4e17-8e57-a6ab68f4faae_image.png)

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/a883c7a8dd141ef5da7613f71123c3cf25c40bc8999a57cc1427344f9850651c/docs/assets/images/setup-labs/lab7_50277bdd-427a-41c2-a825-4e2cb2fada4e_image.png)

***

## ✅ 2: Verification & Testing

### 2.1 Test the Handoff

1. Open your AI Assistant
2. Start a conversation and click **Get Help**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/548396b6e6a58b5c9df33e9154ad8f890ae12faae385a456dbc5fcefcc7e6da4/docs/assets/images/setup-labs/lab7_bcb081d2-55c9-4a2e-a5f6-88a27d249386_image.png)
3. Select **Start agent chat**
   ![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/107b88349d12e93fa508a4485e2d948bfde299a726ff5c4ad8a7cbaf90c6d9c5/docs/assets/images/setup-labs/lab7_b8a584da-c168-4cae-be93-4f1446816728_image.png)
4. Verify the description and click **Submit**
5. The live agent session should begin — check Service Operations Workspace for the incoming chat

**Note:** Impersonate the moveworks.admin user (Jordan Taylor) to receive the incoming chat in Service Operations Workspace.

![](https://files.buildwithfern.com/moveworks.docs.buildwithfern.com/6d3a247e043939fe1dcc11446abd4a18b475c287d2f200d16507b2423917db49/docs/assets/images/setup-labs/lab7_1c21e851-7ab3-40b3-a102-712bbdb84039_image.png)

***

### 2.2 Troubleshooting

| **Symptom**                                | **Likely Cause**                                                      | **How to Check**                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------ | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "No agents available"                      | Agent not set to Available in SOW, or schedule config blocking        | Verify agent status in SOW; check `awa_agent_presence_capacity` API. In ServiceNow, navigate to **Service Operations Workspace**, set your status to **Available**, then verify agents are available by running: `GET [your_instance]/api/now/table/awa_agent_presence_capacity?sysparm_query=aca_available=true` — you should see at least one result with `aca_available: true` |
| Interaction created but immediately closes | AWA queue, assignment rule, or eligibility pool missing/misconfigured | Check `interaction.list` — if `active=false` and `queue` is empty, the AWA routing is broken                                                                                                                                                                                                                                                                                      |
| "Start agent chat" button doesn't appear   | Handoff Identifier not set in Display Configurations                  | Verify Display Configurations > Handoff has the correct identifier                                                                                                                                                                                                                                                                                                                |
| Auth errors from ServiceNow                | API key not set in auth profile, or token mismatch                    | Verify auth profile password and connector token match                                                                                                                                                                                                                                                                                                                            |

**You've completed the Moveworks Setup labs!** Recommended next step: the [Agent Studio Quickstart series](/agent-studio/quickstart-guide/purple-api-tool), which walks you through building plugins on top of your now-configured Moveworks instance. Start with the Purple API Tool to set up your shared session, then work through Quickstart #1.

***

## 🪞 3: Reflecting on This Configuration

Through this lab, you've learned the following:

* How to configure Moveworks Live Agent Handoff to broker chat sessions between users and ServiceNow agents
* How to connect Moveworks and ServiceNow using the Virtual Agent Bot-to-Bot API with proper authentication (API key + token verification)
* How to configure Smart Handoff rules to control when the live agent option appears based on domain context
* How to verify agent availability and troubleshoot common issues like missing AWA queue configuration, closed interactions, and authentication mismatches
* How the end-to-end flow works: availability check → interaction creation → AWA routing → agent assignment → message brokering

***

## ⚙️ 4: Configuration Summary

| **Component**                   | **Where**                                        | **What**                                                         |
| ------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------- |
| **API Key**                     | MyMoveworks > HTTP Connectors                    | Generated credential for ServiceNow auth profile                 |
| **Auth Profile Password**       | ServiceNow > VA Bot to Bot > POST > Auth Profile | API key entered as password                                      |
| **Token Verification Password** | ServiceNow > `token_verification_list.do`        | Password set on Moveworks token record                           |
| **Live Agent Handoff**          | MyMoveworks > Handoff > Live Agent Handoff       | Agent Broker Handoff config with trigger rule and integration ID |
| **Smart Handoff**               | MyMoveworks > Handoff > Handoff Settings         | Item display key and display configuration                       |
| **Connector Token**             | MyMoveworks > Connectors > Built-in Connectors   | Token verification password added to ServiceNow connector        |
| **Agent Setup**                 | ServiceNow > Scripts - Background                | Agent added to Chat queue with roles, presence, and capacity     |