Skip to main content

Notifications

Copilot Studio - General
Answered

how to get user value back to PVA from Bot Framework Composer?

Posted on by 28

Hi All,

 

how to get user value back to PVA from Bot Framework composer? I am creating PVA bot and i am also using Bot framework Composer to create adaptive card to show to my PVA chatbot. i also have to do some operation with power flow but i am not able to get the user value to PVA chat about.

 

Need help on this.

Categories:
  • nk1ng Profile Picture
    nk1ng 71 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    Welp, I finally got it.

    Flow (and set for the 'return' to be global in PVA):

    nk1ng_3-1627562804816.png

     


    Composer (Create Tab; I used json func here for the string return from PVA to go back to an array in composer):

    nk1ng_4-1627563094893.png

     

    Composer (Bot responses tab):

    nk1ng_1-1627562536034.png

    and

    nk1ng_2-1627562595348.png

     

    The only caveat now is the image for the user, which will work in the test bot however when you publish it to teams won't show the image.  Still working on that...

  • nk1ng Profile Picture
    nk1ng 71 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    I got that however I need a json or array to run foreach in the composer as I want to get multiple entries from the Search_for_users_(v2) flow..

  • anuj89822 Profile Picture
    anuj89822 28 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    @nk1ng do let me know, if i understand you issue correctly.

    Hi,  I am passing two global variable value from PVA to bot framework composer. created global variable in PVA and using same variable name in framework composer. below screenshot for your reference. 

    anuj89822_0-1626938150564.png

     

  • nk1ng Profile Picture
    nk1ng 71 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    Sure, basically, I am trying to make a topic that will allow you to enter a name and you will get adaptive card carousel for the search term - basically, global address book. 

     

    I am having issues trying to load the return from "Search for user (V2)" to the composer.  I was not able to pass an array back from the flow so with concat I just appended everything to a string but now it's a string, need to be an array or json or something to parse it into the adaptive cards in the composer.  That made sense?  

     

    Here is what I am trying but how to you get the json into the composer?

    nk1ng_0-1626797350419.png

     

    Everything worked when I statically hardcode into the composer but I want the flow from the search_for_users_(v2) instead... 

     

  • anuj89822 Profile Picture
    anuj89822 28 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    @nk1ng if you can explain more. I can try to explore.

  • nk1ng Profile Picture
    nk1ng 71 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    How to you get an array to it?  I am struggling with o365, search for profiles v2...   

  • Verified answer
    anuj89822 Profile Picture
    anuj89822 28 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    Hi, i got the answer for this. 

    • you need to create global variable in you pva. that can be created in any topic and select as external source can access too

    anuj89822_0-1626501569115.png

    • in bot framework console you need, you need to set properties and provide variable name as virtualagent.same name given in PVA and provide the value which you want to pass. and that will work.
  • anuj89822 Profile Picture
    anuj89822 28 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    Hi, 

     

    I am trying to get the value from Bot frame work composer to PVA. 

     

    Regards,

    Anuj

  • Expiscornovus Profile Picture
    Expiscornovus 29,370 on at
    Re: how to get user value back to PVA from Bot Framework Composer?

    Hi @anuj89822,

     

    Can you maybe share a couple of screenshots to show what value you want to get back. Is it something from the flow? Or do you just mean the details of the user interacting with the bot?

     

    If it is the latter you should be able to use the bot.UserId & bot.UserDisplayName. After you have enabled authentication on your bot in the settings.

     

    botusernameanduserid.png

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,287

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,172

Leaderboard