Bots

Bots

On this page

 

 

Overview

In the Bots section, you can find the blocks useful to configure a voicebot in your call flow: ChatGpt, Dialogflow, Lex and DeepSeepk.

These blocks allow you to automate customer interactions, providing intelligent responses and routing within your IVR application.

Important

Please note that Bots providers are third-party applications. Their functionalities, costs, and behaviors depend on the specific provider you choose.

AI Conversations Billing

Remember that XCALLY applies a cost per each AI Conversation managed by bots. Please refer to this page (Advanced wiki - Jira credentials needed).

Tip

Click here to learn more about voicebot triggers.

Video tutorial

 

OpenAI ChatGPT

FROM VERSION 3.36.0

image-20240611-070701.png
image-20241029-082014.png

Requirements:

  • Set up an OpenAI Cloud Provider with a valid API key

  • Configure an OpenAI bot under Tools → OpenAI Bots

The OpenAI ChatGPT block allows Voicebot creation via ChatGPT, by configuring an OpenAI account under the XCALLY Cloud Providers section and an OpenAI bot.

Fields

  • Label: enter a short description for the block

  • Choose an OpenAI bot: select one of the created bots from the list

  • Text: enter the text you would like to send (e.g. the variable {GOOGLE_ASR_TRANSCRIPT} or {OPENAI_WHISPER_TRANSCRIPT})

  • Sound to play while waiting (available from version 3.40.0): select a playback sound, previously uploaded in Tools/Sound section, executed for the customer while waiting for a response from OpenAI, improving the user experience and avoiding audio gaps. For example: “We are analyzing your request, we will get back to you shortly”.

The Sound option is optional. By default, it is set to “No option chosen”.

If a sound is selected, it will be played immediately after the HTTP request is sent, while the server waits for the OpenAI response. The playback will continue until the end of the audio file and will not be interrupted, even if the OpenAI response becomes available before the audio finishes.

Exit Arrows

This block provides just one arrow out to the next step

In the Cally Square environment, users can design a project flow that leverages AI-driven interactions using specific blocks.

For example:

  • ASR block to capture and transcribe the customer’s speech

  • ChatGPT block to generate an intelligent response, and

  • TTS block to convert the response into audio and play it back to the customer.


Before starting with the IVR project creation of our example:

  1. Set up a AWS Cloud Provider with a valid API key

  2. Set up an OpenAI Cloud Provider with a valid API key

  3. Configure a ChatGPT bot under Tools

  4. Create these variables under Tools:

  • OPENAI_WHISPER_TRANSCRIPT to send to OpenAI the text of the user request

  • OPENAI_CHATGPT_RESULT to get the response from OpenAI, that will be managed by TTS block


Now, let’s design the IVR project for a voicebot based on AWS Polly, OpenAI Whisper, and ChatGPT

image-20250416-101619.png
  1. Start block

  2. AWS Polly (TTS Block)

  • Enter your Access Key ID and Secret Access Key.

  • Define the welcome message and select the voiceover to be used.

  1. OpenAI Whisper (ASR Block)

  • Configure the block to transcribe the caller’s voice input into text.

  1. OpenAI ChatGPT (NLP Block)

  • Select your OpenAI Bot previously configured in the Tools section.

  • In the Text field, set the variable {OPENAI_WHISPER_TRANSCRIPT} so the bot can process the transcribed input.

  1. GoToIf (Decision Block)

  • Define the condition {OPENAI_CHATGPT_EXIT} == 'true'

    • If the condition is true, the system ends the conversation with the bot and forwards the call to the queue.

    • If the condition is false, the flow continues with the next TTS step.

  1. AWS Polly (TTS Block for Bot Response)

  • Set the variable {OPENAI_CHATGPT_RESULT} as the text to be played back to the caller.

  • The system stores the generated text response in the database table square_messages.

Dialogflow V2

image-20240611-093622.png

The Dialogflow V2 block allows you to build a voicebot using the Google Dialogflow integration.

Fields

  • Label: enter a short description for the block

  • Project ID: Cloud Platform project ID

  • Client Email: email address associated to Service Account Key

  • Private Key: private key associated to Service Account Key

  • Language: the language you want use for the bot

  • Text: the text you want to send

Please note Dialogflow requires a valid Service Account Key and a sufficient amount of acquired credits. Explore this documentation to find out How to retrieve Google Key for Cally Square blocks

Exit Arrows

This block provides just one arrow out to the next step

 

Below an example of voicebot IVR project using the Dialogflow block:

