Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

how can I use if condition with this problem

(0) ShareShare
ReportReport
Posted on by 23

I would like to know how to implement an IF condition in one of my custom topics. This condition should first check a document, knowledge base, or webpage (let's call it 'A') for an answer. If the answer is not found there, it should then check another source (let's call it 'B'). If the answer is still not found after checking both sources, it should prompt the user with a message: 'I was unable to find an answer to your query in my designated resources. Would you like to rephrase your question? If you prefer not to, I can initiate a special process where you can specify the topics of your question. I will then open a case on your behalf and forward your query to the appropriate personnel, who will respond to you promptly.'

Any help would be greatly appreciated. 

Categories:
  • Verified answer
    ManikandanS Profile Picture
    246 on at
    Re: how can I use if condition with this problem

    @RuddySimon188 , The variable GenAIResponse2 is declared and defined in create generative answer node.

    ManikandanS_0-1707889798790.png

     

  • RuddySimon188 Profile Picture
    23 on at
    Re: how can I use if condition with this problem

    Is 'GenAIResponse2' a new variable in the condition on the right side, or has it been used elsewhere?

  • RuddySimon188 Profile Picture
    23 on at
    Re: how can I use if condition with this problem

    Yes I use conversational boosting but I created a custom topic because we need to use some phrases to trigger the topic. So I want to implement the condition in my custom topic. 

  • ManikandanS Profile Picture
    246 on at
    Re: how can I use if condition with this problem

    @RuddySimon188  , I have tried the same and the topic looks like below. Please try at your end and see it works.

     

    ManikandanS_0-1707291665006.png

     

  • adilei Profile Picture
    on at
    Re: how can I use if condition with this problem

    Use Generative Answers. If an answer is not found, the response from the Gen Answers node will be empty. For example, see how "no response" is handled in the conversational boosting topic:

     

    adilei_0-1707288159663.png

     

  • ManikandanS Profile Picture
    246 on at
    Re: how can I use if condition with this problem

    @RuddySimon188 - Are you using boost conversation Gen AI feature in your bot?

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... 74

#2
Pablo Roldan Profile Picture

Pablo Roldan 61

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard