You can use user geolocation to search for the nearest service points or build the optimal route.

<aside> 💡 Note: This feature is available only for the following messengers:

<aside> 📢 Important: This function is not supported in WhatsApp business account messenger and Facebook Messenger.

</aside>

There are 2 setting modes for getting users’ geolocation.

Mode 1

To get users’ geolocation, follow these steps:

  1. Add a new bot-message element or use an existing one.

  2. Choose the type ‘Buttons’ of the message.

  3. Select the necessary messengers.

  4. Pick the button menu type. This case can be used only in the *Reply* button menu type.

  5. Write the text of the message. If necessary, you can specify the parameters values in the text.

  6. Add one button to the menu.

  7. Fill in the general settings:

    Untitled

As a result, the location data will be received in the following parameters:

| --- | --- | --- | | Answer_Location_Longitude | Outcoming | This is the user’s location longitude. Note: This parameter is used in [Request user's position]. | | Answer_Location_Latitude | Outcoming | This is the user’s location latitude. Note: This parameter is used in [Request user's position]. |

Set up the processing of this data using the business process elements.

Mode 2

Another way to get geolocation suggests receiving data by using the built-in action of sharing location:

  1. Add a new bot-message element or use an existing one.
  2. Choose the type ‘Buttons’ of the message.
  3. Select the necessary messengers.
  4. Pick the button menu type. This case can be used only in the *Reply* button menu type.
  5. Write the text of the message. If necessary, you can specify the parameters values in the text.

When the user shares their own location, this data will be received in the following parameters:

| --- | --- | --- | | Answer_Location_Longitude | Outcoming | This is the user’s location longitude. Note: This parameter is used in [Request user's position]. | | Answer_Location_Latitude | Outcoming | This is the user’s location latitude. Note: This parameter is used in [Request user's position]. |

Set up the processing of this data using the business process elements.