image-20250303-170928.png
  1. Call Arrival

    • The customer calls in and the IVR is triggered (Start block).

  2. Welcome Message

    • A Playback block plays a greeting, e.g., “Welcome, how can I help you?”

  3. Customer Input and Speech-to-Text Conversion

    • The customer speaks a request, such as:

      • “I would like to know the clinic's opening hours”

      • “I would like to speak with an operator”

      • “I would like to know the date of my reservation that I cannot remember”

    • AWS ASR block converts the customer’s voice into text.

  4. Intent Recognition

    • The transcribed text is sent to DialogflowV2, which identifies the customer’s intent.

  5. Switch / Routing Logic

    • The system evaluates the intent:

      • Clinic Hours: Playback block announces the opening hours.

      • Speak to Operator: Playback says “Please hold, we are transferring your call”, then the call is routed to a queue.

      • Reservation Date: Playback says “Please hold for a moment, I am searching for the requested information”. The system retrieves the data from the database and AWS Polly plays the response, e.g., “The date of your reservation is Saturday, March 9 at 11 a.m.”

  6. End of Call

    • The interaction concludes with a Hangup block.

 

 

Amazon Lex

image-20240612-110323.png

For additional information see Getting Started with Amazon Lex

 

The Amazon Lex block allows you to build a voice bot using the Amazon Lex integration.

Fields

  • Label: enter a short description for the block

  • Access Key ID and Secret Access Key: AWS security credentials (see here)

  • Region: AWS available regional endpoint

  • Bot name: the name of the bot.

  • Text: the text you want to send.

Exit Arrows

This block provides just one arrow out to the next step

The Amazon Lex block saves the results in the following variables:

  • AWS_LEX_INTENTNAME: The current user intent that Amazon Lex is aware of. (Read more)

  • AWS_LEX_MESSAGE: The message to convey to the user. 

  • AWS_LEX_MESSAGEFORMAT: The format of the response message. (Read more)

  • AWS_LEX_DIALOGSTATE: Identifies the current state of the user interaction. (Read more)

  • AWS_LEX_SLOTTOELICIT: If the AWS_LEX_DIALOGSTATE value is ElicitSlot, returns the name of the slot for which Amazon Lex is eliciting a value.

  • AWS_LEX_SLOT_*: The intent slots that Amazon Lex detected from the user input in the conversation. (ex. AWS_LEX_SLOT_PICKUPCITY)

DeepSeek

FROM VERSION 3.51.0

DeepSeek_logo_128x128.png
image-20250512-135206.png

Requirements:

  • Set up an DeepSeek Cloud Provider with a valid API key

  • Configure a DeepSeek bot under Tools → OpenAI Bots

The Deepseek block allows Deepseek Chat integration, to use the bots configured with your DeepSeek account.

Fields

  • Label: enter a short description for the block

  • Choose a DeepSeek bot: select one of the created bots from the list

  • Text: you would like to send (e.g. the variable {GOOGLE_ASR_TRANSCRIPT} or {OPENAI_WHISPER_TRANSCRIPT})

  • Sound to play while waiting: select a playback sound, previously uploaded in Tools/Sound section, executed for the customer while waiting for a response from DeepSeek, such as, “We are analyzing your request, we will get back to you shortly” , thus improving the user experience and avoiding audio gaps.

The Sound option is optional. By default, it is set to “No option chosen”.

If a sound is selected, it will be played immediately after the HTTP request is sent, while the server waits for the OpenAI response. The playback will continue until the end of the audio file and will not be interrupted, even if the OpenAI response becomes available before the audio finishes.

The block populates the variables:

  • DEEPSEEK_CHAT_EXIT, if true the chat has to exit

  • DEEPSEEK_CHAT_RESULT with the text generated by the bot.

Before starting with the IVR project creation of our example:

  1. Set up a Google Cloud Provider

  2. Set up a Deepseek Cloud Provider

  3. Configure a Deepseek bot under Tools

  4. Create these variables under Tools:

  • GOOGLE_ASR_TRANSCRIPT to send to Deepseek the text of the user request

  • DEEPSEEK_CHAT_RESULT to get the response from Deepseek, that will be managed by TTS block

  • DEEPSEEK_CHAT_EXIT to be used in a GotoIf block to define when the bot ends its application (if the variable is true the chat has to exit)


Now, let’s design the IVR project for a voicebot based on Deepseek, Google TTS and ASR

image-20250430-072436.png
  1. Start block

  2. Google Cloud TTS block

  • Define the welcome message

  1. Google ASR block

  • Configure the block to transcribe the caller’s voice input into text.

  1. Deepseek Chat (NLP Block)

  • Select your Deepseek bot previously configured in the Tools section.

  • In the Text field, set the variable {GOOGLE_ASR_TRANSCRIPT} so the bot can process the transcribed input.

  1. GoToIf (Decision Block)

  • Define the condition {DEEPSEEK_CHAT_EXIT} == 'true'

    • If the condition is true, the system ends the conversation with the bot and forwards the call to the the ending message (another TTS block in this example).

    • If the condition is false, the flow continues with the next TTS → ASR → Deepseek blocks.

image-20250430-072357.png
  1. Google Cloud TTS (TTS Block for Bot Response)

  • Set the variable {DEEPSEEK_CHAT_RESULT} as the text to be played back to the caller.

  • The system stores the generated text response in the database table square_messages.

image-20250430-072306.png

 

 

Related topics