Commands

For different deployments to interact with VoiceGateway bot designers can define commands that can interact with intermediate software and voice gateways

Usage

Command section is available for every block and uses the key-value paradigm.

Command params can be of different simple types eg. "lorem ipsum", 1, true, false, ["item1", "item2"] or complex JSON values. In most cases command affect only single step where they are defined.

Compatibility

Due to the fact that on different deployments that use different channels, voice gateways as well as different providers of ASR and TTS software

System (Gateway API)

System commands are returned by Disconnect and Redirect blocks. If you are building you own client application please remember to implement them.

Command nameDescriptionPossible values
RedirectSpecifies the number to which the call will be redirected or other ID which defines the agent or agent group. This command is send when Redirect block is used, and value is defined inside Redirect block settings."agent", "101", "48603123456789"
DisconnectThis command is send when End Conversation block is used. This command does not send any value.N/A

SentiOne Webchat

Command nameDescriptionPossible values
BlockingOperation

Indicate that in the next turn there will be a long running intergration call and user needs to be informed that their request is being processed.

Description of this functionality in webchat is available here

true
Carousel

Carousel is an interactive element of the webchat interface that allows presentation of content in the form of a horizontal slider with multiple slides. Each slide can contain a title, text, graphics, and action buttons. Users can navigate between slides using buttons or touch gestures (swipe).

Currently, this command is supported only on webchat channel

Please follow the documentation for more details.

Object
EmbedWebsite

The EmbedWebsite command enables the display of an external webpage in an iframe within the web chat interface. This feature is useful for showcasing additional content or integrations directly in the chat.

Currently, this command is supported only on webchat channel

Please follow the documentation for more details.

Object
SetAuthor

Sets the user's name to the given value.

Currently, this command is supported only on webchat channel.

String
SetVerifiedAuthor

Sets the user's name to the given value and marks it as verified.

Currently, this command is supported only on webchat channel.

String
SecretUserInput

Allows displaying a field for entering confidential information (e.g., password) in the webchat interface.

Any value entered by the user in this field will be hidden in logs and analytics for the next message.

Object:

{ placeholder: string, enabled?: boolean }placeholder – text shown in the input field.

enabled – if false, the field will be a regular text input (no secret message logic). If true or not provided, the field will be of type "password" and secret message logic will be enabled.

OR

Boolean value true or false
true – input field of type "password".
false – input field of type "text".

SetExternalSessionAttributes

Allows passing additional information about session (e.g. user details) to an external system.

Currently, this command is supported only on webchat channel with Genesys agent handover.

Object:
{
"key1": "value1",
"key2": "value2"
}
All values have to be strings.

SentiOne VoiceGateway

Such configuration in defined on default SaaS environment available at https://app.chatbots.sentione.com/

Command nameDescriptionPossible values
recognizeModelModel to be used by Techmo ASR in given block to detect specific user input. Usage of this command is recommended for cases where you want to minimize ASR error rate and you ask end user for specific information like surname, location, numbers etc."spelling", "name", "address"
AllowUsersToInterruptBotSpeaking

Enable/disable ASR listening to user utterances while bot is speaking. This allows users to interrupt bot when it is speaking and move to the next block.

This feature is also called TTS barge-in

true, false
AddSIPHeaderAppend custom content to SIP headers. Use JSON array of objects syntax to define header names and values.

[{
“headerName”: “X-GEN-SIPREC”
“value”: “true”
}]

[{
“headerName”: “X-GEN-SIPREC”
“value”: “example”
}]

[{
“headerName”: “X-GEN-SIPREC”
“value”: “1234”
}]

BlockingOperation

Indicate that in the next block there will be a long running intergration call and user needs to be informed that their request is being processed

Description of this functionality is available here

{
“repeatMessage”: {“message”: “We are processing you request, please wait”, “sleepMillis”: 5000 }
}
TTSSynthesisTimeoutSpecifies the maximum duration of current text-to-speech synthesistime value [ms]
speechCompleteTimeoutSpecifies silence duration after user stops talking to determine the end of the user utterance. This timer only applies if the user has said anything so the transcription is empty. This command is supported only by Techmo and Voicelab ASRstime value [ms]
ASRSilenceTimeoutSpecifies silence duration after which the end of the user utterance will be determined. This timer only applies if the user hasn't said anything so the transcription is empty.time value [ms]
ASRTotalSpeechLengthSpecifies maximum duration of speechtime value [ms]
RedirectSpecifies the number to which the call will be redirectedString value
DisconnectEnds the phone call
DTMFExpectedDigitsCountNumber of digits VG expects for the user to give before sending it to the botInteger
DTMFNextDigitTimeoutDefines the duration the system waits for the next digit from DTMF (phone keypad)time value [ms]
MinimumUserUtteranceLengthToInterruptBotSpeakingDefines how long the user utterance should be to interrupt the bot. The length of the utterance is measured by the number of characters in the transcription. This feature may be useful if we do not want short "yhm", "aha", swear words or other noises to interrupt the bot. Only longer sentences said by the end user will actually stop TTS synthesis and the bot will respond to them.Integer [characters]
DelayTimeAfterWhichUserIsAllowedToInterruptBotSpeakingSpecifies how long the system should wait to allow users to interrupt TTS synthesis. For example, you want to allow users to interrupt after they hear the first 3 seconds of the bot response.time value [ms]
VoicemailDetectedIt may happen that in outbound call an automate voicemail will answer the phone. In such case bot will receive any voicemail message. If you detect such voicemail with NLU or LLM you can mark this call as voicemail and dialer will mark it as unsuccessful call and will try to call again.Any
SetASRParamsReconnect to ASR for the next bot turn with custom options. After the following bot turn connection to ASR is set to default, unless new SetASRParams is sent.JSON Object (you may copy whole JSON from channels connector form in RAW mode or parts of it)
SetAlternativeASRSwitches the default ASR to the chosen alternative ASR defined in the Voice channel for the next turn. After the following bot turn, the default ASR will be restored.String value containing the identifier of the alternative ASR
ASRNonFinalTimeoutSome ASR providers may not properly detect that the transcription is final and therefore freeze. To handle this problem you may set this command to set custom timeout after which partial transcript will be returned as finaltime value [ms]

AlfaCC

Command nameDescriptionPossible values
recognizeModelModel to be used by Techmo ASR in given block to detect specific user input. Usage of this command is recommended for cases where you want to minimize ASR error rate and you ask end user for specific information like surname, location, numbers etc."spelling", "name", "address"
silentTimeoutMaximum number of seconds to wait for user utterance.0..999
recognizeTimeoutNumber of seconds of silence after user finishes speaking to consider it as finished utterance.0..999
PauseRecordingControl recording of audio and use header X-Auth-Mode that disables logging and storing of user utterance.false_before - resume recording before playing the TTS message, the next bot call will be without the X-Auth-Mode parameter
false_after - resume recording after playing the TTS message, the next bot call will be without the X-Auth-Mode parameter
true_before - stop recording before playing the TTS message, subsequent calls to the bot will be with the "X-Auth-Mode" parameter: "true" until the false_before / false_after command arrives
true_after - stop recording after playing the TTS message, subsequent calls to the bot will be with the "X-Auth-Mode" parameter: "true" until the false_before / false_after command arrives

LiveChat

Command nameDescriptionPossible values
SetLiveChatCustomVariablesUsed to set session fields on LiveChat customer.
https://platform.text.com/docs/messaging/customer-chat-api#update-customer.
Set session fields are accessible in flow via extra data, specifically external.livechat.customVariables
JSON object with key-value pairs,
where value is either string or number
{"name": "tester", "id": 10}

Did this page help you?