Prompt Address

Prompt Address is very handy when you need to get a valid address from the user.

Used to get address components (city, country, street, etc) from the user. This prompt can be configured to get full or partial address. If the user response is a valid address it will be parsed into all applicable components.

In this example, we use mandatory_fields to make sure the user enter the data we need, and we allow the user to use the location feature (if supported).

Example

get_address:
type: prompt
prompt_type: address
allow_location: true
mandatory_fields:
- raw_address
- city
- house_number
messages:
- 'what is your address?'
on_retry:
messages:
- 'please enter a valid address'
on_complete:
go_to: get_location

Properties

Field

Type

Description

Example

allow_location

boolean

if enabled, users can use the location feature (on supported platform) instead of replying with raw address

mandatory_fields[]

string

Specifies which address components are required to appear in the user response.

locale

string

The locale to use when validating the user response. Defaults to the app default locale.

messages[]

object (MessageNodeItem)

on_complete

object (RoutingNode)

on_start

object

Used to invoke a function before the message is sent to the destination.

identifer

string

prompt_type

string

retries

number (int)

Number of total retries. Upon invalid response, users will be prompted again with the same prompt until a valid input is provided - or number of retries exceeded. If users exceed maximum number of retries, the fallback node will be triggered. If set to 0, there is no retries limit.

on_retry

object

when input fail, do X