Skip to main content

Notifications

Copilot Studio - General
Answered

How to pass context variables to agent as a Message.

Posted on by 69

Since the new update on pva bots. I cant transfer Context variable from chat to agent like i used to do it in PVA classic.  Is there a way to send context variable as a message when transfering the chat to agent. 

furqanmajeed_0-1691165562656.png

 

  • furqanmajeed Profile Picture
    furqanmajeed 69 on at
    Re: How to pass context variables to agent as a Message.

    @sboulanger Nevermind , it worked. thank you so much 

  • furqanmajeed Profile Picture
    furqanmajeed 69 on at
    Re: How to pass context variables to agent as a Message.

    @sboulanger 

    I am a bit confused, Since I am new to this. Can you mention via screenshot or instructions that how did you resolve that issue. 

    Thank you

  • Verified answer
    sboulanger Profile Picture
    sboulanger on at
    Re: How to pass context variables to agent as a Message.

    Should have mentioned I did it using the code editor not in the visual interface. To be fair I didn't think it was important, but I assume it is. 

  • furqanmajeed Profile Picture
    furqanmajeed 69 on at
    Re: How to pass context variables to agent as a Message.

    @sboulanger I tried the same but I am getting this as an internal message. Can you share what are you getting as an internal message also is there anything I am doing wrong?

    furqanmajeed_0-1702333008494.pngfurqanmajeed_1-1702333033674.png

     

  • sboulanger Profile Picture
    sboulanger on at
    Re: How to pass context variables to agent as a Message.

    I just tried by adding the variable directly into the "Message to agent" text box without going through the "Insert variable" functionality, and it seems to work. In that case, I wanted to pass a case number being created by a power automate :

     

    sboulanger_0-1702068150288.png

     

  • sboulanger Profile Picture
    sboulanger on at
    Re: How to pass context variables to agent as a Message.

    I just tried by adding the variable directly into the "Message to agent" text box without going through the "Insert variable" functionality, and it seems to work. In that case, I wanted to pass a case number being created by a power automate.

  • furqanmajeed Profile Picture
    furqanmajeed 69 on at
    Re: How to pass context variables to agent as a Message.

    I tried that as well. I want transfer the variables like this: it shows the message to the agent which helps alot. 

    furqanmajeed_0-1691167895012.png

     

  • MattJimison Profile Picture
    MattJimison 488 on at
    Re: How to pass context variables to agent as a Message.

    Hi, @furqanmajeed .

     

    If you click on the "..." in the top-right corner of the transfer node you'll find the property settings for what you pass along.

     

    You can also change from "Automatically include variables" to "Formula" as well.

    MattJimison_0-1691167590243.png

     


    Find this post helpful? Please mark it as the solution and/or provide kudos so that it will help others in the future.

    Cheers,
    Matt

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

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

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,995

#3
Expiscornovus Profile Picture

Expiscornovus 1,708

Leaderboard