Geofencing

In this tutorial, you'll learn how to introduce geofencing to your campaigns and reward your customers for being in the right place at the right time. Voucherify makes it easy to keep up with customers on the move thanks to the auto-update segments dynamically reacting to the location changes. 

You can create location-specific campaigns with redemptions limits based on customers, products, and SKUs geolocations:

  • Decide which products or SKUs will be discounted or excluded based on their current location.
  • Limit redemptions to customers who share specific locations.
  • Exclude particular areas from applying the discount. 

Contents

  1. Campaigns with customer location
  2. Campaigns with product and SKU location
  3. How to use the map and draw Locations? (video)

Limited access

The geofencing feature is available only in the Enterprise subscriptions (on demand).


Geofence campaign with customer's location

Voucherify supports campaigns restricted to specific areas. When passing the customer's geolocation with redemption/validation request, Voucherify verifies if a customer location meets campaign rules. 
Creating geofence campaign based on customer location comes down to the following steps:
  1. Create a new Location object to define an area for customers eligible for a discount.
  2. Add metadata definition with geopoint type to pass customer's geo-coordinates (latitude and longitude).
  3. Create a customer segment that gathers customers from the area specified by the Location object.
  4. When creating a promo campaign, add a segment-based validation rule that limits redemptions to customers from a particular location (customers that entered the customer segment).

Step 1: Define a new Location object

First, you need to define a Location object that defines allowed customer's locations.  Go to the Locations tab in your dashboard. 

Click the plus to add a new Location. You can now use the map or the search bar to browse and save the required location/area. After saving your Location, you can re-use it in future campaigns. 
Each Location object can be a single location defined by specific coordinates or a multi-coordinate area. You can highlight areas on the map using radius or polygon tools. 
Each polygon is a set of points forming a closed region.


Step 2: Add metadata representing the customer's location

To pass the customer's geolocation to Voucherify, you need to create a new metadata definition in the Customer metadata schema. There is a dedicated metadata type, called  geopoint, which lets you send coordinates (latitude and longitude) specifying the customer's current location.
Go to the Project settings > Metadata schema.

Expand the standard schemas and choose Customer. Click Add new definition and define a property representing the customer's location. Remember to choose Geopoint as a metadata type. Read more about customer metadata here.


Step 3: Create area-specific customer segment

Go to the Customers tab in your dashboard and create a new auto-update segment based on the metadata property added in the previous step. The segment will gather customers that share the required location. 
Later on, this segment will be used to limit redemptions only to customers from a predefined area with validation rules.  
  1. Click Find and apply filtering.
  2. Go to Custom attributes.
  3. Choose metadata property representing customer location. 
  4. Define segment criteria using one of your Locations. 
  5. Confirm with the plus and Apply.
In the picture above you can see the following segment condition: 
Value of customer's metadata called *customer_location* (geopoint type) needs to be included in geolocations defined within the Free shipping zone object. Both geopoint metadata and Location objects, store geolocation using coordinates (latitude and longitude).

When segment filters are ready, click Apply and save the segment. 

The segment will gather all customers who meet its rules and share the matching location. Moreover, with every update of the customer's location, Voucherify will check if he/she still meets segment rules and update the segment accordingly.


Step 4: Create a geofence promo campaign

You can choose between all campaign types offered in the Campaign Manager.
When creating a campaign, adding location-based validation rules is a key part of the process. Validation rules based on the customer segment created in the previous step will limit redemptions to customers from the specific area. 

You can add validation rules when creating a new campaign or prepare them beforehand in a dedicated dashboard section. The segment-based rule can be added in both basic and advanced Rules Builders. 

Basic builder:

Advanced builder:


Redemption

When redeeming the code, you need to pass the customer's current location using the same metadata property that was used to define the customer segment criteria. Voucherify will check if the value of metadata property assigned to the customer (current location) matches values allowed for that property by segment filters. 


Geofence campaigns with product/SKU location

