Triggers: Any Text

The Any Text trigger is a special case where you want Flow to respond to anything a user might say or send or collect free form data. This enables you to respond to broad input you cannot train the AI for.
Use cases are open input like asking a user about a complaint or finding a piece of data like an email address.

Entity type

By default the Any Text is of a Text type. Whenever a user sends or says something, it gets put inside a param you can specify the name for.

You can also limit the matches that are made to system or custom entity types.

Any Text supports the following types:

TypeDescriptionExample match
dateWill find and convert any date in natural language to a UTC dateNext Saturday
timeWill find and convert any time in natural language to a UTC dateAround 12pm
NumberFind and convert numberstwenty five
EmailFinds an email addressMy email is [email protected]
Phone numberFinds a valid phone numberthat’s (055)1133211
URLFinds a valid URLmy website is www.janedoocorp.com
DistanceFinds a unit of distanceI think 2km
MoneyFinds a currency and ammoniteI have 20 EURO

If the Any Text has a specific type, a match is only made if it can match the data.

This also enables you to branches, Any Text trigger with other Any Text or Unknown trigger

Params are lists

Data that is captured can be a list. Flow does not override any data but always appends it. The following is an example of a JSON representation of a captured param:

> {  
>   "phoneNumber": [{  
>     "value": "+1234567890",  
>     "match": "My number is 1234567890"  
>   }, {  
>     "value": "+9012345678",  
>     "match": "My landline is 9012345678"  
>   }]  
> }

##

String templates

Extracted data can be used dynamically inside replies using string templates.

Filling user profile attributes

User profile attributes can be set using params by giving them a system-defined name.

The following profile data can be filled:

  • user.name
  • user.profile.fullName
  • user.profile.firstName
  • user.profile.lastName
  • user.profile.gender (M/F/U)
  • user.profile.locale
  • user.profile.timezone (offset from UTC, -1)
  • user.profile.email
  • user.profile.picture (url)

Read more

Using the extracted data
String templates