Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DialogFlow: Alphanumeric (fixed length) parameter in Intents and @sys.any type

I have an intent in DialogFlow that accepts an input/parameter from the user for validation purposes. The parameter is of fixed length and is alphanumberic (e.g. ABC1234). It is a random ID different for different users. The data input is validated at the backend using a webhook call.

In order for the input value to be accepted, I have to set the type of the parameter as @sys.any. It does work and the value is passed through to webhook for validation. But since this intent has no "Input contexts", the next intents are never triggered because each input from the user is evaluated to@sys.any.

What I need is a type that accepts custom value. But I can't find any.

Here is screenshot for the intent: Verify pin intent

Also note that the next intent that doesn't get triggered has the "In context" = authentication And user says expressions like book me. Due to @sys.any in the intent above, book me causes the above intent to trigger.

This question has similar requirements but no answers: DialogFlow - Improve entity/parameter recognition for alphanumeric parameters

Also: https://discuss.api.ai/t/alphanumeric-support/2572

like image 792
Abdullah Avatar asked Nov 07 '22 09:11

Abdullah


1 Answers

So after some digging, I had to change the approach. That is, @sys.any is not the way to go. Instead of alpha-numeric, I opted to use the numeric part of the input param (last four digits) and handled any duplication at the server end/webhook. The type I used instead is @sys.number-sequence.

I still had to handle the contexts in a way that any input of number-sequence doesn't trigger this intent.

like image 125
Abdullah Avatar answered Dec 07 '22 15:12

Abdullah