> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: September 14, 2026
> To take actions in Customer.io from an agent, use the [Customer.io CLI](https://docs.customer.io/ai/cli/get-started.md) or the [MCP server](https://docs.customer.io/ai/mcp/get-started.md).

# Set up geofences

When someone enters or exists a physical location with your app, geofences lets you trigger a journey, update a segment, or send a message.

Geofences help you meet your customers where they are—literally. Send retail and Quick Service Restaurant (QSR) promotions, travel information, parking reminders, venue welcome messages, or delivery notifications based on people’s locations.

## How it works

A **geofence** is a virtual boundary you draw around a real-world place—like a store, gym, airport, or parking lot. When someone with your app on their phone crosses that boundary, Customer.io records a `Geofence` event you can use to trigger an automation, create a segment, or control the flow of people’s journeys.

 ![A pin appears on a map that matches the address.](https://docs.customer.io/images/geofence-create-manual.png)

You group geofences into **geofence sets**. A geofence set lets you treat many geofences as one target, so an automation or segment can act on all of them at once. For example, you might group all of your stores into a geofence set, and trigger an automation when a person enters any of the geofences in the set.

You create geofences in your workspace. Then our mobile SDKs detect when someone crosses one and they send the event back to Customer.io.

Geofence boundary detection happens on the device. When the SDK refreshes nearby geofences, it sends the device’s current coordinates without identifying the person. The transition event for the person does not include precise coordinates.

Geofence transitions are not instantaneous. Detection and delivery time varies with the operating system, device movement, location accuracy, background restrictions, and network availability. Events may arrive within tens of seconds, but can take several minutes.

Refer to the [mobile SDK documentation](#troubleshooting) for version requirements, location permissions, and more.

## Location permissions

Geofences depend on a permission your customers grant in your app: background location—**Always** on iOS, **Allow all the time** on Android. Without it, the device detects crossings only while your app is open in the foreground, so you miss most of them. People rarely have your app open at the moment they walk into a store.

Your app asks for that permission; our SDKs never prompt on their own. Neither platform grants background location in a single tap, so this is worth planning with your mobile team before you build automations around geofences—your reach depends on how many people grant it. Each [mobile SDK guide](#troubleshooting) covers the permissions to declare and how to stage the request.

## Create a geofence set

In your workflows, you can add conditions for *geofence sets*, not individual geofences. So when you create geofences, first consider if you want to take action on them collectively. If not, that’s a signal to create multiple geofence sets to separate your geofences into.

Every geofence belongs to a geofence set. You either add a geofence to an existing set or create a geofence set followed by a geofence.

Under *Configure data* in the lefthand menu, go to *Geofences*, and then click **Create a new geofence set**. You only need to give it a name, but make sure it’s easy to understand so you can find it when creating automations, segments, and conditions.

After you create a geofence set, you can either [import multiple geofences](#import-multiple-geofences)—names, coordinates, the radii of the fences, and any custom metadata—or [add them manually](#create-a-geofence-manually).

## Import multiple geofences

To import multiple geofences, first [create a geofence set](#create-a-geofence-set). Then you create either a [GeoJSON file](#geojson) or [CSV file](#csv) with the required fields. You can import up to 10,000 geofences per geofence set, and the file must be less than 32 MB. Each geofence is a certain radius from a point; you can’t import polygon or custom shapes at this time.

1.  Select a geofence set.
2.  Click **Import**.
3.  Upload a [GeoJSON](#geojson) or [CSV](#csv) file.
4.  Decide how to run the import:
    *   Choose **Add and update** if you want to add new geofences and update existing geofences. [If the geofence shares an ID with other geofences, every geofence with that ID updates to match the new settings, even if the geofence is in a different geofence set.](#sync-shared-geofences-across-geofence-sets)
    *   Choose **Replace all** if you want to replace all geofences in the set with only what’s in the import file. This only removes geofences from this set; if a deleted geofence shares an ID with a geofence in another set, the other geofence set keeps the geofence.
5.  Click **Import files**.

You can preview the geofences after importing.

### GeoJSON

**GeoJSON** is a geospatial data interchange format based on JavaScript Object Notation (JSON). You can learn about the spec through the [IETF ↗](https://datatracker.ietf.org/doc/html/rfc7946) and validate your spec before import at [geojson.io ↗](https://geojson.io).

This is an example of a single geofence in the GeoJSON spec:

```
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "hq-sf",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -122.4194,
          37.7749
        ]
      },
      "properties": {
        "name": "HQ",
        "radius": 250,
        "location_id": "loc-4821",
        "category": "office"
      }
    }
  ]
}
```

The following fields are required unless noted otherwise:

Field

Description

`type`

Must be “FeatureCollection”

`features`

An array of objects, where each object is a geofence

`features.type`

Must be “Feature”

`features.id`

A unique identifier for the feature; if you leave this blank, Customer.io generates a UUID

`features.geometry`

An object with a `type` and `coordinates`

`features.geometry.type`

Must be “Point”; Customer.io does not support other geometry types at this time

`features.geometry.coordinates`

Array of coordinates: `[<longitude>, <latitude>]`

`features.properties`

An object with a `name`, a `radius`, and any additional custom properties you want to store with the geofence

`features.properties.name`

The name of your geofence

`features.properties.radius`

Integer. Represents radius in meters. Must be within 100–10,000.

`features.properties.<custom>`

(Optional) Any additional properties—like a location ID, category, or deeplink slug—are stored as the geofence’s attributes. Use GeoJSON if you want to import metadata alongside your geofences; the CSV format doesn’t support custom fields.

Importing metadata

To import metadata with your geofences, add your own keys to each feature’s `properties` object (for example, `location_id` or `category`). Any property beyond `name` and `radius` is stored as an attribute on the geofence. The CSV format only supports the fixed columns below, so use GeoJSON when you need custom metadata.

### CSV

To import multiple geofences from a CSV file, create a CSV file with these fields. All fields are required except where noted:

Field

Description

`name`

The name of your geofence

`radius`

Integer. Represents radius in meters. Must be within 100–10,000.

`longitude`

The longitude of your geofence

`latitude`

The latitude of your geofence

`external_id`

(Optional) A unique identifier for the feature; if you leave this blank, Customer.io generates a UUID

From the import UI, you can download a CSV template to help you create your file.

## Create a geofence manually

To create a geofence through the UI, first [create a geofence set](#create-a-geofence-set).

1.  Select your geofence set.
2.  Click **Create geofence**.
3.  Search for the place, business, or address or select *Coordinates* to specify a longitude and latitude.

     ![A pin appears on a map that matches the address.](https://docs.customer.io/images/geofence-create-manual.png)

4.  Specify the **Radius** in meters from your location. Each geofence is a certain radius from a point; you can’t add polygon or custom shapes at this time.
5.  Add a **Name** to easily identify your geofence and use it across your workflows.
6.  (Optional) Add an identifier; otherwise, your workspace generates one for you.

## Sync shared geofences across geofence sets

You can share a geofence across geofence sets so the same physical location stays in sync across your sets.

For example, imagine you have two geofence sets, one is for grocery stores and another is for convenience stores. Sometimes a grocery store is also a convenience store so you create a geofence around the same store in both sets. You tie them together by giving them the same ID. If later you update the radius of the geofence, every geofence that shares that ID updates to match the new settings.

To share a geofence with another set, [import it](#import-multiple-geofences) into that set using the same `external_id`. Customer.io keeps one fence record, so later edits apply everywhere it’s used. For example, if you update the geofence, like its radius, in the UI, that updates the radius across geofence sets.

## Use geofences in your workflows

You can use geofences in a variety of ways:

*   Message customers who cross a geofence boundary
    *   [Geofence automation trigger](/messaging/send/automations/triggers/)
    *   [Geofence events as exit conditions](/messaging/send/automations/exit-conditions//)
    *   [Geofence events as wait until conditions](/messaging/send/workflows/delays/wait-until/)
*   [Personalize messages with liquid based on geofence trigger data](/messaging/liquid/using-liquid/#event-data-variables)
*   [Group customers who transition through a geofence into segments](/messaging/segmentation/data-driven-segments/#segment-on-geofence)

## Track geofence events

When people move in or out of your geofences, Customer.io logs **Geofence Enter** and **Geofence Exit** in your [activity logs](https://fly.customer.io/workspaces/last/journeys/profile_activity/identified). Filter for the behavioral event type `Geofence` to see all geofence transitions in your workspace.

 ![A geofence enter event with the payload expanded.](https://docs.customer.io/images/geofence-event-activity-log.png)

Each event carries the `geofence_id` of the geofence boundary that was crossed and the `geoset_id` that the geofence belongs to. The activities do not send back exact coordinates of your customers, only data for the geofence they crossed.

A geofence enter or exit event fires when a person enters or exits any geofence within a geofence set. However, keep the following in mind:

*   **Geofence transitions are not instantaneous.** Detection and delivery time varies with the operating system, device movement, location accuracy, background restrictions, and network availability. Events may arrive within tens of seconds, but can take several minutes.
*   **There is a cool down period of 1 hour.** This means if a person enters, exits, then re-enters the same geofence within an hour, the SDKs only send one geofence enter event.

## Report on geofence events

You can export geofence events through data warehouse syncs. They come with the [Events schema](/integrations/data-out/data-warehouses/data-warehouses-intro/#events-schema) in your export files with `type = geofence`.

Geofence events don’t currently come with destination actions in other data out integrations.

## Export a list of geofences

You can export geofence metadata by going to a geofence set and clicking **Export**.

## Edit a geofence in use

When you edit geofences in use in your workspace—as an automation trigger, segment condition, or wait until condition—changes reach devices on their next SDK refresh. Depending on the platform and the device’s current location, a geometry change may produce a transition after it is applied.

For example, if you expand the radius of a geofence that’s part of an automation trigger, the automation could suddenly trigger for more people in the area. Similarly, if you shrink the radius, people could suddenly exit the automation.

You can filter for automations triggered by geofences from the Automations page.

## Delete a geofence in use

You can’t delete a geofence set in use; you first have to remove it from any automation or segment that uses it.

However, you can delete individual geofences from a geofence set that’s in use. Deleting a geofence does not trigger a geofence transition event, which is what causes people to enter or exit automations. Deleting a geofence does not log a `Geofence Exited` event for the person.

So if you have an automation triggered by entering a geofence set and then deleted one of its geofences, people who entered the geofence initially would not exit the automation, even if the exit condition was “Exited Geofence Set”.

## Current limitations

The following are not part of the initial release. Reach out to [product@customer.io](mailto:product@customer.io) with your use case if you want to request a feature.

*   Polygon (non-circular) geofences
*   Dwell-time triggers (time spent inside a region)
*   Import of address-to-coordinate geocoding (This is available when creating geofences in the UI, just not through bulk import.)
*   Scheduling based on time of day
*   A/B testing for geofence triggers
*   Anonymous profiles

## Troubleshooting

To troubleshoot issues with geofences, like entrances and exits not triggering as you’d expect, start with the SDK docs. Missing [background location permission](#location-permissions) is the most common reason transitions don’t arrive:

*   [iOS](/integrations/sdk/ios/tracking/geofencing/)
*   [Android](/integrations/sdk/android/tracking/geofencing/)
*   [React Native](/integrations/sdk/react-native/tracking/geofencing/)
*   [Expo](/integrations/sdk/expo/tracking/geofencing/)
*   [Flutter](/integrations/sdk/flutter/tracking/geofencing/)

©2026 Peaberry Software, Inc. [Status](https://status.customerio.com/) [Terms of Service](https://customer.io/legal/terms-of-service/) [Privacy Policy](https://customer.io/legal/privacy-policy/)

[](https://www.linkedin.com/company/customer-io)[](https://twitter.com/customerio)[](https://www.youtube.com/channel/UCkCaWdezRoa8ZyR9pEVaipA)[](https://www.instagram.com/customer.io/)
