Entity Pattern Values
You can give an entity a number of values in order to recognise parts of a user utterance, and use them for validation when gathering information in Flow.
Pattern values are used when you want to allow a wider range of inputs, but still restrict them to a pattern. This is achieved using regular expressions (regex).
So, you could assign the entity @imageURL a pattern named JPG | GIF | PNG | SVG that contained the following regex :
This would reject any user input that didn’t conform to this regex pattern, i.e. a URL that ends with a specified file type.
In the following step-by-step example, we will :-
Select an Entity
Add a Pattern Value
Choose the Pattern value type from the sidebar
Enter in the sidebar -
Value Name Name the value. All value names must be unique within the entity. This is just a label for the regex pattern(s) added to this value.
Pattern (optional) Add a regex (regular expression) for this value. All Patterns must be unique within the Pattern Value. Any user inputs that conform to the regex pattern will be accepted and stored.
Add multiple Patterns as required
Click Create Value
Your new pattern value will be shown in the value list under it's entity