Skip to main content

Notifications

Copilot Studio - Bot Extensibility
Answered

Pass variable from Bot Framework back to PVA

(0) ShareShare
ReportReport
Posted on by

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?

Categories:
  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Pass variable from Bot Framework back to PVA

    Hi @hiccup,

     

    In this post I show how to set new variables and update them using Bot Framework Composer. 
    Solved: Re: Set and update global variables using Bot Fram... - Power Platform Community (microsoft.com)

     

    Basically, setting new variables requires creating a new output for your Bot Framework Dialog dialog (by default dialog.result.yourVariable) and assigning a value to it using Set a property.

    Accessing and updating (bot-scoped) variables from PVA is achievable by also using Set a property and referencing it with virtualagent.myOtherVariable

  • kacham Profile Picture
    kacham on at
    Re: Pass variable from Bot Framework back to PVA

    Hi , 

     

    My requirement was to use Adaptive cards in the PVA flow and ability to capture & transfter the Adaptive card inputs to PVA flow . The latest release of PVA allows us to configure Adaptive cards within the online editor without using Bot Framework composer , you can try this option if your requirement is same.

     

    Else , output variables can be configured in the Bot composer - please check this link  Solved: Re: Pass variable from Bot Framework back to PVA - Power Platform Community (microsoft.com) .

    This option works well if we have single output variable. I havent tried passing multiple output variables.

  • hiccup Profile Picture
    hiccup 153 on at
    Re: Pass variable from Bot Framework back to PVA

    Hi there

    Did you ever solve this? I'm having the same issue.

    I want to pass an input variable in and use it within my bot but I don't know how to access it from bot framework composer 😞 

     

    Thanks!

  • AnkurBhayana Profile Picture
    AnkurBhayana 4 on at
    Re: Pass variable from Bot Framework back to PVA

    How can we access the Input variables in Dialog Interface. I am unable to access this via dialg.input.variable

  • kacham Profile Picture
    kacham on at
    Re: Pass variable from Bot Framework back to PVA

    Hi Gary , I have a trouble getting the dialog.result variables back into PVA Bot while using the Adaptive Card with submit Action. 
    - I have Adaptive card in a child dialog and ensured to add the output variables in the Dialog

    - I have updated the Dialog.result.variable to  value from the current turn 

    - After  publishing in bot framework composer , I can see the variables in PVA Topic

    - But, When I try to use the output variable in a next step and Save - the Save Fails showing that the Bot contains Unknown variable and the output variable of child dialog disappears

    kacham_0-1652174570995.png

    kacham_1-1652174826909.png

    kacham_2-1652174926530.png

    Can you please help to understand the issue here , and suggest anything that Im missing here

     

  • nickprado Profile Picture
    nickprado 14 on at
    Re: Pass variable from Bot Framework back to PVA

    Gary, do you know of a place that shows this in practice with an Adaptive Card with a Submit button? I am having trouble with getting the value from the Adaptive Card out.

  • nickprado Profile Picture
    nickprado 14 on at
    Re: Pass variable from Bot Framework back to PVA

    In addition to AzzaB's response, if you added the redirect and then changed the topic, remove it and re-add and it should show the outputs.

  • AzzaB Profile Picture
    AzzaB on at
    Re: Pass variable from Bot Framework back to PVA

    For me the key point was as Gary said, defining the input / output in the dialog interface.  E.g. 

    bot1.png

     

    Then when I did the redirect it shows those 2 outputs and I can use them in the flow

    AzzaB_1-1646403244489.png

    hope that helps!

  • Monkeyman Profile Picture
    Monkeyman 325 on at
    Re: Pass variable from Bot Framework back to PVA

    Hi,

     

    I am trying to achieve this same functionality, but I do not get the variable ouputs showing on the topic redirect in PVA.  Any ideas?

  • AzzaB Profile Picture
    AzzaB on at
    Re: Pass variable from Bot Framework back to PVA

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics