Skip to main content

alert

Triggers an alert on the device, which may take the form of vibration, sound or a combination of both.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"playSound"BooleanIndicates whether the device plays sound when the action is triggered.false
"soundType"StringThe sound type that is played.null
"vibrate"BooleanIndicates whether the device vibrates when the action is triggered.false
"vibrationType"VibrationTypeThe vibration type.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 an alert

Goal: Create an alert with heavy vibration and sound.

To achieve this the following code can be used:

{
"type": "alert",
"params": {
"vibrate": true,
"vibrationType": "heavy",
"playSound": true,
"soundType": "default"
}
}

The sound does not play when the device is muted

Result:

An alert action has been created