Skip to main content

Notifications

Topic Creation & Management
Answered

How to answer (in my chatbot) to users who do not meet the prerequisite

Posted on by

hi everyone,

I have built a chatbot in PVA and a flow in Power automate in order to send the legal entity of each internal user (the data source is an excel file and does not contain the external employees). When i test my bot as external, i would like the bot to answer something like "sorry you are external so you don't have legal entity". Do i have to create a condition in PVA? thank you

  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 29,248 on at
    Re: How to answer (in my chatbot) to users who do not meet the prerequisite

    Hi @Anonymous,


    Don't know if it helps but I would implement it like below.


    Btw, I am a bit confused about the Filter Array. I would have expected you would check the input of the Power Virtual Agent in that array 😅

     

    Below would be my suggested setup:

    I used a Initialize variable action of type string and called it strResult (that is not in my screenshot). Based on the outcome of the condition you can sent back different messages to the Power Virtual agent with the same string variable.

     

    checkmailaddress.png

  • Re: How to answer (in my chatbot) to users who do not meet the prerequisite

     

    hi @Expiscornovus 

    thank you for your quick reply.

    I added a condition after the array:

     

    Peggy2019_4-1671441428293.png

    and i added this condition in the PVA bot

    Peggy2019_5-1671442219197.png

     

     

  • Expiscornovus Profile Picture
    Expiscornovus 29,248 on at
    Re: How to answer (in my chatbot) to users who do not meet the prerequisite

    Hi @Anonymous,

     

    Where in the flow are you matching the user name? Is that in the Filter Array? In that case I would place a condition after that Filter Array.

     

    You can probably also use an expression as well. Just check the output of the Filter Array for empty (again assuming that you are matching for users in that action). Try the expression below in a compose below the Filter Array action

    if(empty(body('Filter_Array')), 'No user found', body('Filter_Array'))

     

  • Re: How to answer (in my chatbot) to users who do not meet the prerequisite

    hi @Expiscornovus 

     

    This is my flow ; Fyi the internal users are in a excel file (stored in a SharePoint site). The condition would be if the user is not present in the excel file, then it is not concerned ...  the thing is that i don't know when to put this condition? thank you for your help

    Peggy2019_0-1671438865679.png

     

  • Expiscornovus Profile Picture
    Expiscornovus 29,248 on at
    Re: How to answer (in my chatbot) to users who do not meet the prerequisite

    Hi @Anonymous,

     

    You could add a condition within your flow. Can you share a screenshot of your current Power Automate flow setup?

     

    It would also be useful to see a screenshot of the outputs of the When a Power Virtual Agent calls a flow action when you test it with that external user. This way we can prepare a expression for your condition action.

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
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics