I have two queries related to using the slots feature.
I created a slot that prompts the user to enter a number. so i used @sys-number and created a context variable $number to capture it. However i want to also check that the number enter by user is exactly 5 digits. is there a way to perform this validation?
in another scenario i have to prompt the user to provide 2 numbers – customer id and order id. both are numbers. so i again created 2 slots with @sys-number and created 2 context variables to capture customerId and orderId. now my problem is how to figure out order of these numbers in the user input. so let’s say that if the users writes “please give me status of my order with id 100”, how can i ensure that 100 is interpreted as the orderId and not customerId. At present because my first slot is customerId, watson assumes that the number provided is customerId and not orderId and it again prompts the user to provide customerId. is there a way to design it in a better way. i was hoping that if i can get answer to Point 1, may be i can put some check on number of digits and do something.
Looking forward for some tips here. thanks !