Create an Event Rule to send an SMS when an SOS event occurs

In this guide we will show how to create an Event Rule that generates an alert on screen and SMS when an SOS signal is detected.

Requisites

- To have an SOS compatible device, and the SOS input mapped in the Device Mapper.

- To have Operator user types with Phone numbers on their user properties.

- If you own your server, to have SMS provider properly setup in your server (not necessary if you have a GpsGate hosted server).

Create your Event Rule

1. Go to Admin > Event Rules from the application's menu.

2. Click in New Event Rule button

At this stage, the event rule wizard starts. It will guide you through the 6 steps to create a rule.

1. Rule name and description

1.1 Input a Name for your event rule. A description is recommended. Keep the rule Enabled if you want it to be active.

1.2 Click on Next.

2. Who this rule applies to

2.1 Select your user tag.

If you don't select any user tags, the rule will apply to all the users.

Note

  • User it could be any user type, like a vehicle or a driver for example.

2.2 Click on Next.

3. Schedule rule activity

3.1 Select Always active if you want your rule be active at all times.

or select Activate on Schedule if you want, for example, the rule to be active during work hours, some rules might only make sense on weekends.

The option Finish events automatically when outside schedule means that the event will be closed without the need of false of the initial conditions.

3.2 Click on Next.

4. Expressions

This is the most important part of the Event Rules. The expression is the condition/s that trigger the event. 

 

4.1 To add an SOS input to the condition, you need to select Digital Expression > SOS

Show advanced options allows you to select different inputs to end your event. It's not necessary to be used with the opposite conditions to end an expression. If you use this option, use it with a different input (for example, if you want to end and SOS event when Speed > 0).

Immediate/Delayed event allows you to choose when the event will be triggered after the expression is true.

4.2 Click on Next

5. Notifications

 

In this example we will use SMS as a notification type. Click in the  button to add a new notification type.

5.1 Select SMS.

5.2 Add a Receipients to the notification. Remember selecting tags that contain users with phone numbers in it!

5.3 As a Message you can customize your own SMS message with your own variables by inserting Variables.

5.4 Click on Next.

6. Presentation

6.1 Select Show in map view should be enabled if you want to display a a blinking icon of the map for the event.

6.2 Select a Close behavior: Events can be closed automatically when they finish, or rather a user (typically an Operator) has to close them manually.

6.3 Select a Color: the color of the blinking icon on the map.

Comment on close: defines if you want to input a comment when the event is manually closed.

6.4 Click on Next.

6.5 Click on to finally Save your rule.

Result

When the SOS event is triggered, the event is visible on the map

As well as in the User phone