Geofences use the Haversine formula for accurate distance calculations on Earth’s surface. All radius values are in meters.
Business Value
How It Works
1
Define geofences
Create geofence records with a center point (latitude/longitude), radius in meters, and trigger configuration (enter, exit, or dwell).
2
Receive location updates
Your mobile app or IoT system sends location updates to the Geofence Check API with the customer’s coordinates.
3
Match against active geofences
The engine calculates the Haversine distance from the customer’s position to each geofence center and returns all matches where the distance is within the radius.
4
Execute actions
Each matched geofence includes an
action payload that your application uses to trigger the appropriate response (e.g., call the Recommend API, send a push notification, enroll in a journey).Configuration
Creating a Geofence
Geofence Fields
Trigger Types
Checking Location
To check whether a customer is inside any active geofences:Response
Integration with Decision Flows
A common pattern is to chain geofence detection with a Recommend API call:- Mobile app detects location change, calls
/api/v1/geofences/check - If matches are returned, extract the
decisionFlowIdfrom the action payload - Call
/api/v1/recommendwith the decision flow ID and customer context - Display the personalized offer via push notification or in-app message
API Reference
See the full Geofences API Reference for all CRUD endpoints, the check endpoint, field descriptions, and error codes.Next Steps
Geofences API
Full CRUD and check endpoint documentation.
Event Ingestion
Feed location events into the trigger engine.
Triggers
Configure rules that fire actions based on events.
Channels
Set up push notification delivery via Firebase or webhook adapters.