cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cyuan_W
Frequent Visitor

Condition Failed with Entity

So I customized an entity with two choices and use the condition "All other condition" as a "else" in my PVA.

However, when I type anything other than the two choices I have, it never execute the branch of  "All other condition."

Is there a reason for this??

 

Chia

2 ACCEPTED SOLUTIONS

Accepted Solutions
renatoromao
Super User
Super User

I recommend you to create all options (5, 6, ...10, or how many you want) that your user maybe will say when will talk to the bot, but display 2 or 3 options in the chat.

Create a condition for your 2 or 3 options that you display, and create "all conditions" to other options.

 

@Cyuan_W 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

View solution in original post

renatoromao
Super User
Super User

Yes, I got it!

For example:

 

Entity 1 - Products - rice, bread,..

Entity 2  - Money - $1000, $5000,...

 

Question 1 - What is the product? (entity 1)

Question 2- Ok, how many you will expend? (entity 2)

Message - Thanks, you selected VarProduct and VarMoney

 

Bot: "What is the product? "

User: "I want a rice less than $1000"

Bot: "Thanks, you selected rice and $1000"

 

The PVA bot will recognize these two questions.

@Cyuan_W 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

View solution in original post

8 REPLIES 8
renatoromao
Super User
Super User

Hi @Cyuan_W ,

 

When you are working with an entity, you define some fixed values to the user.

Also, you can use conditions for each option, but it's not available yet to receive a different value than options pre-defined.

 

You can create an artificial intelligence in your bot adding some similar options, this intelligence will help you to simulate some different scenarios. Take a look at a Money entity (is defined by Microsoft)

Also, you can see this documentation: Create and use entities - Power Virtual Agents | Microsoft Docs


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português
Cyuan_W
Frequent Visitor

Oh, it couldn't execute the "all other condition."

@renatoromao 

Cyuan_W
Frequent Visitor

@renatoromao 

So in my case, I need to predifine all other majors as "other majors" in my entity, in order to do the filter job? Is there any other options?

renatoromao
Super User
Super User

I recommend you to create all options (5, 6, ...10, or how many you want) that your user maybe will say when will talk to the bot, but display 2 or 3 options in the chat.

Create a condition for your 2 or 3 options that you display, and create "all conditions" to other options.

 

@Cyuan_W 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

Thank you very much, but I have one more question to ask here:

Is there a way that I can use one entity to categorize another entity?

For example,

Biochem is under Bio(entity1) and Bio is under STEM(entity2).

@renatoromao 

renatoromao
Super User
Super User

@Cyuan_W ,

 

You're welcome! 🙂

 

You can categorize two categories at the same time, but not one behind another.

Follow the documentation to understand better about the two entities in the same message: Create and use entities - Power Virtual Agents | Microsoft Docs


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

@renatoromao 

Thank you, but I mean that STEM is another customized entity, not a different predifine phrase under the same entity with Bio.

renatoromao
Super User
Super User

Yes, I got it!

For example:

 

Entity 1 - Products - rice, bread,..

Entity 2  - Money - $1000, $5000,...

 

Question 1 - What is the product? (entity 1)

Question 2- Ok, how many you will expend? (entity 2)

Message - Thanks, you selected VarProduct and VarMoney

 

Bot: "What is the product? "

User: "I want a rice less than $1000"

Bot: "Thanks, you selected rice and $1000"

 

The PVA bot will recognize these two questions.

@Cyuan_W 


Did I answer your question? Mark my post as a solution!
Thanks!

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.760 students) : English | Português

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (2,778)