Geofencing is the feature to use when you want to make your service location-based. Initially a geofence is a virtual perimeter that can be drawn around an area on a map, and the users who enter that specific area become the target audience and get some perks or trigger only certain functionalities.

To see whether the user is in the required area, you need to know where they are. This information can be obtained by asking the user to share their location via Share Location plugin.

When the user sends this information to the bot, it divides the obtained data into several attributes, among which are {{latitude}} and {{longitude}}. These two attributes will help determine whether the user is in the geofenced area or not.

Now, to build a square geofence around certain area, you’ll need two maximum and two minimum values of latitude and longitude around the area you need enclosed. 

A geofence in a bot can be built by using the Go To Block plugin. When filling in the information, make sure you use the less and more (<, >) operations.

With that, you have an enclosed area that you can set up so that when the user is in there, they can unlock certain functionalities that are not available elsewhere.

Did this answer your question?