I am currently developing a copilot in Copilot Studio. In one of the topics, I am using a Question node to ask the user for some multi-digit number, e.g., a customer number. Unfortunately, this is where the problem begins.
There are two approaches that I have tried so far:
1. Under "Identify" I created a new Entity that uses RegEx to extract exactly 5 consecutive digits from the user's message/answer, not 4, not 6.
In this case, it works fine if I give exactly 5 digits in a sentence such as "Number is: 12345" or also when I just give the 5 digits as the entire answer ("12345"), but when I give a 6-digit number as the entire answer ("123456"), it directly escalates the topic ("How many repromts" under "Question behavior" is set to "Don't repeat", so this is partially expected behavior) BUT "Action if no entity found" under "Entity recognition" in Question properties is NOT set to "Escalate"; it is set to "Set variable to empty (no value)". I expected the variable to be set to Blank and continue the topic, but I was wrong.
2. Under "Identify" I selected "User's entire response". The expected behavior is: "No entity extraction; saved as is".
Here, I wanted to create a workaround: save the user's entire response to the Question node as a string, then use a Power Fx function/formula in a following Set variable value node to check for a 5-digit number in the user's response. This case works well when the user's response has words in it, such as "Yes, 12345", "Number is:12345.", etc. But when I give a pure numeric response in the Test window, such as "12345", "1234", etc., it again directly escalates the topic and doesn't proceed to the Set variable value node. Although, again, "Set variable to empty (no value)" is selected and not "Escalate". I am also confused that selecting "User's entire response" didn't make much of a difference. I expected the entire response to be saved as-is and assigned to a variable, which I could then work with in the next steps/nodes regardless of the response. Maybe I am misinterpreting this "Identify" behavior?
I read two related entries in this forum, one from 2022 and one from 2023. The recent one was solved by setting the value to blank rather than escalating, which is exactly the behavior I am struggling with. Any help or suggestions are welcome.
Thanks in advance!