How to get email and email/userid in sms tempelate

Fareed Qureshi2 years ago

Hi,
How to get email address, device id through sms template. Currently it is set as below

<entry key='sms.http.template'>
        {
        "to": "{phone}",
        "body": "{message}"
    }
</entry>

I have an external server where I am sending and processing these messages. please guide.

Anton Tananaev2 years ago

If you want to customize the message, you have to change the template in the templates folder.

Fareed Qureshi2 years ago

Thank you, I will check this. I have another related query, In events I am not getting geofence name although it is only showing "Geofenc entered and exit". Please let me know how I can get geofence name if event is related to geofence.

Fareed Qureshi2 years ago

I want to elaborate further, please find below my event api call when a geofenceEnter trigger.

{"id":34678,"attributes":{"alarm":"geofenceEnter"},"deviceId":4,"type":"alarm","eventTime":"2022-11-14T12:05:16.000+00:00","positionId":268108,"geofenceId":0,"maintenanceId":0}

In response you can see geofencid is 0 although positionId is available.

Anton Tananaev2 years ago

That's an alarm and not a server geofence event.