Requesting Location

Requesting location through Dialogflow.

There may be times where you need to ask the user for their exact location. For example, if you want to call an Uber for them.

Parameters

You can send a location request with the RB_LOCATION parameter. The platform will send out a location quick reply button on Facebook Messenger.

When clicking on the button, the user is able to select a location to send to the bot, including an option to send current location.

The resulting longitude and latitude coordinates are automatically resolved to an address that is stored on the platform. The location can be accessed using the @contact.locationdynamic variable.

Best Practices

This can be used in conjunction with the LOCATION event as a confirmation for receiving their location. It is good practice to give the user feedback when their information have been received.

Last updated