How to send ClickSend SMS to multiple destination based on individual devices

sdntech2 days ago

I am looking to understand how to tie Deviec to notifications (SMS or email) as 1:1. Today I have email integration and Clicksend integration in place; however, it is not possible to send SMS notifications to two different destinations for two different devices.

I want to use Clicksend as my SMS provider but then send SMS alerts to different numbers for different devices. Is it possible? I appreciate some insight.

You can create a second user account with different notifications.

sdntecha day ago

Thank you, Anton. Maybe I am missing something here. According to the Click Send integration (see below), you can just put one number in the "to" field. However, if I have two devices with two different owners, how can I use Click Send to send notifications to two numbers?
Thank you for your Patience!

<entry key='notificator.types'>web,mail,sms</entry>
<entry key='sms.http.url'>https://rest.clicksend.com/v3/sms/send</entry>
<entry key='sms.http.user'>[USERNAME]</entry>
<entry key='sms.http.password'>[PASSWORD OR API KEY]</entry>
<entry key='sms.http.template'>
{
    "messages": [
        {
            "source": "Traccar",
            "body": "{message}",
            "to": "{phone}"
        }
    ]
}
</entry>

Traccar will send two separate SMS to two different users with their own phone numbers.

sdntecha day ago

Thanks again. If I understand your suggestion correctly, I can remove the "sms.http.template" in the config, instead create two different users, populate their phone numbers in their profiles, and then create notifications with SMS alerts.
When a notification triggers, it performs a lookup in the user profile and uses that phone number as the SMS destination.

You still need the template. Otherwise how would it send the SMS?