Page 1 of 1

How to generate separate notifications (in statusbar) by the

Posted: 22 Jun 2017 13:56
by akhileshg1988
Hey there!
Need some help.
I have a call recording flow wherein after a call (either incoming or outgoing) is disconnected, the flow shows a notification on status bar asking whether I'd like to save this conversation? On selecting yes, it does nothing and on selecting no, it deletes the recorded call's file.
Now, the problem is that if I leave the notification as such (without pressing either yes or no) and in the meantime, another call is recorded by the flow, upon disconnecting this new call, the flow generates a new notification on statusbar and overwrites the old one (already existing) notification.
How can I set the flow to generate a separate new notification if a previous notification (generated by the same flow) already exists in the statusbar?

Kindly guide.
Thanks
Akhilesh Chandra Gairola

Re: How to generate separate notifications (in statusbar) by

Posted: 22 Jun 2017 19:51
by Martin
Hi,

You have to use the notification ID field to use a different ID for the notifications.
For example you could create a global variable global_notification_id and assign the number 100. Use a script like this to increment the value for each call by one but reset to 100 when the 10th call is received so you are not flooded with notifications:

Code: Select all

global_notification_id = global_notification_id + 1;
if (global_notification_id==110)
{
  global_notification_id = 100;
}
In action Notification on Statusbar set field Notification ID to {global_notification_id}

Regards,
Martin

Re: How to generate separate notifications (in statusbar) by

Posted: 30 Jun 2017 06:13
by akhileshg1988
Hey Martin!
Thanks for your reply. I found a far better way (in my opinion) to implement what I had asked for.
Instead of using a global variable in the notification id field and incrementing it by 1 each time a new call gets recorded (as you had suggested), I have set the notification id field to the variable {triggertime,dateformat,ssS}. Since this variable is always gonna be unique each time the flow gets triggered, it completely solves my problem i.e. it always posts a new notification in statusbar when another notification already exists.

Re: How to generate separate notifications (in statusbar) by

Posted: 30 Jun 2017 18:46
by Martin
Nice, that's an interesting way to solve it, I especially like it because it does not require the global variable. Thanks for sharing!
The generated number is not guaranteed to be unique so one notification could overwrite another, but it's probably not that likely to happen.

Re: How to generate separate notifications (in statusbar) by

Posted: 02 Jul 2017 08:18
by akhileshg1988
Martin wrote:I especially like it because it does not require the global variable.
Same here. Me too.
Martin wrote:The generated number is not guaranteed to be unique so one notification could overwrite another, but it's probably not that likely to happen.
In my honest opinion, the chances of the generated number not being unique are rarest of the rare. What say?

Thanks
AKHILESH CHANDRA GAIROLA