Notification Alert

Hi folks. I’m trying to work out how to use sound notifications when a user gets a new notification. For reference, I’m using Canvas template.

When an “order” is placed, it creates a new notification for each user who is required to be alerted.

On the recipients end, I basically want to say “When a new notification is created where the recipient is current user” play Javascript.

I’ve toyed around with some ways to get it working, but I’ve ended up with it playing at random points or on page load it suddenly plays multiple times at once (which is a bit deafening).

Any suggestions?

Have you tried the howler plugin ?

I’d use Bubble Toasts (plugin), or create a data trigger, and when that condition is true, play the sound.

You can setup the data trigger on each order essentially.

No I’m using the Toolbox plugin - playing the audio is fine it’s more just about getting it to actually play at the right time.

Looks like it’s working now. Every 5 seconds I set a state on the RE, this is a count of how many items are in the notification RG.

Then as part of this 5 second workflow, I play the JS, only if the number in the RG is different to what’s stored in the state.

Admittedly not a perfect solution, but it’ll do for now.

Thanks for your help both.