Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

User Input Validation Using SpEL in Watson Assistant [Videos]

DZone's Guide to

User Input Validation Using SpEL in Watson Assistant [Videos]

Watch these videos to understand how to validate user inputs in a travel booking bot scenario using SpEL methods and expressions in Watson Assistant.

· AI Zone ·
Free Resource

EdgeVerve’s Business Applications built on AI platform Infosys Nia™ enables your enterprise to manage specific business areas and make the move from a deterministic to cognitive approach.

If you are building a travel booking bot, there will be several user inputs that have to be validated before an Air Traffic Service or 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 the application side. You can process values extracted from user inputs by writing methods and expressions that access objects and properties of objects.

The examples below will help you understand how to validate user inputs in a 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 to the Watson Assistant Docs to understand more about SpEL methods and expressions to make your chabot smarter! 

Adopting a digital strategy is just the beginning. For enterprise-wide digital transformation to truly take effect, you need an infrastructure that’s #BuiltOnAI. Click here to learn more.

Topics:
ai ,chatbots ,bot development ,watson assistant ,spring expression language

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}