Share via


Hand off to ServiceNow

This document provides step-by-step instructions on how to create and connect a ServiceNow Virtual Assistant to a Copilot Studio agent and escalate to ServiceNow Live Agent. This integration allows you to leverage the capabilities of both platforms and generative answers to enhance your agent experience.

Note

For more detailed information, see Configure handoff to any generic engagement hub. Copilot Studio only provides hooks for you to integrate human agent solutions like ServiceNow.

The following steps are only a suggestion and you need a software development team to perform them. This procedure is intended for experienced IT professionals, developers, or System Integrators who have a solid understanding of developer tools, utilities, and IDEs.

Prerequisites

Before you begin, ensure that you have the following prerequisites in place:

  • An active ServiceNow account with ServiceNow Virtual Agent enabled and ServiceNow Bot Interconnect enabled. (ServiceNow Vancouver or later required)
  • A Copilot Studio agent.
  • Admin or developer access to both ServiceNow and Power Platform.

Steps

Follow these steps to create and connect a ServiceNow Bot to a Copilot Studio agent:

  1. Create a JavaScript function in Microsoft Azure using Visual Studio Code.

    1. Sign in to Microsoft Azure.

    2. Create a JavaScript function in Microsoft Azure.

    3. Create an Azure Function for Copilot Studio as Secondary bot with Servicenow Bot Interconnect setup (KB1112368) KV Function Version3.

    4. Install the request-promise libraries.

    5. Deploy the project to Azure.

    6. From the Azure portal, navigate to All Resources.

    7. Select the name of the function app that you created.

    8. On the Overview page for the function, copy the function URL and keep it for use in a later step. The Azure function URL will be used as the secondary bot endpoint in your ServiceNow instance.

  2. Retrieve Direct Line secret for your bot.

  3. Add the Direct Line secret key to your Virtual Agent Bot Interconnect instance.

  4. Create a Virtual Agent Bot Interconnect shell topic to call Microsoft Copilot Studio topics.

  5. Create a Virtual Agent conversational custom chat integration configuration.

    1. Create a new channel or update an existing channel for the integration.

    2. Configure a new provider for the integration.

    3. Set up message authentication.

    4. Create a channel identifier.

    5. Select rich controls for inbound (user input) and outbound (bot response) transformation.

    6. Create and configure a scripted REST API for your custom chat integration.

    7. Create the action scripts.

  6. Transferring Virtual Agent conversations to a live agent

See Transferring Virtual Agent conversations to a live agent and Configure handoff to any generic engagement hub

Step 7: Closing Virtual Agent and Agent Chat conversations