Similarly to customer objects, you can add product metadata of the geopoint type and pass products locations in API requests. As a result, products from customer's orders can be validated against product-specific rules specifying locations that qualify products for discounts. 

Creating a product-specific campaign with geofencing comes down to the following steps:
  1. Log in to your dashboard and create a new metadata definition in the Product metadata schema.
  2. Create a products collection based on the added metadata property (geopoint type). 
  3. When creating validation rules for your campaigns, you can use location-based collections to introduce the following limits:
    • Only products from geolocations defined by the collection criteria can be discounted.
    • Only if a customer has products from particular geolocations, a discount can be redeemed. You can also specify how many items from a given location the customer needs to buy to make a redemption.
    • Exclude products from particular locations from getting a discount. 
    • Exclude carts with products from particular locations from making a successful redemption.

Step 1: Define a new Location object

First, you need to define a Location object that determines allowed product/SKU locations. Go to the Locations tab in your dashboard. 

Click the plus to add a new Location. You can now use the map or the search bar to browse and save the required location/area. After saving your Location, you can re-use it in future campaigns. 

Each Location object can be a single location defined by specific coordinates or a multi-coordinate area. You can highlight areas on the map using radius or polygon tools. 

Each polygon is a set of points forming a closed region.

Step 2: Add a metadata property for product/SKU location

To pass the product or SKU geolocation to Voucherify, you need to create a new metadata definition in the respective metadata schema. There is a dedicated metadata type, called geopoint, which lets you send coordinates (latitude and longitude) specifying a current location.
Go to the Project settings > Metadata schema.

Expand standard schemas and choose Product or SKU.
Click Add new definition and define a property representing the product or SKU location. Remember to choose Geopoint as a metadata type. Geopoint metadata enables you to pass location using coordinates separated by a comma (latitude, longitude).

Step 3: Create a location-based product collection

Collections group products and their SKUs under predefined criteria. When it comes to geofence campaigns, you need to build a collection that gathers items from a particular Location. Go to the Products menu and choose Find and apply filters

Go to the custom attributes (metadata) and choose the geopoint metadata property added previously to the schema.

Now, build collection criteria using the geopoint metadata property and Location object created in the first step. Confirm with the plus and Apply.

Note that you can add more filters to define the collection criteria. When they are ready, click Apply and Create dynamic collection.

Name the collection and save it. Now, you can use the collection to create location-specific validation rules for your products and SKUs. 

Step 4: Create a geofenced promo campaign

You can choose between all campaign types offered in the Campaign Manager.
When creating a campaign, adding location-based validation rules is a key part of the process. Validation rules based on product collections can model the required cart structure and/or define discounted/excluded items. 

You can add validation rules when creating a new campaign or prepare them beforehand in a dedicated dashboard section. To get an overview of available product-specific rules, open the advanced Rules Builder. 

When building campaign rules, you can use location-based collection twofold:

  1. You can use it to define products that will be discounted or excluded when redeeming a code or promotion. As a result, only products that share predefined location and match collection rules will be discounted (or excluded from getting the discount). Go here for the detailed instructions.

  2. You can also define the required cart structure. It means that products or SKUs located in a particular area need to be in the cart to make a successful redemption. On top of that, you can set additional criteria for matching items, like items count and subtotal.

To create order structure validation rules with product collections, go to the advanced Rules Builder and expand Order structure validation rules. 

Decide if every, any, or none of the order line items needs to match the collection criteria (be in a particular location). Mark the respective checkbox.

Click  Add and choose the area-specific product collection.

If you chose  Every or any order item matches, you can also define the quantity and subtotal of matching items. 

Validation rules

Go here to learn more about Rules Builder and product-specific validation rules.

Redemption

When redeeming the code, you need to pass the product or SKU location using the same metadata property that was used to define the collection criteria. Voucherify will check if the value of metadata property assigned to the product/SKU (current location) matches the values allowed for that property set in the collection filters. 

How to use the map and draw Locations?

Watch this short video to learn how to use the map in the Locations menu and define new geofences for your campaigns.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us