How to Configure ServiceNow Live Agent Message Brokering

Pre-Requisites

  • Ensure the required ServiceNow Connector has been created with the necessary permissions. Please refer to the ServiceNow Access Requirements Doc for details.
  • Ensure access to your tenant's MyMoveworks portal and the Agent Studio module
  • Verify that the ServiceNow Virtual Agent APIs are available in the ServiceNow instance
  • Verify that the Agent Chat plugin is installed
  • For testing, ensure access to the Service Operations Workspace module within ServiceNow or ensure that there are agents available within the queue that is being tested

Configuration

Step 1: Generate API Key

Navigate to the Moveworks Agent Studio within your MyMoveworks portal and enter the Events workspace.

  1. Click on Credentials and click Create
  2. Enter a Credential Name
  3. Choose API Key

❗️

WARNING: When you click Publish, please save the API Key in a safe location as this key will not appear again

  1. Click Publish and save the API Key

Step 2: Virtual Agent API

Through the Virtual Agent API plugin, the service account will need Virtual Agent permission and permission to view awa_agent_presence_capacity table.

The service account will need to have read access to the following tables to be able to view awa_agent_presence_capacity:

  • awa_agent_presence
  • awa_agent_capacity

The service account needs to have the virtual_agent_admin role.

Step 3: Outbound REST APIs

Go to Outbound REST APIsVA Bot to Bot

  1. Set the VA Bot to Bot record’s REST endpoint to: https://api.moveworks.ai
    1. If in the Moveworks Gov Cloud environment, the domain will be https://api.moveworksgov.ai
  1. As part of VA Bot to Bot record you will see a POST record. Edit the associated POST record, and set the endpoint to: https://api.moveworks.ai/rest/LiveAgentService/SnowSendMessageToUser
    1. If in the Moveworks Gov Cloud environment, the domain will be https://api.moveworksgov.ai
  1. In the POST Record you will also need to set the auth profile to a newly created auth profile for Moveworks — we will need to create a new auth profile by following the steps below:

    1. Set Authentication type to Basic
    2. Set the username to moveworks — this can be customized to anything else if required, but you will need this for the Moveworks configuration.
    3. Set password to the value of the API key generated in Step 1.

Step 4: Verify the token

Next, verify the token.

  1. Navigate to {snow_url}/token_verification_list.do and create a new record by clicking new on the top right.

❗️

In the next step, save the generated token in a safe location as it will be needed later in the guide

  1. Create a password here and store it safely. This will be needed later in the guide. You can give any name you’d like to the token. We recommend Moveworks Live Agent Message Brokering - {DOMAIN}
  2. e.g: Moveworks Live Agent Message Brokering - IT , Moveworks Live Agent Message Brokering - HR, etc.

Next, configure the message auth

  1. Navigate to {snow_url}/message_auth_list.do and create a new record.
  1. Add the token verification you created in the previous step under Inbound message verification.
    1. Although Outbound message creation is not yet supported by VA API, it is recommended that you add the same token verification here as it is required field.
  2. Name and Provider can be named as desired.

Finally, add the above message auth to VA Bot to Bot Provider Application

  1. Navigate to {snow_url}/sys_cs_provider_application_list.do . You should see VA Bot to Bot Provider Application if the VA API application was successfully installed.
  2. Open this record and under message auth, add the message auth you configured in the previous instruction.

Step 5: Enable File Attachments

To enable file attachments from the user to the agent, we need to allowlist the ServiceNow domain.

  1. Navigate to {snow_url}/sys_cs_provider_application_list.do, you should be in the VIRTUAL AGENT API application scope to be able to make changes here.
  2. Click on the gear icon at the top right and add trusted media domains to the list of selected columns.
  1. Double click on Trusted media domains and add “service-now.com” as pictured below and save.

Step 6: Update Service Portal URL

Next, update the Service Portal url for KB and Ticket links.

  1. Navigate to sys_properties_list.do and update the com.glide.cs.url_redirect.default.portal system property with the correct service portal name (if using a service portal other than the default /sp)
  1. Navigate to sys_cs_portal_url_mapping_list.do and update the link for KBs if you use a custom url.

Step 7: Moveworks Setup Settings

The ServiceNow configurations are now complete, so navigate to your MyMoveworks portal to complete the rest of the steps within Moveworks Setup. First, set up the Live Agent Handoff settings.

  1. Create a Live Agent Handoff configuration and set Configuration to Agent Broker Handoff (or equivalent).
  1. Click the Live Agent Handoff page dropdown:
  1. Set the Handoff Identifier (ex. agent_broker_instance_1)
  1. Set the Trigger Rule based on a specific domain (e.g context.domain == "IT_DOMAIN")
  1. Snow Handoff Config Context Bender is how we transform our payload to adhere to what is expected by the customers’ ServiceNow instance. It is suggested to have the following as default:
{
  "language": "language OR null",
  "liveagent_optional_skills": "domain OR null"
}
  1. Set the Integration id to the connector that will be used as the live agent chat platform. This is needed as some organizations might want to use ServiceNow for IT Live Agent Chat and AWS Connect for HR Live Agent Chat.
  1. Set Enable Live Agent to TRUE

Next, configure the Smart Handoff settings with the Live Agent settings that were configured above.

  1. Navigate to to Handoff and then Handoff Settings and add a new Item display key using the details in the screenshot below
IF (context.domain_candidates[0].domain == "IT_DOMAIN") THEN 1.0 ELSE 0.5 
  1. Make sure that the Handoff Identifier (ex. agent_broker_instance_1) is set in Display Configurations > Handoff. If this is not set, the Start agent chat button will not appear. This Value field is what users will see when selecting this handoff option so ensure that this is user friendly.

Finally, update the ServiceNow connector with the token from Step 4.

  1. Navigate to Connectors and click on Built-in Connectors
  2. Find the ServiceNow connector in question and click Edit
  3. Add the token from Step 4 to the ServiceNow Virtual Agent API Token
  4. Click Save

Validation

In ServiceNow, search for Service Operations Workspace > Service Operations Workspace

Find your inbox and set yourself to Available

Make sure at least one agent is Available in Agent Workspace.

The “start agent chat” button will only show up in the bot when there are available agents.

Now, trigger the Live Agent Message brokering via the Moveworks AI Assistant.

  1. Access your AI Assistant within Teams, Slack, service portal, etc.
  2. Start a conversation with the AI Assistant and click the Get Help link

  1. Under the Get Help tab, choose the correct Which team is your request for? that aligns with your Handoff configuration above. In this example, the Handoff aligns with the IT team/domain

  1. Choose Live Chat as the What would you like to do? since that is the name that was given to the Message Brokering display value within the Display Configurations.

  1. Fill out the Description or other Rich Ticket Filing fields and click Submit to begin the live agent message brokering session. Return back

  1. The live agent session will now being in chat if there are any available agents within the queue!