Set Up Autopilot Amelia with Knowledge Hub

You can use CXone Mpower Expert or a third-party knowledge sourceClosed A knowledge management system that hosts knowledge articles. with your Autopilot Amelia virtual agent. The connection between Autopilot Amelia and your knowledge source is managed with CXone Mpower Knowledge Hub.

Before You Begin

Setting up the integration of Autopilot Amelia and Knowledge Hub involves two API calls from Autopilot Amelia to CXone Mpower. Before you can configure and test these calls, you must register an application with NiCE. Complete the following tasks to prepare for the integration:

  • Ensure that you have a Knowledge Hub knowledge base created and configured in your CXone Mpower system. This must be completed by your CXone Mpower Account Representative.

  • Ensure that you have Autopilot Amelia set up and working before starting the Knowledge Hub integration.

  • Complete the tasks described in the getting started guide for working with CXone Mpower APIs.

    • The client ID and secret must be passed into the payload of the request to get a token. This is set up in tasks 2 and 4 of the getting started guide.
    • Integrations with CXone Mpower APIs must consume the discovery service. URLs should not be hardcoded. This is covered in task 5.
    • You need to discover the base URL for the API calls used in the integration. This is also covered in task 5. Best practice is to perform the discovery call before every API call you make. This allows you not to hard-code your base URL. For example, you could develop a Web Service Action that consumes the API discovery and passes the base URL on.

Set Up the Integration

Follow these steps to set up the integration of Autopilot Amelia and Knowledge Hub.

Generate a CXone Mpower Access Key

Generate an access key in CXone Mpower. Follow your organization's guidelines for which employee profile to use for access tokens. You can only access the secret key once, so save it in a secure location. You will use it in the next step.

Create a Web Service Action to Generate a Token

In Autopilot Amelia, create a Web Service Action to generate a token. You will configure the Web Service Action with the CXone Mpower access token and secret key you generated in the preceding task. The token that the Web Service Action generates will be used in API calls in the Authorization: Bearer [access token] header.

Give this Web Service Action a name such as Knowledge Hub Token Generation. Use the following information on the Web Service Action:

  • Request: Set the verb to POST and use the following API: [base URL]/auth/token.

    Modify the URL by replacing [base URL] with the base URL for your CXone Mpower system. You can learn what it is by following instructions on the developer portal Icon of a square with an arrow point from the center through the top right corner. under API Discovery.

  • Headers: Add the following parameter:

    • Key: Set to Content Type.
    • Value: Set to application/x-www-form-urlencoded).
  • Body: On the Body tab, paste the following request and configure :

    grant_type=password&username=[accessKeyId]&password=[accessKeySecret]&client_id=[clientId]&client_secret=[clientSecret]

    In the request, configure the parameters like this: 

    • grant_type: Set to password.
    • password: Set this to the CXone Mpower secret key you generated in the previous task. If you lost the secret key, you must delete the access key you generated and create a new one.

    • username: Set this to the CXone Mpower access key you generated in the previous task.

    • client  ID: Set this to the client ID that you receive after registering the application with NiCE. This is Task 2 in the guide for getting started guide Icon of a square with an arrow point from the center through the top right corner. on the developer's portal.

    • client secret: Set this to the client secret that you receive after registering the application with NiCE. This is Task 2 in the guide for getting started guide Icon of a square with an arrow point from the center through the top right corner. on the developer's portal.

    An example of the body is: 

    grant_type=password&username=MZXXK3TPO5XW4ZLU&password=K5RWKZ3FNVXW4ZLUNFXG63TPOVXW4ZOVXW633D&client_id=f47ac10b-ab12-4372-cd34-0e02b2c3d479&client_secret=aGVsbG9E9PQaBc123%3D%3D 

Create a Web Service Action to Call Knowledge Hub

Create a second Web Service Action in Autopilot Amelia for the Knowledge Hub API call. Give it a name that shows it's for the Knowledge Hub integration. For example, Knowledge Hub v4.

Under Request, add the following information on the Web Service Action

  • Verb: Select POST.
  • URL[base URL]/eai-real-time-insight/v4/direct-query

    Modify the URL by replacing [base URL] with the base URL for your CXone Mpower system.

  • Headers:

    • KeyAuthorization

      ValueBearer [token], where you replace [token] with the appropriate variable to hold the token generated by the Web Service Action you created in the preceding step. For example, ${token}.

    • KeyContent-Type

      Valueapplication/json

  • BodyOn the Body tab, paste the following request:

    Ensure that all required values in the request body are correct. You may need to modify other values to customize the integration to the needs of your organization. You can learn about the fields in the request body and how to complete them.

Build Flows in Autopilot Amelia

The final step in setting up the integration is to build flows that use the Web Service Actions you created.

  1. In your Autopilot Amelia console, create a flow to generate a token and connect it to the token generation Web Service Action you created.

  2. Connect the Knowledge Hub integration Web Service Action you created to the appropriate flows to add it to your Autopilot Amelia conversations.

KB Answer Configuration

Autopilot Amelia provides responses with solutions to the contact's issue. These are based on your organization's knowledge baseClosed A knowledge management system that hosts knowledge articles. (KB). For example, if a contact says they're having trouble with Product A, the suggested response could be, "Try resetting Product A. Go to Settings and click Reset."

You can define a maximum word count for KB answers in the response body in Autopilot Amelia. You can also configure KB answers to include:

  • Process steps: Breaks down KB answers into individual steps. Autopilot Ameliacan send one step at a time to walk the contact through the process of solving their issue.

  • KB web links: Provides links to KB articles. Autopilot Amelia can send these links to the contact, who can open the articles in a new tab. You can limit the number of links that can be sent in each response.

  • KB images: Provides images from KB articles. Autopilot Amelia can send these images to contacts. You can limit the number of images that can be sent in each response.

In the response body, you must provide the AWS Bedrock ID for the knowledge base you want to use. You can obtain this ID from your CXone Mpower Account Representative.

Request Body Fields

The following drop-downs contain definitions of the fields in the request body.