Custom API Integrations in Bot Builder

You can set up custom integrations using APIsClosed APIs allow you to automate certain functionality by connecting your CXone system with other software your organization uses.. This allows you to use your own database or third-party applications with your bot. You can connect Bot Builder and the web service you're integrating with by setting up the custom integration.

After the integration is set up, you must create one or more bot actions. This allows you to define the requests that are sent to the integrated web service. You can use these bot actions in dialoguesClosed Bot stories and rules in Bot Builder. to have the bot send a request to the web service at certain points in the conversation.

Create a New API Integration

You only need to create one integration per web service you're connecting to.

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click Integrationsicon, which looks like a plug. in the left icon menu.
  4. On the APIs tab, click New Integration.
  5. Click the default New Integration title to rename the integration, then press Enter to save your change.
  6. Under Authentication, select an authentication Method. Enter the required information for the type you select.
  7. Add one or more actions to the integration.
  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.
  9. Add your action to a storyClosed Used to train bot for interaction handling based on intent and context, ruleClosed Used to define bot's response to messages that don't change with context., or fallbackClosed A plain text alternative sent when the destination doesn't support rich media.. The APIs section of the bot action options shows all the API integration actions you have configured and turned on.

Create a Custom Bot Action for an Integration

You need at least one custom bot action in your API integration. After you create and enable your custom bot action, you can use it in a bot response when working with dialoguesClosed State that allows an agent to complete work requirements after finishing an interaction.

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click Integrationsicon, which looks like a plug. in the left icon menu.
  4. Select the folder for the intents you want to work with, or create a new one.
  5. Under Actions, click New Action.
  6. Enter a name for the action and press Enter.
  7. Click the action to configure it.
  8. Under Configuration, write your configuration in the Request JSON window. Slot values can be used as variables in the format {{slot_name}}. You can use the mockSlots parameter for testing purposes.
  9. Click Test Request at any time to populate the Response window.
  10. You can use the Error Message field under Error Handling to specify what to show the contact in response to a failed API request.
  11. You can select the Debug Mode checkbox to add a suffix response to the error message.
  12. When the action is ready to use with your bot, click the action toggle A long oval with a circle in it that moves from side to side when clicked. at the top of the action configuration page. If the toggle is off, the action will not be available to use.
  13. 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.

Add a Custom API Integration to a Bot Skill

You can add your custom API integration to one or more of your bot skills. This allows you to use the integration's bot actions with the skills you add the integration to.

  1. In CXone, click the app selector and select Bot Builder.

  2. Click the bot you want to work with.
  3. Click Integrationsicon, which looks like a plug. in the left icon menu.
  4. On the APIs tab, hover your cursor over the integration you want to work with.
  5. Click the ellipsis Icon of three dots in a row. and select Add to Skill.
  6. Click one or more skills to click Select all to add the integration to all available skills.
  7. If the skill you want isn't available, enter a name in the search bar, then click Create Skill.