Docs are current in the making

Request User Location

The WhatsApp Location Request function allows you to request a user's location through WhatsApp. This function creates an interactive message with a location request button that prompts the user to share their current location.

Implementation

To use this function in your Voiceflow project:

  1. Upload the custom function downloaded from the Custom Functions page on your FlowBridge environment, to your Voiceflow project as a custom function.

  2. Add a Custom Function block in your Voiceflow flow.

  3. Select the uploaded WhatsApp location request function.

  4. Configure the input variables

Input Parameters

The function accepts the following input parameter:

  • bodyText: The message to display when requesting the location (e.g., "Please share your location to find nearby stores")

If no bodyText is provided, a default message "Please share your location" will be used.

Accessing Location Data

When a user responds with their location, the following variables will be available in your Voiceflow project:

  • location_address: The address of the shared location (if available)

  • location_latitude: The latitude coordinate

  • location_longitude: The longitude coordinate

  • location_name: The name of the location (if available)

  • location_url: A URL to the location (if available)

Once location data is received, we will also automatically send a message as text to Voiceflow which contains a stringified JSON object of the location data. This is done so that you can use a capture step to wait for the reponse, and continue after.

Example

image.png
image.png

Last updated