Skip to main content

Notifications

Copilot Studio - General
Answered

How to get Current website from PVA bot.

Posted on by 71

Hey, I have a PVA bot on 4 websites, When the chat is escalated from bot to an agent i want to show website as well. Like this chat is coming from website1 . etc.

 

How can I get the current URL where chat is shown? 

Categories:
  • Verified answer
    nikviz Profile Picture
    nikviz 242 on at
    Re: How to get Current website from PVA bot.

    @furqanmajeed 
    These are the two ways in which I am using it

    1) Using Botframework composer:

    You can use the turn.activity 

    nikviz_0-1677689541717.png

    Sample response in bot would be like this:

    nikviz_1-1677689652942.png


    This will give the serviceURL as directline or slack or telegram etc.
    This will not give the web url. To capture the web URL follow the below steps.

     

    2) To capture the webURL
    a) In the webpage where you are calling the bot add the below section highlighted

    nikviz_2-1677689987349.png

     

    b) Use a question to call the variable page as external source in PVA topic

    nikviz_3-1677690099894.png

     

    c) Call this variable somewhere in your main flow

    nikviz_4-1677690242129.png

    sample output if you include it in message

    nikviz_5-1677690399387.png

     

     

  • nikviz Profile Picture
    nikviz 242 on at
    Re: How to get Current website from PVA bot.

    Just to add, If you are using a preview version then you do not have to use botframework composer. You can follow the steps here:


    https://learn.microsoft.com/en-us/power-virtual-agents/preview/authoring-variables

    You can use Activity.Channel

     

    However, Preview features aren't meant for production.

  • nikviz Profile Picture
    nikviz 242 on at
    Re: How to get Current website from PVA bot.

    I followed this blog to do it

    https://techdocs.audiocodes.com/voice-ai-connect/Content/VAIG_Combined/microsoft_pva.htm

    Scroll down to section "Saving Channel Data"

  • furqanmajeed Profile Picture
    furqanmajeed 71 on at
    Re: How to get Current website from PVA bot.

    Do you have any example for that. 

  • nikviz Profile Picture
    nikviz 242 on at
    Re: How to get Current website from PVA bot.

    You can use Bot Framework Composer to extend your bot and set the variable turn.Activity.channeldata 

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,006

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard