format and template of sms notification message

Hello guys,
I would to know if anyone has done this, on the sms notification or the email notification, there are some new parameters i would like to add, for now this is what i receive

Device: UAT 6868Z
Exceeds the Speed: 78.8 Km/h in KIgali Zone
Time: there is time included there
Point: there is some points included

Now i would like to change to this template to include some other new information

For example when such a message is sent, it should have a unique set of identification, thats unique for that particular message only
Also i would like to include the phone number of the device, in that message,
so the new template would look like this

Device: UAT 6868Z
Phone: ..................................................
EventID:.............................................. (this ID should be unique and no other event can have it,)
Exceeds the Speed: 78.8 Km/h in KIgali Zone
Time: there is time included there
Point: there is some points included

Guys how can i achieve this kind of format

thanks

Michał Piasecki5 years ago

I'm blindly guessing here, but perhaps try with $device.phone for device phone number.
As for Event ID, $event.id returns it. So if you want a link to it, just put https://example.com/?eventId=$event.id.

Hello @Michal
AM not understanding this well

As for Event ID, $event.id returns it. So if you want a link to it, just put https://example.com/?eventId=$event.id.

where do i put this https://example.com/?eventId=$event.id. line of code

Michał Piasecki5 years ago

What you're editing isn't any code at all. It's just a HTML message.
I don't feel like hand holding you through this (it's just HTML after all...). You put that link where you want it to appear, and that's it.
For example, if you type "Phone: $device.phone", Traccar will recognize the $ symbol as a variable and before sending the SMS message, it will replace it with something like "Phone: 123456789".

Hello @Michal
AM not understanding this well

As for Event ID, $event.id returns it. So if you want a link to it, just put https://example.com/?eventId=$event.id.

where do i put this https://example.com/?eventId=$event.id. line of code

Michał Piasecki5 years ago

It's literally just a link. It's not a code.
You put this link where you want it to appear in a message.

ok So i will have something like this added onto the template

"Phone: $device.phone"
EventID: $event.id

those will be the added lines on the template

thanks, i can no get the information i needed

what i also want to find out, in the codes, what the parameter for getting the configured geofence speedlimit

for example, Exceeds the speed: $speedString#{if}($geofence) in $geofence.name#{else}#{end}
does show the overspeed, and thats ok, so i would like to change the format,

for example, if i a geofence called KIGALI, and i have set speedlimit to 40km/h

the message should show the overspeed, the geofence and the speedlimit in that geofence

Something like this

Your Car Number: RAC 786B
Registered with Phone Number:+250789401725
Exceeds the speed: 40.8 km/h in Main Road Butare ...........WHICH HAS SPEED LIMIT OF 40KM/H (this is the line i want added)
Time: 2019-08-20 12:10:50
Point: -2.60237°, 29.741255°
Payment Reference Number (EventID):69

thanks