If you’re interested in leveraging Generative AI within a Voice bot, you can quickly get started with this bot template.

The template provides a way to use a Voice bot with a knowledge base that supports enriched answers created via Generative AI.

The template shows how to leverage voice interactions, use SSML, and integrate with a knowledge base. There are global functions used to showcase functionality; you can leverage and change these for the specific bot being built.

The template assumes a “Health” use case, but you can modify this too.

The default Welcome dialog in the bot template

Included items


  • Welcome: The Welcome dialog greets the user, introduces the bot functionality, and directs the consumer. This has the complete success flow including the transfer to an agent. The dialog can be broken in multiple dialogs as needed.
  • Repeat the question: In error cases, this dialog asks the consumer to repeat the question.


  • KBIntegration: Integrates with a knowledge base that leverages Generative AI to enrich answers.

Configuration needed

General dialog customization

  • Review each of the dialogs and interactions, starting with Welcome, and customize the verbiage used to greet your customer and request their details.
  • Modify the voicename or other aspects by changing the SSML.
  • If you don’t want to use SSML, remove the SSML tags, and simply adjust the text.
  • If you use the SSML with custom variables like voice name or detecting customer name, use the JavaScript as in the “Welcome Question” Interaction.

A section of the JavaScript in the interaction

In some cases, based on your provider, the customername might not be populated. Make changes to the bot as per this need.

The bot variables can be customized in Global Functions.

KBIntegration interaction customization

If you change the name of the KnowledgeAI integration, customize the KBIntegration interaction accordingly. Do likewise for the post-process code that’s also in the interaction.

Global Functions customization

Select Global Functions from the menu to access all the global functions and variables to be configured. Modify the functions to keep only what you require.

A section of the global functions in the bot

Pay attention to the "escape" function and do not delete this from the Global Functions.

The definition of the escape function

Transfer to Priority Queue interaction

Modify the URI appropriately so that the transfer of the call to an agent can be done. Alternatively, if you do not have a case to transfer to an agent, remove this or review the Connect-to-Messaging (C2M) documentation on how to transfer to a messaging agent using a C2M integration.


This is the integration that is used to connect to the knowledge base. Modify this to select the appropriate knowledge base.

The default configuration of the knowledgeai integration

Learn more