1

I'm trying to get dialogflow to be able to better understand long numbers. The numbers I want the user to say are always 9 digits. Dialogflow either thinks these are supposed to be phone numbers (even though I say they are sys.number-sequence or sys.number) or it will change 2 to "to".

For example, if I say 367218837, it'll convert it to "367 to 18837"

I've tried added training phrases, including that exact number as an example, with spaces, without spaces, with dashes.. Nothing. It's never been able to correctly translate the number I say.

I'm not sure what to do at this point. It works perfectly in Alexa but I can't get it to work with dialogflow. I've seen a lot of other people with similar issues. Does anyone know a workaround?

Keith
  • 1,352
  • 3
  • 21
  • 48
  • This may point to the start of the solution: https://blog.dialogflow.com/post/validate-entities-using-regular-expressions-in-fulfillment/ adding this: var pattern = new RegExp("^\\d{9}$"); or this: var pattern = /^\d{9}$/; will force the response to be a 9 digit number – Chuck LaPress Mar 20 '19 at 22:57
  • Yes it's impossible for me to say the number above into a Google Home and get the 9 digit number in the response. I already have code that validates the user's response. – Keith Mar 22 '19 at 01:34

0 Answers0