cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Triggers: Any Text

Triggers: Any Text

The Any text trigger is a special case where you want to respond to anything a user might say or send or collect free form data. This allows 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.

extract-any-text.png

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.

The following types are supported:

Type Description Example match
date Will find and convert any date in natural language to a UTC date Next Saturday
time Will find and convert any time in natural language to a UTC date Around 12pm
Number Find and convert numbers twenty five
Email Finds an email address My email is Jane@doo.corp
Phone number Finds a valid phone number that’s (055)1133211
URL Finds a valid URL my website is www.janedoocorp.com
Distance Finds a unit of distance I think 2km
Money Finds a currency and ammonite I have 20 EURO

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

This also allows you to branch the Any text with other Any text or unknown triggers.

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

 

Triggers: Any Text

The Any text trigger is a special case where you want to respond to anything a user might say or send or collect free form data. This allows 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.

extract-any-text.png

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.

The following types are supported:

Type Description Example match
date Will find and convert any date in natural language to a UTC date Next Saturday
time Will find and convert any time in natural language to a UTC date Around 12pm
Number Find and convert numbers twenty five
Email Finds an email address My email is Jane@doo.corp
Phone number Finds a valid phone number that’s (055)1133211
URL Finds a valid URL my website is www.janedoocorp.com
Distance Finds a unit of distance I think 2km
Money Finds a currency and ammonite I have 20 EURO

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

This also allows you to branch the Any text with other Any text or unknown triggers.

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

 
Last Reviewed:
12-28-2022 04:10 AM

Triggers: Any Text

The Any text trigger is a special case where you want to respond to anything a user might say or send or collect free form data. This allows 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.

extract-any-text.png

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.

The following types are supported:

Type Description Example match
date Will find and convert any date in natural language to a UTC date Next Saturday
time Will find and convert any time in natural language to a UTC date Around 12pm
Number Find and convert numbers twenty five
Email Finds an email address My email is Jane@doo.corp
Phone number Finds a valid phone number that’s (055)1133211
URL Finds a valid URL my website is www.janedoocorp.com
Distance Finds a unit of distance I think 2km
Money Finds a currency and ammonite I have 20 EURO

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

This also allows you to branch the Any text with other Any text or unknown triggers.

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

 
Version history
Last update:
‎06-16-2021 12:25 PM
Updated by:
Contributors