Triggers
You probably want to route only a subset of your messages. In order to choose which messages to route, the triggers section must be set in the action policy. Triggers enable downstream action execution, passing the event or the message to the specified actions.
Format
"triggers": {
"dataMessage": { (1)
"version": 1, (2)
"filter": { (3)
"connectors": [ "mqtt","sms"],
"groupPaths": [{
"includeSubPath": false,
"path": "/europe/france"
}]
}
}
}
| 1 | the type of message to be routed : data message, deviceStatus, commandStatus message |
| 2 | expected public data message output version |
| 3 | filter definition: criteria to choose which messages will be routed |
| more info on public data message format |
Message filtering
Message filtering will select the messages and apply all filters with a "AND" logic operators: groupPaths, connectors, deviceIds, tags. Filters lists are limited to 20 items.
In the previous example, the message will be selected if it has been emitted through the "mqtt" OR "sms" connector, AND belonging to "/europe/france" group.
| Filter | Available for | Description |
|---|---|---|
filter.groupPaths |
dataMessage, deviceStatus, deviceCreated, deviceDeleted |
Filter the messages based on the group of the device that posted it. The message will pass through the filter when at least one group matches ("OR" logic). |
filter.connectors |
dataMessage, deviceStatus, deviceCreated, deviceDeleted |
Filter the messages based on the network connector ("http", "lora", "mqtt", "sms", "x-connector") used to post it. The message will pass through the filter when at least one connector element matches ("OR" logic). |
filter.deviceIds |
dataMessage, deviceActivity |
Filter the messages based on the deviceId of the device that posted it ('metadata.source' field). The message will pass through the filter when at least one deviceId matches ("OR" logic). |
filter.tags |
dataMessage, deviceCreated, deviceDeleted |
Filter the messages based on its 'tags' field. The message will pass through the filter when all of the tags in at least one of the set of tags matches. For instance :
|
filter.status |
commandStatus |
List of command status : PENDING, PROCESSING, PROCESSED, CANCELED, ERROR, RETRYING, EXPIRED. |
filter.ruleId |
stateChange, deviceActvity, matchingFired |
List of rule ids to filter. |
filter.messageTypes |
loraNetwork |
List of message types: "UNCONFIRMED_DATA_UP", "CONFIRMED_DATA_UP", "UNCONFIRMED_DATA_DOWN", "CONFIRMED_DATA_DOWN", "JOIN_REQUEST", "JOIN_ACCEPT" |
filter.eventPayloadTypes |
connectivityManagementPlatformEvent |
List of the connectivity management platform event types to filter. The message will pass through the filter when at least one event payload type match ("OR" logic). Empty list means all messages will be routed. The event type values depend on your cellular connectivity management platform. For instance, for Orange CMP platform, you can filter on "prepaid_bucket" event type. |
filter.alarmRule.type |
alarmEvent |
List of alarm rule types to filter. Supported values are messageDeliverySuccessRatio (event sent when a message delivery success ratio alarm is triggered for account metrics monitoring) and actionSuspended (event sent when an action is suspended due to high error rate).Supported alarms full description is available in account alarming chapter. |