Skip to main content

addGeofences

Adds a geofence too look for.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"fences"ArrayThe list of the geofences.null
"query"StringThe table querynull
"queryParams"ArrayThe list of the appended query parameters.null
"table"StringThe database table.null
"template"StringTemplate to apply to the query result.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples

Example 1: Create a addGeofences action

Goal: Create a addGeofences, provide an ID, latitude, longitude, radius to it, set showOnceInSeconds, showOnceInSecondsEnter, showOnceInSecondsExit to 10 seconds and create "enterRegion", "exitRegion" events that will show corresponding text within showMessage actions of them.

The action itself has to be configured in a separate template.

{
"name": "addGeofence",
"content": {
"id": "1",
"latitude": "50.581390",
"longitude": "8.665290",
"radius": "500",
"showOnceInSeconds": 10,
"showOnceInSecondsEnter": 10,
"showOnceInSecondsExit": 10,
"events": [
{
"type": "enterRegion",
"actions": [
{
"type": "showMessage",
"params": {
"text": "You have entered the region!"
}
}
]
},
{
"type": "exitRegion",
"actions": [
{
"type": "showMessage",
"params": {
"text": "You have left the region!"
}
}
]
}
]
}
}

Result:

A geofence is successfully created.