Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
user:notify:text [25/05/2018 14:49]
irra [Notification Text] https://redmine.gurtam.net/issues/21657
user:notify:text [10/05/2019 16:07] (current)
mary [Notification Text] WH-1136
Line 6: Line 6:
 The text of a notification can be written in any language, contain any characters, words and phrases, and be of any size. Large messages are acceptable for e-mail notifications. Of course, for SMS notifications it is better to form more compact messages. ​ The text of a notification can be written in any language, contain any characters, words and phrases, and be of any size. Large messages are acceptable for e-mail notifications. Of course, for SMS notifications it is better to form more compact messages. ​
  
-To be more informative,​ a notification should contain ​special parameters (tagswhich are substituted with real values in an incoming notification. ​+To be more informative,​ a notification should contain tags which are substituted with real values in an incoming notification. ​
  
 __Example__.\\ __Example__.\\
 The text //​«'​%UNIT%'​ violated speed limitations. At '​%POS_TIME%'​ it moved %SPEED% near '​%LOCATION%'​»//​ can be transformed to //​«'​Rover-119'​ violated speed limitations. At '​2000-01-01 12:​01:​37'​ it moved 136 km/h near 'KU 8, Thurnau, DE'​»//​. ​ The text //​«'​%UNIT%'​ violated speed limitations. At '​%POS_TIME%'​ it moved %SPEED% near '​%LOCATION%'​»//​ can be transformed to //​«'​Rover-119'​ violated speed limitations. At '​2000-01-01 12:​01:​37'​ it moved 136 km/h near 'KU 8, Thurnau, DE'​»//​. ​
  
-Measurement units (kilometers or miles) used to decipher ​parameters ​depend on resource settings where the notification belongs. Date and time format are taken from the creator of this resource. ​+Measurement units (kilometers or miles) used to decipher ​tags depend on resource settings where the notification belongs. Date and time format are taken from the creator of this resource.  
 + 
 +In the text of the notification with the //​[[user/​notify/​action#​send_a_request|Send a request]]// action type, enter the parameters of the request. When composing the text of notification yourself, use URL encoding. Note that when using this type of notification action together with others (such as //Notify by e-mail//, //Notify by SMS//, etc.) the text in all of the notifications is the same.
  
 {{ :​notify:​text.png?​nolink }} {{ :​notify:​text.png?​nolink }}
  
-Below is the list of parameters ​applicable to most types of notifications:​+Below is the list of tags applicable to most types of notifications:​
  
 |%UNIT%| Unit name. | |%UNIT%| Unit name. |
Line 21: Line 23:
 |%LOCATION%| Unit location at the moment when notification triggered. | |%LOCATION%| Unit location at the moment when notification triggered. |
 |%LAST_LOCATION%| Last known unit location\\ (may be useful if there is no position in the triggered message). | |%LAST_LOCATION%| Last known unit location\\ (may be useful if there is no position in the triggered message). |
-|%LOCATOR_LINK(60,​T)%| Create locator link for the triggered unit (in brackets indicate lifespan in minutes, T and G parameters to show tracks and geofences). |+|%LOCATOR_LINK(60,​T)%| Create ​[[user/​monitor/​locator|locator link]] for the triggered unit (in brackets indicate lifespan in minutes, T and G parameters to show tracks and geofences). |
 |%ZONE_MIN%| The smallest of geofences holding unit at the moment of notification. | |%ZONE_MIN%| The smallest of geofences holding unit at the moment of notification. |
 |%ZONES_ALL%| All geofences holding unit at the moment of notification. | |%ZONES_ALL%| All geofences holding unit at the moment of notification. |
Line 30: Line 32:
 |%TRAILER%| Trailer'​s name (can be displayed only if the trailer belongs to the same resource as notification). | |%TRAILER%| Trailer'​s name (can be displayed only if the trailer belongs to the same resource as notification). |
 |%SENSOR(*)%| Unit sensors and their values (indicate sensor mask in brackets). | |%SENSOR(*)%| Unit sensors and their values (indicate sensor mask in brackets). |
-|%ENGINE_HOURS%| Engine hours at the moment of notification. | +|%ENGINE_HOURS%| [[cms/​units/​counters|Engine hours]] at the moment of notification. | 
-|%MILEAGE%| Mileage at the moment of notification. |+|%MILEAGE%| [[cms/​units/​counters|Mileage]] at the moment of notification. |
 |%LAT%| Latitude at the moment of notification (e.g., N 55° 45.7530'​). | |%LAT%| Latitude at the moment of notification (e.g., N 55° 45.7530'​). |
 |%LON%| Longitude at the moment of notification (e.g., E 37° 35.2068'​). | |%LON%| Longitude at the moment of notification (e.g., E 37° 35.2068'​). |
Line 37: Line 39:
 |%LOND%| Longitude without formatting. | |%LOND%| Longitude without formatting. |
 |%GOOGLE_LINK%| Link to Google Maps with the position at the moment of notification\\ (e.g., http://​maps.google.com/?​q=55.762550N,​37.586780E). | |%GOOGLE_LINK%| Link to Google Maps with the position at the moment of notification\\ (e.g., http://​maps.google.com/?​q=55.762550N,​37.586780E). |
-|%CUSTOM_FIELD(*)%| Unit custom fields. If you leave the asterisk sign in the brackets, all accessible custom fields (both regular and administrative) will be shown with their values (in the format 'key: value'​). However, you can get the value of a certain field if you specify its complete name in the brackets. In this case, the resulting notification text will contain the value of the specified field (only the value but not its name). |+|%CUSTOM_FIELD(*)%| Unit [[cms/​units/​counters|custom fields]]. If you leave the asterisk sign in the brackets, all accessible custom fields (both regular and administrative) will be shown with their values (in the format 'key: value'​). However, you can get the value of a certain field if you specify its complete name in the brackets. In this case, the resulting notification text will contain the value of the specified field (only the value but not its name). |
  
-There are also parameters ​which make sense only with certain types of notifications:​+There are also tags which make sense only with certain types of notifications:​
  
-|%ZONE%| The name of the triggered ​geofence (used in notifications of geofence control). In the text of notifications ​of the //​[[user/​notify/​trigger?&#​geofence|Outside geofence]]// ​type in the %ZONE% ​parameter, ​the names of the geofences ​in which the unit was at the time of the previous message and is absent from at the current moment are displayed through a comma. If no previous positional message ​is found, ​or there are no geofences that satisfy the above condition, only the parameter ​(//%ZONE%//is displayed in the notification text. |+|%ZONE%| The name of the geofence ​for which the notification has triggered ​(for the notifications of the //​Geofence//​ type). In the text of the //​[[user/​notify/​trigger?&#​geofence|Outside geofence]]// ​notification, ​the %ZONE% ​tag is replaced with the names of the geofences ​(separated by a comma) ​which the unit entered ​at the time of the previous message and has already left. If there is no previous positional message or there are no geofences that satisfy the condition ​described abovethe text of the notification shows only the name of there tag (i. e. %ZONE%). ​ |
 |%ZONE_DESC%| The description of the geofence (for the //​Geofence//​ notification) taken from its [[user/​geo/​new#​set_geofence_properties|properties]]. | |%ZONE_DESC%| The description of the geofence (for the //​Geofence//​ notification) taken from its [[user/​geo/​new#​set_geofence_properties|properties]]. |
 |%SENSOR_NAME%| Triggered sensor name (used in various notifications). | |%SENSOR_NAME%| Triggered sensor name (used in various notifications). |
 |%SENSOR_VALUE%| Triggered sensor value. | |%SENSOR_VALUE%| Triggered sensor value. |
-|%SERVICE_NAME%| Service interval name (used in notifications about maintenance). |+|%SERVICE_NAME%| [[cms/​units/​maint|Service interval]] name (used in notifications about maintenance). |
 |%SERVICE_TERM%| Service interval state — left/​expired value (used in notifications about maintenance). | |%SERVICE_TERM%| Service interval state — left/​expired value (used in notifications about maintenance). |
 |%TRIGGERED_SENSORS%| All triggered sensors and their values (used in notifications about maintenance). | |%TRIGGERED_SENSORS%| All triggered sensors and their values (used in notifications about maintenance). |
Line 52: Line 54:
 |%PARAM_VALUE%| Parameter value (used in parameter control). | |%PARAM_VALUE%| Parameter value (used in parameter control). |
 |%SMS_TEXT%| Text from SMS message (used in SMS control). | |%SMS_TEXT%| Text from SMS message (used in SMS control). |
 +|%VOLUME%| The volume of the fuel filling or theft (for the corresponding notifications). |
 +|%INITIAL_LEVEL%| The fuel level at the moment when the filling or theft began. |
 +|%FINAL_LEVEL%| The fuel level at the moment when the filling or theft finished. |
 +|%TIME_FROM%| The time when the fuel filling or theft began. |
 +|%TIME_TO%| The time when the fuel filling or theft finished. |
 +|%DURATION%| The duration of the fuel filling or theft (in minutes). |
 |%DRIVER_ID%| Driver'​s code (used in notifications about drivers). | |%DRIVER_ID%| Driver'​s code (used in notifications about drivers). |
 |%DRIVER_NAME%| Driver'​s name (used in notifications about drivers). | |%DRIVER_NAME%| Driver'​s name (used in notifications about drivers). |
Line 68: Line 76:
 |%HOUSE%| House. | |%HOUSE%| House. |
  
-Note that a parameter ​must be marked by percent sign from both sides. Otherwise, it will be considered as plain text and will not be converted to real values. ​+:!: A tag must be marked by percent sign from both sides. Otherwise, it will be considered as plain text and will not be converted to real values. ​
  
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2019 Gurtam