addGeofences
Adds a geofence too look for.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"fences" | Array | The list of the geofences. | null |
"query" | String | The table query | null |
"queryParams" | Array | The list of the appended query parameters. | null |
"table" | String | The database table. | null |
"template" | String | Template to apply to the query result. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type 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.