I think I made a mistake but I can't figure where.
I made a custom entity using regular expression to recognise product codes in phrases.
It works very well in Question, it extracts correctly the code matching the regexp.
I dont understand why it doesn't work in trigger phrases... i.e. I got a Topic wich returns product availability triggered by phrases like "product availability", "may you tell me the stock of product", and so on, followed by the question "Give me the product code please" wich stores the identified code in a global var (PCode).
The question is bypassed when the global var PCode is not empty and, as additive condition, it's not equal to '' (this is because at conversation start I set PCode = '').
Well, I'd like to know why Copilot triggers the product availability Topic and ask me "Give me the product code please" when I write "may you tell me the stock of product XXYYZZ?" forcing me to re-input XXYYZZ... shouldn't it automatically recognise the product code XXYYZZ?
Thank you a lot for your reply.
I found that if I don't set a global.variable it works better and I can also skip the control
It sounds like you have a condition to control when the question is skipped? If that is the case, you shouldn't need to use one. Here is a topic that works with a regex entity and slot filling. The question is skipped automatically when the entity slot is filled.
kind: AdaptiveDialog
beginDialog:
kind: OnRecognizedIntent
id: main
intent:
triggerQueries:
- inventory of products
- inventory of product aaa333
- inventory of product code fff555
actions:
- kind: Question
id: question_GTzji8
interruptionPolicy:
allowInterruption: true
variable: init:Topic.Var1
prompt: product code
entity:
kind: RegexEntityReference
entityId: cr148_communityQuestions.entity.productcode
- kind: SendActivity
id: sendActivity_mGhpyt
activity: "{Topic.Var1}"
Romain The Low-Code...
76
Pablo Roldan
61
stampcoin
10