Build a Taskbot for Task Assist

Follow the steps on this page to create a taskbot for Copilot Task Assist. You can learn more about Task Assist from the Bot Builder perspective.

Your taskbot must meet these requirements:

Requirements

Description

Build tasks using flows, stories, or rules

You can use flows, stories, or rules to build tasks for your taskbot. Follow the same guidelines as you would when working with a conversational bot:

  • Rules are for simple, straightforward tasks. 

  • Stories are for more complex tasks.

  • Flows can be used for any kind of task and provide a graphical representation of the actions that make up the task. The Flow Designer includes an AI editor where you can simply request the flow that you would like designed. The flow is ideal for a taskbot as it is comprised of intents and scripts, each of which are required for a taskbot.

Add an intent for each task

You need one intent for each task that your agents can request. The name of the intent is used in the Copilot configurations, so don't change the name of the intent after Copilot has been configured. Doing so will cause an error when an agent requests that task.

You don't need to supply training examples for the intents as you do for a standard Bot Builder bot. This is because each intent is requested directly when the agent selects it. The taskbot does not need to learn when to use each intent in the context of a conversation.

Do not assign taskbot intents to more than one flow, story, or rule. Doing so will cause an error when an agent requests that intent.

Add a Bot Builder Script for each intent

Taskbots use Bot Builder script integrations. Each Task Assist task must have its own script in Bot Builder. Scripts are created as scripting actions within a script integration. You can have one or more script integrations, each with one or more scripting actions. The number and organization of script integrations and scripts is up to you.

The scripting action is where the majority of the instructions for executing the task should be made. You can use other bot actionsClosed What the bot can do on its turn in the conversation, such as send a message or fill a slot. in your task flows. However, scripts are easier to work with and debug when there are issues. They also allow you to make multiple API calls and handle responses directly. This simplifies the process of working with the requests that Copilot sends.

The Scripts bot action has a time limit of 10 seconds. If your script takes longer than 10 seconds to execute, it will time out. To avoid this, consider creating two Scripts actions and adding them both to the task's story, rule, or flow.

Use slots to store data

Your taskbot receives the custom payload from Copilot into a single slot. Your Bot Builder script must parse the payload to pull out the information needed to complete the task. You also need individual slots in Bot Builder to store that data in.

Create a Taskbot

You must create a new Bot Builder bot and connect it to Copilot for Agents in Agent Assist Hub.

  1. In Bot Builder, create a new bot.

  2. Build one or more tasks in your new taskbot.

  3. Test each task in Bot Builder.

  4. Enable Task Assist in Copilot for Agents.

  5. Add each task to the Task Assist intent library.

Create and Configure a New Bot

Required permission Bot Builder > Launch Bot Builder

Your taskbot should be a dedicated taskbot configuration in Bot Builder. You cannot use one bot configuration as both a chatbot and a taskbot.

A taskbot doesn't need ACD skills like a standard Bot Builder bot does. You also don't need to connect the taskbot to a CXone Mpower employee profile.

    1. Log in to CXone Mpower with your own account.
    2. Click the app selector icon of app selector and select Bot Builder.
    3. Click Create Bot.

    4. Enter a Name and click Continue.

    5. Accept the default skills, then click Create the Bot. You don't need the skills, and will delete them from your bot in a later step.

    6. It may take several minutes for the setup to complete. You can wait or click Enter the bot to explore the Bot Builder interface while setup completes.
  1. Go to the NLU Intents tab and the Dialogues Rules tab and delete the rules or intents that were added from the default skills when you created the bot.
  2. Click Dialogues icon, which looks like conversation bubbles. in the left icon menu.
  3. Click Slots Icon of a horizontal square bracket in a circle. in the right icon menu and create a custom slot to hold the payload received from Copilot for Agents.
  4. Click Preferences icon, which looks like a gear. in the left icon menu.
  5. On the Settings tab, click VAH Integration.
  6. Choose the custom slot you just created. Your change is saved automatically.

Build a Task

Required permission Bot Builder > Launch Bot Builder

Create one or more tasks for your taskbot to complete. Follow these steps for every task.

  1. Map out the steps that bot must follow to complete the task. Consider:

    • The third-party applications that the bot must connect to.

    • Any security protocols it must follow.

    • The data that must be retrieved or stored.

  2. Collect the information you need to build the task, such as:

    • Connection details for APIs or web services you must connect to, including URLs, authentication tokens, and keys.

    • The exact fields in the third-party application that correspond to the data you're working with.

  3. Map fields between the third-party application, Bot Builder slots, and Copilot for Agents responses. Create the mapping on paper or a document on your computer. You'll use this information in later steps of the process.

  4. In Bot Builder, create custom slots. When creating slots: 

    • Give them meaningful names.
    • You don't need unique slots for every third-party system you interact with. For example, if you have two tasks that use address information, you only need one set of slots to hold that information. However, if you have a task that pulls address information from two systems to compare, you would need one set of address information slots for each system.
    • You don't need to enable the Influence dialogue option unless you plan to use slot conditions in the task.
  5. In Bot Builder, create an intent for the task. Give it a name that matches the name of the task as agents will see it in the agent application. You don't need to add examples to the intent.

  6. In Bot Builder, set up a script for this task. You can create a new script integration or create a script action within an existing integration.

  7. Create a story, rule, or flow for the intent:

    1. Start the story, rule, or flow with a contact message that describes the task such as "I want to change my address." The taskbot may not be able to predict the correct intent for the contact message because the intent doesn't have enough examples. This is okay, because the taskbot isn't expected to work like a standard chatbot.

    2. If the taskbot does not correctly identify the intent, select it from the list of intents and click Confirm.

    3. Add one or more bot actions as needed to define each step the taskbot must follow to complete the task. Configure each bot actionClosed What the bot can do on its turn in the conversation, such as send a message or fill a slot. appropriately.

    4. To add your script action to the bot, add the Scripts bot action to your story or rule, or to your flow.

  8. When you're finished making changes, click Train and Stage to update your bot modelClosed Version of a bot that has been trained and staged to test this change.

Enable the Taskbot in Virtual Agent Hub

Once you create your Bot Builder, you need to enable it in the Virtual Agent Hub.

  1. Go to the Virtual Agent Hub.

  2. Click Add Bot.

  3. Enter a Virtual Agent/Bot Name.

  4. Select Bot Builder and click Next.

    Use the information in the following table when completing the Configuration page. You see this page when adding an app in Virtual Agent Hub

  5. Click Next.

  6. On the Voice page, set Text Only and click Next.

  7. On the Transcript page, select the option for whether you want transcript or intent information saved from conversations with this virtual agent. If you save this information, custom scripting is required to complete the setup of the feature.

  8. Click Test and Add.

    Test your taskbot by doing the following:

    1. Click the three dots and select Add Custom Payload JSON. Enter the custom payload for the task. Enter the variables (the ones you defined in the script block in Bot Builder) and set some values to test. This mimics what will be sent from the Copilot for Agents to the bot.

    2. To start testing, select Trigger Custom Intent Event. Enter the event name. The name should match the Intent name in Bot Builder.

Obtain Token from Bot Builder

Each taskbot has a token that you need when enabling it in Virtual Agent Hub.

  1. In CXone Mpower, click the app selector and select Bot Builder.
  2. Click the bot you want to work with.
  3. Click Preferences icon, which looks like a gear. in the left icon menu.
  4. On the Settings tab, click VAH Integration.

  5. Click copy Icon of two stacked rectangles. in VAH Authentication Token. The copy icon appears when you hover over this field.

  6. Paste the token into the Authentication Token field when adding an app for Bot Builder in Virtual Agent Hub.