cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AzzaB
Regular Visitor

Pass variable from Bot Framework back to PVA

Hello, I've been looking at creating an adaptive card submit form to retrieve info from users in PVA.  The form itself works great except I'm unsure now how I can then use the submitted data. 

 

Once a user submits a form how can I can use that data for example add it to a SharePoint list etc?

1 ACCEPTED SOLUTION

Accepted Solutions
GaryPrettyMsft
Microsoft
Microsoft

Hi @AzzaB.

It is possible today to return variables from a Composer dialog, which you can then use within PVA, to do things like call a Flow, for example.

 

To do this, you need to set the input / output properties on your Composer dialog. In the screenshot below, I have added two output properties (Variable1 and Variable2, both strings).

 

dialog-interface.png

 

Once you have configured your output variables, you can assign values to them within Composer. They sit within the dialog result, so to assign a value to Variable1, you would set your value into dialog.result.Variable1 (an example of this is shown below).

 

set-property.png

 

Finally, once you publish your Composer dialog back to PVA and add a redirect to it to your canvas, you will see the output variables are now shown and are available to use within PVA.

 

composer-dialog.png

 

Right now, you are limited to multiple primitive properties, as opposed to returning objects, which means you might need to do some variable manipulation within Composer.

 

Does this help with what you are looking to achieve?

View solution in original post

2 REPLIES 2
GaryPrettyMsft
Microsoft
Microsoft

Hi @AzzaB.

It is possible today to return variables from a Composer dialog, which you can then use within PVA, to do things like call a Flow, for example.

 

To do this, you need to set the input / output properties on your Composer dialog. In the screenshot below, I have added two output properties (Variable1 and Variable2, both strings).

 

dialog-interface.png

 

Once you have configured your output variables, you can assign values to them within Composer. They sit within the dialog result, so to assign a value to Variable1, you would set your value into dialog.result.Variable1 (an example of this is shown below).

 

set-property.png

 

Finally, once you publish your Composer dialog back to PVA and add a redirect to it to your canvas, you will see the output variables are now shown and are available to use within PVA.

 

composer-dialog.png

 

Right now, you are limited to multiple primitive properties, as opposed to returning objects, which means you might need to do some variable manipulation within Composer.

 

Does this help with what you are looking to achieve?

View solution in original post

Hi @GaryPrettyMsft ,

 

I think that is exactly what I'm looking for!  I'm not particularly experienced so I'll have a play around with it, but as you have described sounds perfect.  Thank you very much!

 

Cheers,

Azza.

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Planning-build-bot-2-5-20-768x460.png

New Year’s Resolution - Build Conversational Bots!

Access all of the Power Virtual Agents learning resources and join the January learning challenge.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (1,428)