Geofencing is the practice of using global positioning (GPS) or radio frequency identification (RFID) to define a geographic boundary. Then, once this “virtual barrier” is established, the administrator can set up triggers that send a text message, email alert, or app notification when a mobile device enters (or exits) the specified area.
There are plenty of cloud providers help you to implement geofencing once you know your customer and your market you want to target.
Know your Customer - Study currently available customer data, survey result and other hard data (browsing history, call center history, etc.)
Identify your Market - Define your market, you may want to chose top 5 segments
Configure Infrastructure - Setup your infrastructure, we need (1) A mobile app to publish current location using GPS or RFID, in this example POC, we will use GPS coordinates and (2) A server to capture the event and log, in future we can enhance it send push notification to customers.
We are almost ready to implement our first geofencing project.
I find it easier to understand this in reverse, ultimately a REST API will get called as soon as a device enters into or exit from a predefined geofence, & that's our events, and we get device id, geofence name, & coordinates as parameters. Once the event is captured, we can do whatever we want, log it, find the best offer, send a push notification to end user's device, etc. etc.
Logic app - Capture the HTTP request and then send the message to a service bus
Azure map - Subscribe the event and set the endpoint to the logic app
Event hubs - Optionally configure scalable Event Hubs to stream massive events
Define geofences
Mobile App - A mobile app (or IOT) which will register devices to your events.
Invoke Geofence API - The same mobile app will use Azure Map API to report current location every x interval
Here is the complete flow...
At run time the device will send the coordinates using Azure Map API, which will publish events by call a rest API of the logic app, which ultimately drop the package to a service bus.