User input validation using SpEL in Watson Assistant

If you are building a Travel Booking bot, there will be several user inputs that have to be validated before an Air Traffic Service/API can be called. With Watson Assistant ( formerly Watson Conversation Service) you can do that effortlessly in the tooling using Spring Expression Language (SpEL) methods and expressions without having to take it to application side. You can process values extracted from user inputs by writing methods and expressions that access objects and properties of objects.

Examples below will help you understand how to validate user inputs in Travel Booking bot scenario using Spring Expression Language methods and expressions in Watson Assistant.

Validating whether departure location and arrival location are the same:

 

Validating whether the user has entered earlier departure dates:

 

Refer Watson Assistant Docs to understand more about SpEL methods and expressions to make your Chabot smarter! 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s