Documentation - Flow.ai
  • Getting started
  • Triggers & Replies
  • Actions
  • Integrations
  • Guides
  • API

›Triggers

Triggers & Replies

  • Overview
  • Triggers

    • Text
    • Any text
    • Event
    • Unknown
    • Media
    • Location
    • Timer

    Replies

    • Text
    • Event
    • Action
    • Media
    • Location
    • Card
    • Carousel
    • List
    • Buttons
    • Quick replies
    • Reset
    • Tags
    • Handover
    • Resolve

Any text trigger

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.

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:

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 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.ai 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 extracted data
  • String templates
← TextEvent →
  • Entity type
  • Params are lists
  • String templates
  • Filling user profile attributes
  • Read more
Docs
Getting StartedBasic conceptsGuides
Platform
StatusSlack community
Resources
Blog
Copyright © 2021 Flow.ai