Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Unanswered

bring the one topic variables to another topic

(0) ShareShare
ReportReport
Posted on by 24

Hi Everyone.

 

Is it possible to bring the one topic variables into another topic so that we can use that in condition.

 

Thank you in Advance.

Categories:
  • NadeemAhamed Profile Picture
    24 on at
    Re: bring the one topic variables to another topic

    @nesrivastava,

    I have tried above option but i am not able to find the topic names in "End of Conversation" while assiging values.

    I have enabled the @MattJimison  options to bring the topic's to value for global variable.

    NadeemAhamed_2-1697180899370.png   

    NadeemAhamed_3-1697180910342.png 

    NadeemAhamed_4-1697180913635.png

     

     

     

     

     

  • MattJimison Profile Picture
    577 Most Valuable Professional on at
    Re: bring the one topic variables to another topic

    Hi, @NadeemAhamed .

     

    If you want to input and/our output variables from one topic to another, without using global variables as @nesrivastava  mentioned, you simply click on the "{x}" menu option in a topic and you can then set variables to be incoming and/or outgoing. If a topic has an incoming variable, when you redirect to it, the UI will change to allow you to pass in the value (per screenshot shown). Likewise, if a topic has an outgoing variable, you can capture it after the redirect node (per screenshot shown).

     

    This makes it really easy to add a variable to your 'End Conversation' topic called "ReferringTopic", setting it as incoming, and then from each topic you redirect to 'End Conversation' you can pass a static or dynamic value. Both the global variable option and the input/output topic variable option will work; it comes down to preference, but having inputs/outputs is a clean way to do it without unnecessarily adding more variables to the global scope.

     

    MattJimison_0-1697155467453.png

     

    MattJimison_2-1697155585992.png

     

    MattJimison_3-1697155697718.png

     

     

    Cheers,

    Matt

     


    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

  • nesrivastava Profile Picture
    on at
    Re: bring the one topic variables to another topic

    Hi @NadeemAhamed ,

    As per your example, I created the same scenario. Here is the Final Output you will get it:

    nesrivastava_0-1697087297797.png

    Steps:

    • I chose two pre-built topics, Lesson-1 and Lesson-2, from my bot.
    • On Lesson-1, just before redirecting to the "End of Conversation," I created a global variable named "SelectTopic."
    • For the Value of this variable, I input my topic name as "Lesson 1 - A simple topic," but you should use your own topic name.

    nesrivastava_1-1697087315651.png

    • I replicated the same process on Lesson-2.

    nesrivastava_2-1697087339363.png

     

     

    • In the "End of Conversation" topic, I added a condition to control the conversation's redirection based on the topic.

    nesrivastava_3-1697087359961.png

     

    • The end result of this process will enable your chatbot to display different specific end messages to users based on the topic they interacted with.

      Let me know if you if it works for you.
      Thanks
      @HenryJammes , FYI
  • NadeemAhamed Profile Picture
    24 on at
    Re: bring the one topic variables to another topic

    Thank you for your valuable time to reply.

     

    By using the above option i can use the Topic A variable in Topic B. but iam not getting how to use "if, if else and else if condition" in PVA condition activity by using that variables.

     

    Example:- 

    I have multiple Topic's such as Topic A,B,C,D.... and at the end of the flow we are redirecting users to one common topic  "End of Conversation"

    When user is coming from different topic we should show different specific message by using variables in condition.

     

    if (variable==A)

    { message="your coming from Topic A"}

    else if (variable==B)

    { message="your coming from Topic B"}

    else if (variable==C)

    { message="your coming from Topic C"}

    else 

    {message="your coming from Topic Z"}

    ......

     

  • nesrivastava Profile Picture
    on at
    Re: bring the one topic variables to another topic

    Hi,

    If I understand you correctly, you want to access topic A variable in topic B. Instead of creating a topic level variable, create a global level variable. 
    https://learn.microsoft.com/en-us/power-virtual-agents/authoring-variables-bot?tabs=webApp 

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 76

#2
Pablo Roldan Profile Picture

Pablo Roldan 61

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard