- Limit redemptions to customers in specific locations
- Discount or exclude products based on their location
- Exclude particular areas from applying discounts
What geofencing does and doesn’t do
Geofencing doesn’t track location automatically. Voucherify checks locations only when coordinates are sent in the API request (for example, during voucher redemption). You have to:- Create location boundaries in the dashboard
- Store coordinates in metadata (customer, product, or SKU)
- Send the current coordinates in the request
How geofencing works
Geofencing works by comparing coordinates you send with locations you define. It uses three elements:- Location objects: areas you draw on a map (circles or polygons)
- Geopoint metadata: latitude and longitude saved on customers, products, or SKUs
- Segments or collections: groups created by checking whether coordinates fall inside a location
Choose what you want to control
You can use geofencing in two independent ways:- Customer location: controls who can redeem.
- Product or SKU location: controls which items are discounted, required, or excluded.
Manage locations
Go to Campaign hub > Locations in the dashboard to create and manage location objects.Create a location
Create a new location as follows.Open the location creator
Find your target area
Define boundaries
- Circle: Set a center point and radius.
- Polygon: Draw a custom shape by placing points on the map.
Name and save
Location manager options
When managing an already created location, you can use the tricolon ⁝ to display the following options:Geofencing with customer location
Customer geofencing limits who is allowed to redeem a campaign.Create a location
Create customer geopoint metadata
- Type: Geopoint
- Name: for example
customer_location
geo:latitude,longitude format.Create a location-based customer segment
- Go to Customers > Find and apply filters.
- Select Custom attributes (metadata).
- Choose the geopoint metadata property.
- Select a Location object as the filter value.
- Confirm and select Apply.
Add a validation rule
- Create or edit a campaign.
- In the validation rule builder, add a condition based on Customer segment.
- Select the location-based segment.
- Save the rule.
Pass customer location during redemption
Geofencing with product or SKU location
Product and SKU geofencing controls which items are eligible for discounts or required in the cart. Product and SKU geofencing works the same way:- Use Product metadata if the location applies to the whole product.
- Use SKU metadata if different SKUs have different locations.
Create a location
Create product or SKU geopoint metadata
- Go to Project settings > Metadata schema.
- Select Product or SKU.
- Create a metadata definition:
- Type: Geopoint
- Name: for example
product_location
Create a location-based product collection
- Go to Products > Find and apply filters.
- Select Custom attributes (metadata).
- Choose the geopoint metadata property.
- Select a Location object.
- Confirm and select Apply.
- Select Create dynamic collection and save it.
Use the collection in validation rules
- Discount or exclude products from specific locations.
- Require products from a specific location to be in the cart.
- Any: at least one item must be from this location (most common)
- Every: all items must be from this location
- None: no items can be in this location
- Minimum quantity of matching items
- Minimum subtotal of matching items
Pass product or SKU location during redemption
Troubleshooting
If geofencing doesn’t work, check the following:- A geopoint metadata field exists (customer, product, or SKU)
- Coordinates are sent in the request using geo:latitude,longitude
- The coordinates are inside the location boundaries
- The correct segment or collection is used in validation rules
- Validation rules are enabled in the campaign
Related features
Geofencing connects customer data, product data, and campaign rules. Use the resources below to set up the required elements and integrate geofencing into your workflows.Customer segments
Customer segments
Product collections
Product collections
Validation rules
Validation rules
Metadata
Metadata
Developer setup: Geofencing API
Developer setup: Geofencing API
- Validations: Check eligibility before redemption using the Validate Stacked Discounts endpoint with location metadata included.
- Redemptions: Send customer or product geopoint metadata in the Redeem Stacked Discounts request body to trigger location-based validation.
- Customers: Manage customer profiles and metadata using the Customers API.
- Metadata schemas: List metadata schemas for geopoint metadata fields using the Metadata Schemas API.
- Locations: View location objects using the Location Object reference.
- Segments: Manage location-based segments using the Segments API.
- Product collections: Manage location-based collections using the Product Collections API.

