Skip to main content
Enterprise featureGeofencing is available only for Enterprise clients. Contact your technical account manager or Voucherify support to enable it.
Use geofencing to create location-specific campaigns by controlling who can redeem and which products are eligible, based on customer, product, or SKU location. You can:
  • Limit redemptions to customers in specific locations
  • Discount or exclude products based on their location
  • Exclude particular areas from applying discounts
Geofencing works with all campaign types: discount coupons, cart promotions, loyalty programs, gift cards, and referral programs.

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
If no location is sent, geofencing rules are skipped.

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
When a customer redeems a voucher, Voucherify checks whether the coordinates sent in metadata are inside the allowed location boundaries used in validation rules.

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.
You can use one or both in the same campaign.

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.
1

Open the location creator

Select Create location in the top-right corner.
2

Find your target area

Use the map or search bar to navigate to the area where you want to create a location.
3

Define boundaries

Draw the location boundaries using one of two options:
  • Circle: Set a center point and radius.
  • Polygon: Draw a custom shape by placing points on the map.
Use the map editor controls to manage your boundaries:
ControlDescription
Re-centerBrings the selected location back into focus on the map
Draw polygonDraws a custom polygon boundary by placing points on the map
Draw circleDraws a circular boundary using a center point and radius
Edit boundariesEnables edit mode to adjust existing boundaries
Delete boundariesRemoves selected boundaries from the location
Zoom in / outZooms the map in or out
4

Name and save

Enter a Location name and save.
A new location is added to the location list.

Location manager options

When managing an already created location, you can use the tricolon ⁝ to display the following options:
OptionDescription
Show usageShows which resources use the location (product collections, customer segments)
EditModify the location name or boundaries
DuplicateCreate a copy of the location
DeleteRemove the location

Geofencing with customer location

Customer geofencing limits who is allowed to redeem a campaign.
1

Create a location

Create a location that defines where customers are allowed to redeem.
2

Create customer geopoint metadata

Go to Project settings > Metadata schema > Customer and create a new metadata definition:
  • Type: Geopoint
  • Name: for example customer_location
This metadata stores coordinates in geo:latitude,longitude format.
3

Create a location-based customer segment

Create a segment as follows:
  1. Go to Customers > Find and apply filters.
  2. Select Custom attributes (metadata).
  3. Choose the geopoint metadata property.
  4. Select a Location object as the filter value.
  5. Confirm and select Apply.
The segment updates automatically when customer locations change.
4

Add a validation rule

Add a validation rule as follows:
  1. Create or edit a campaign.
  2. In the validation rule builder, add a condition based on Customer segment.
  3. Select the location-based segment.
  4. Save the rule.
Only customers from that segment, which means those inside the defined location, can redeem the campaign.
5

Pass customer location during redemption

When redeeming a voucher, send the customer’s current location:
{
  "customer": {
    "source_id": "customer_123",
    "metadata": {
      "customer_location": "geo:40.7128,-74.0060"
    }
  }
}

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.
1

Create a location

Create a location that defines allowed product or SKU locations.
2

Create product or SKU geopoint metadata

Create metadata schema as follows:
  1. Go to Project settings > Metadata schema.
  2. Select Product or SKU.
  3. Create a metadata definition:
    • Type: Geopoint
    • Name: for example product_location
3

Create a location-based product collection

Create a new collection as follows
  1. Go to Products > Find and apply filters.
  2. Select Custom attributes (metadata).
  3. Choose the geopoint metadata property.
  4. Select a Location object.
  5. Confirm and select Apply.
  6. Select Create dynamic collection and save it.
4

Use the collection in validation rules

You can use location-based collections to:
  • Discount or exclude products from specific locations.
  • Require products from a specific location to be in the cart.
In the validation rule builder, expand Products structure validation rules and choose how order items should match the collection:
  • 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
If you choose Any or Every, you can also define:
  • Minimum quantity of matching items
  • Minimum subtotal of matching items
5

Pass product or SKU location during redemption

Send product or SKU coordinates in the order items:
  {
    "order": {
      "items": [
        {
          "product_id": "prod_123",
          "quantity": 1,
          "metadata": {
            "product_location": "geo:37.786971,-122.399677"
          }
        }
      ]
    }
  }
If the product_location metadata is missing or empty, the product or SKU will not match any location-based collection.
Voucherify validates whether item coordinates match the collection filters.

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
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.
Apart from using customer segments to group customers by location, you can create even more complex scenarios. Create a segment based on geopoint metadata and a location object and other customer attributes, then use them together in validation rules to control who can redeem.Read the Customer segments guide to learn more.
Apart from using product collections to group products or SKUs by location, you can create even more complex scenarios. Create a dynamic collection based on geopoint metadata and a location object and other product or SKU attributes, then use them together in validation rules to control which items are eligible.Read the Product collections guide to learn more.
Apart from using validation rules to apply location-based segments and collections to your campaigns, you can create even more complex scenarios. You can require customers from a specific segment, check whether order items belong to a location-based collection, and limit to a specific cart structure and safeguard your campaign budget with other conditions.Read the Create validation rules guide to learn more.
Geofencing uses geopoint metadata to store and send coordinates. You need to define geopoint metadata fields on customers, products, or SKUs before using geofencing.Read the Metadata guide to learn more.
Developers need to send location coordinates in API requests for geofencing to work. The key integration points are:
  • 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.
Last modified on March 19, 2026