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.
- Campaigns with customer location
- Campaigns with product and SKU location
- How to use the map and draw Locations? (video)
The geofencing feature is available only in the Enterprise subscriptions (on demand).
Geofence campaign with customer's location
- Create a new Location object to define an area for customers eligible for a discount.
- Add metadata definition with geopoint type to pass customer's geo-coordinates (latitude and longitude).
- Create a customer segment that gathers customers from the area specified by the Location object.
- 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.
Step 2: Add metadata representing the customer's location
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
- Click Find and apply filtering.
- Go to Custom attributes.
- Choose metadata property representing customer location.
- Define segment criteria using one of your Locations.
- Confirm with the plus and Apply.
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 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.
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.
- Log in to your dashboard and create a new metadata definition in the Product metadata schema.
- Create a products collection based on the added metadata property (geopoint type).
- 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
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 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:
- 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.
- 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.
Go here to learn more about Rules Builder and product-specific validation rules.
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.