View sites
You can view a list of your organization's traditional sites in the sites list page. The page shows information about the number of associated zones, geofences, and beacons, and the date when the site was last updated. Personal sites are not shown in the list; however, the Home and Work check-boxes indicate whether or not personal sites are enabled for your organization.
You can view a geographical map of your organization's sites in the sites map page. In the sites map page, site markers indicate the locations of sites - blue markers for traditional sites. Personal sites are not shown in the map; however, the Home and Work check-boxes indicate whether or not personal sites are enabled for your organization. To view details about a site, click the site marker. A tooltip displays the site's name, address, and number of associated zones, geofences, and beacons. To edit the site, click Edit.
View site details
You can view a read-only summary of a site by clicking the site in the site list page. A panel opens that shows a map and the site hierarchy. To view details about an entity in the site hierarchy, such as a geofence or beacon, click the entity in the site hierarchy. If you can't find an entity, enter the entity's name in the search bar in the site hierarchy or click Expand to expand the site hierarchy. To edit the site, click Edit.
Find sites
You can find a site in the list of sites in the sites list page by entering the site's name in the search bar at the top of the page.
You can find traditional sites in the geographical map in the sites map page by entering the site's name in the search bar and then selecting the site from the list that is displayed. The page zooms to the site marker. Click the marker to view the tooltip for the site.
You can add and update multiple sites at a time by uploading a comma-separated values file (CSV file) in device location awareness (DLA).
Note: You can only import sites, not zones. As a convenience, the import process auto-generates a single zone when adding a geofence using radiusMeters
.
Add or update multiple sites with site import
Create a CSV file that specifies the sites you want to add or update. You can use any spreadsheet program that saves or exports to a CSV file.
- Rows in the spreadsheet represent the sites that you are adding or updating, and columns represent default site attributes and custom site attributes.
- Device location awareness provides two options for generating your own CSV file. If you use one of the following options, ensure that you create custom location attributes in the device location awareness UI before you create the CSV file. When you create custom location attributes before generating the CSV file, the CSV file contains columns for your organization's custom location attributes.
- Template CSV file - Download the file and add site information to rows in the spreadsheet. Ensure that you leave the
id
field blank for sites that you add. To download the template CSV file, go to the sites list page, click Import, and then click Download template. - Export CSV file - To update a site, edit the corresponding row in the spreadsheet but do not edit the
id
field. For sites that you do not want to update, remove the corresponding row from the spreadsheet. To add sites, add site information to rows in the spreadsheet but leave theid
field blank. To export your sites to a CSV file, go to the sites list page and click Export.
- Template CSV file - Download the file and add site information to rows in the spreadsheet. Ensure that you leave the
Both types of CSV files conform to the following CSV file format rules:
- CSV files must contain all the columns that are listed in Table 1, including columns for each custom location attribute that is defined in the device location awareness UI for the organization.
Note: To ensure that the CSV file contains all required columns, create custom location attributes in the DLA UI before downloading the template CSV file or exporting sites to a CSV file.
- CSV files cannot contain columns for custom attributes that are not yet defined in the device location awareness UI.
- Columns in the CSV file must follow the sequence that is described in Table 1.
- The size of the CSV file can be up to 500 KB, which is approximately 2000 - 3000 sites.
- When working with DLA exported CSV files in Microsoft Excel, be sure to use Excel's Import feature (instead of double-clicking on the CSV file), and to specify "Unicode (UTF-8)" as the File Origin.
Column | Required value or optional value | Description |
---|---|---|
id | Required when updating a site. Leave this value blank when creating a site. | Specify the id for the site that you want to update. To obtain the id for a site, use the device location awareness site export feature to generate a CSV file that contains information about existing DLA sites, including site IDs. Do not enter an ID when you add a site. |
name | Required | Specify a unique name for the site. |
description | Optional | Specify a description for the site. |
street1 | Optional | Specify the first row of the street address for the site. |
street2 | Optional | Specify the second row of the street address for the site. |
city | Optional | Specify a city for the site. |
streetProvince | Optional | Specify a state, prefecture, or province for the site. |
postalCode | Optional | Specify a postal code for the site. |
country | Optional | Specify a country for the site. Ensure that you use ISO 3166-1 alpha-2 code and a valid 2-character country code (US instead of USA). |
region | Optional | Specify a region for the site. |
isExternal | This field is read-only and used only for site export. It is ignored for site import. | Indicates whether or not this site is externally managed. |
latitude | Required | Specify a latitude for the site. If you do not specify a latitude, the site is not created or updated. |
longitude | Required | Specify a longitude for the site. If you do not specify a longitude, the site is not created or updated. |
radiusMeters | Optional | If you want to add a single geofence for the site automatically, specify a radius in meters for the geofence in the radiusMeters column. If you do not want to add a geofence or want to add multiple geofences, leave this value blank. When you add a geofence, a zone is created, and the geofence is added to the zone. |
custom location attributes | Optional | Specify the corresponding value for the custom location attribute. If you enter an incorrect data type, you receive an error when you try to import the file.
Note: If you want to use the template.csv file or the export.csv file, ensure that you create custom location attributes in a site in the device location awareness UI before you download the CSV file. |
You can use a single CSV file to add and update sites in device location awareness. When entering data into the CSV file, ensure that you follow these guidelines:
- If adding a new site, leave the value of the
id
column blank. - If updating an existing site, ensure that the id is specified in the
id
column. Only sites that are listed in the CSV file with a matching id are updated.
Note: To find the id for a site, use the device location awareness export feature to export your DLA sites to a CSV file. The CSV file lists all your sites and populates the id column with site ids.
- Some values, such as
name
, are required, and other values, such asdescription
, are optional. Values for custom location attributes are optional. You must specify all required values but can leave optional values blank. For information about required and optional values, see Table 1.Note: Latitude and longitude are required and cannot be derived from the site address. If latitude or longitude is not specified in the CSV file, the site is not created or updated. - Create new values for custom attributes by entering new values into custom attribute fields in the CSV file. After the CSV file is uploaded, the values are available in the custom attribute drop-down for all sites in your organization.
- If you are updating a site and leave the value for a custom location attribute blank, the attribute is removed from the site.
- Ensure that values do not contain leading or trailing white space or carriage return/linefeed characters.
Upload a CSV file for site import
Location administrators can upload as many CSV files as they want, one at a time. To upload the CSV file, follow these steps.
- Click Import in the sites list page.
- Drag the CSV file into the Import window and click Import or click the drop area to open a file browser. Select the CSV file, click Open, and then click Import. After the CSV file is uploaded, device location awareness adds and updates the sites defined in the file.
- Confirm that the sites were added or updated in device location awareness.
Note: If some sites fail to be added or updated, a report is displayed that shows information about the failures. Download the report and refer to it to manually correct the CSV file. After updating the CSV file, re-upload the CSV file to device location awareness.
Troubleshooting
If some sites fail to be added or updated, a report is displayed that shows information about the failures.
results
displays information about records that failed to be added or updated. The results show the site id, for sites that you are updating, the site name, and an error that indicates why the site failed to be imported.successCount
displays the number of successful imports.failureCount
displays the number of failed imports.
Refer to the report to manually correct the CSV file. After you update the CSV file, you can re-import the file to device location awareness.
The following code shows a sample report.
{ "results": [{ "id": "", "name": "CityCool University", "success": false, "error": "ERROR: duplicate key value violates unique constraint \"unique_root_site_name\"\n Detail: Key (name)=(CityCool University) already exists." }, { "id": "aDyVueaJQ4ZMCTiy", "name": "CityCool University", "success": false, "error": "ERROR: duplicate key value violates unique constraint \"unique_root_site_name\"\n Detail: Key (name)=(CityCool University) already exists." }], "successCount": 0, "failureCount": 2 }
Delete multiple sites
You can delete multiple sites at a time by uploading a comma-separated values file (CSV file) in device location awareness. First, export a CSV file of the existing sites, specify the sites you want to delete, and import the CSV file back in device location awareness.
The CSV format used for deleting multiple sites is different from the format used to save or export to a CSV file. Due to this reason, you cannot combine the delete operation with an import or update operation. You can use the same CSV file to import a few sites and update a few others. However, the CSV file for deletion can be used only to delete sites.
The CSV file format for deleting sites has the following three columns:
- deleteSite can be true, false, or empty.
- id is a valid site ID.
- name is the name corresponding to the site ID.
To delete multiple sites, in Mobile app > Device location, click Export on the Sites page to save a CSV file of the existing sites.
Note: By exporting the CSV file just before deleting the sites, you can ensure the site ID and name information is up to date. If the information is not up to date, you may see errors while importing the edited file.
In this CSV file, insert a new column deleteSite before the id column. Except for the columns deleteSite, name, and id, remove the rest of the columns. Now enter TRUE in the deleteSite column for the sites you want to delete. The sites do not get deleted if the deleteSite value is either empty or False. Sites do not get deleted if they are not present in the CSV file. For example, if the corresponding row is completely removed from the CSV file, the site does not get deleted. On the Sites page, import the edited CSV file by clicking Import. The Sites page displays a revised list of sites after removing the ones specified in the imported CSV file.
Edit a site hierarchy
You can edit a traditional site hierarchy by editing, adding, and deleting associated site entities, such as beacons, and by editing most of the information in the site definition.
Open the site that you want to edit by following one of these methods:
- In the sites list page, go to the Actions menu for the site and select Edit.
- In the sites map page, click the marker for the site and then click Edit.
- Edit and save the site definition.
- Add zones, geofences, or beacons to the site.
- Select the site in the site hierarchy, click the Zone, Geofence, or Beacon icon, define the corresponding entity, and then save the definition.
Note: You cannot change the latitude and longitude of the site.
Delete a site hierarchy
When you delete a traditional site in device location awareness, all associated zones, geofences, and beacons are deleted. If the site contains custom location attributes that are associated with other sites, the attributes are not deleted from the other sites and continue to be mapped to location universal behavior events.
Note: When you delete a site that is the result of a query in an active program, location universal behaviors stop being triggered for the site and the program stops firing for the site. However, because millions of user devices must be updated with the deleted site information, the program might continue to fire until all devices are updated for a specified period.
To delete a site, follow one of these methods:
- In the sites list page, go to the Actions menu for the site and select Delete. A confirmation window opens where you confirm that you want to delete the site.
- In the sites map page, click the marker for the site, click Edit, and then delete the site. A confirmation window opens where you confirm that you want to delete the site.