Import geozones from a CSV file
Dieser Inhalt ist noch nicht in Ihrer Sprache verfügbar.
When you have hundreds of locations, such as every store in a chain or every pickup point, placing them on the map one at a time is not realistic. Import them from a spreadsheet instead.
Prepare the file
Anchor link toThe file needs a header row and one row per location, and must not exceed 5 MB. That is room for tens of thousands of locations, well past what a single geozone campaign is meant to cover. Three columns are required.
In the file you can use short headers such as range or cooldown. On the Import geozones screen the mapping dropdown uses the labels below (for example range → Range, m).
| Column in file | Maps to | Required | Notes |
|---|---|---|---|
| Name | Name | Yes | Up to 64 characters. |
| Latitude | Latitude | Yes | Between -90 and 90. |
| Longitude | Longitude | Yes | Between -180 and 180. |
| Range | Range, m | No | Meters, between 50 and 100,000. Falls back to Default range, m. |
| Cooldown | Cooldown, s | No | Seconds, between 60 and 3,596,400 (41 days). Falls back to Default cooldown, s. |
| Message | Message | No | Push text, up to 1024 characters. |
| Cluster code | Cluster code | No | An existing cluster code. |
| Preset code | Preset code | No | An existing preset code. |
Every geozone needs something to send, so each row must end up with either a message or a preset. It can come from the row’s own column or from Message for every zone / Preset for every zone on the import screen. A preset wins when a row has both.
Example CSV
Anchor link toHere is a geozones.csv with two locations. The second row leaves range empty so Default range, m applies:
| name | latitude | longitude | range | message |
|---|---|---|---|---|
| Store Downtown | 40.7128 | -74.0060 | 200 | Welcome to our store! |
| Pickup Point | 51.5074 | -0.1278 | Your order is ready |
Representation of geozones.csv in plain text format:
name,latitude,longitude,range,messageStore Downtown,40.7128,-74.0060,200,Welcome to our store!Pickup Point,51.5074,-0.1278,,Your order is readyHow to import
Anchor link toFollow these steps to upload the file and create the geozones.
- On the Geo campaigns page, click Import CSV. The Import geozones screen opens.

-
Select your CSV file.
-
Map columns and set defaults on the Import geozones screen.
Map each CSV column to a geozone field. Under each column header, open the dropdown and choose the field that column should fill:
- If Pushwoosh matched the header wrong, pick the correct field in the dropdown.
- Set a column to Do not import to ignore it.
- Map Name, Latitude, and Longitude at minimum.
- Map Range, m, Cooldown, s, Message, Cluster code, or Preset code when those columns are in the file.
Set defaults for values the file does not supply:
- Default range, m and Default cooldown, s. Used when the file has no range or cooldown column, or the cell is empty (as with “Pickup Point” in the example).
- Cluster for every zone. Pick a cluster, or leave No cluster.
- Preset for every zone. Optional push preset for every row that needs one.
- Message for every zone. Used when the file has no message column. Rows that already have a message keep their own text.

-
Check the ready and skipped counts (for example 2 rows ready, 0 skipped). Fix mapping or the spreadsheet if needed, then click Check without importing. Pushwoosh validates the whole file without creating geozones. Rejected rows come back with the line number and the reason, so you can fix the spreadsheet and try again with nothing left half-written.
-
When the check looks right, click Import. Geozones are created in batches. The result screen reports how many were created and which rows failed.

Importing the same file twice creates a second copy of every geozone: names are not unique. To correct a mistake, delete the geozones you imported and import the corrected file.
Why a row gets skipped
Anchor link toDuring check or import, rows that cannot be read are listed with their line number and skipped. The rest are still imported. A row is skipped when:
- the name is empty
- the latitude or the longitude is not a number, or falls outside the range given in the table above
- the range is not a number, or falls outside 50 to 100,000 m
- the cooldown is not a number, or falls outside 60 to 3,596,400 s
- the row ends up with neither a message nor a preset
To create geozones from your own system rather than a file, use the addGeoZone API method.