Microsoft Power Virtual Agents

The Microsoft PVA platform lets you build a bot without code.

For an introduction to PVA, including basic concepts which will provide you with a better understanding of how to integrate VoiceAI Connect with a PVA bot, go to Microsoft's PVA documentation.

The new PVA doesn't rely on Bot Framework Composer because all required functionality is built in.
VoiceAI Connect Enterprise supports the latest Microsoft PVA from Version 3.14 and later.
VoiceAI Connect still supports the previous (legacy) PVA version, as described in Microsoft Power Virtual Agents (Legacy).

Key concepts

Currently, Microsoft PVA supports only the start conversation event. For more information, see Saving channel data.

Sending messages

When sending messages from a PVA bot to VoiceAI Connect, you can add session params or activity params to the message. For more information, see Changing call settings.

To add one of them to the message, paste the JSON content in the Channel data section of the message:

When asking a question, you can add channel data using the code editor:

  1. After setting the question text and parameters, open the code editor, by clicking the ellipsis button in the top-right corner, and then choosing Open code editor:

  1. The code editor displays the entire topic as a YAML file:

  1. Change the prompt to contain text and channelData:

  1. Add the desired activity parameters to the question:

Sending event to VoiceAI Connect

To send an event without a message to the user:

  1. Use the PVA Send an event option:

  1. In the 'Name' field, enter the desired event name ("config" in the example) and in the 'Value' field, enter the desired JSON:

Receiving events from VoiceAI Connect

To catch events from VoiceAI Connect, use the event received as a trigger topic.

The event name property acts as the condition for checking the Activity.name (see Saving channel data).

Saving channel data

Call details are sent in the 'channel' event at the start of the conversation (see details in Call initiation).

To get call details, start a new topic, and then change the default trigger to Event received:

The event name property acts as the condition for checking Activity.name (in this case, it's equal to channel):

To save a value, use the Parse value option:

In the 'Parse value' field, use the formula with System.Activity.ChannelData:

To save the entire response, from the 'Data type' drop-down list, select From sample data, and then paste the channelData JSON from Call initiation:

Save it as a new parameter (select the Global option to use the variable across topics):

Connecting bot to VoiceAI Connect

Connecting to VoiceAI Connect via Direct Line speech channel

The Direct Line speech access token is located under Settings > Channels:

Select the direct line speech, and then click Copy to copy the value of the 'Token Endpoint' field:

Paste the token endpoint in the credentials section in the bot provider settings, under pvaTokenURL.

Connecting to VoiceAI Connect via token

When enabling web channel security, a secret and EnvironmentId is required to connect to the bot.

To obtain the bot secret, in the navigation pane, go to Settings > Security > Web channel security:

To obtain the Environment-Id, in the navigation pane, go to Settings -> Bot details, click the Advanced tab, and then copy the bot value of the 'Environment ID' field:

Configuration

You need to add the Environment ID in the bot provider under environment. The secret key is configured on VoiceAI Connect using the botSecret parameter in the credentials of the bot configuration.