I have a weird little question about internal notifications. There is a nice wide variety of sounds available that agents can use, but is it possible to add your own sounds to the library? If so, how would one go about doing that on a self-hosted instance?
That’s not a weird question, it’s a fun question! I was curious about this too, so I started to look around and tinker a bit.
Disclaimer: This is probably not how you should do it, as these changes will be negated on every upgrade, maybe the Zammad devs can point you in the right direction on what the proper way would be to make these changes persistent.
Sound asset files are stored in the public/assets/sounds/
directory of your Zammad installbase, which is likely /opt/zammad/
. You can add new MP3 files there and you have to configure these in Zammad to be able to use them. They are defined in app/assets/javascripts/app/controllers/_profile/notification.coffee
and app/graphql/gql/types/enum/notification_sound_file_type.rb
. I changed both these files to include my own new file, cleared the Rails cache, precompiled the javascript assets and then I was able to choose the new notification sound.
So, to summarize:
Copy the sound file(s) to the proper directory and fix the file ownership/permissions:
Define the new file in notification.coffee
and notification_sound_file_type.rb
Clear the caches, precompile the assets and restart Zammad:
sudo -u zammad zammad run rake cache:clear
sudo -u zammad zammad run rake assets:clean
sudo -u zammad zammad run rake assets:precompile
sudo systemctl restart zammad
And here is your new notification sound :
Thank you so much for looking into this for me. I’m writing up documentation for our org on how we use Zammad for future employees and I was wondering if we could establish our own sound that agents can opt-into that would make it easy for them to differentiate an internal notification for our tickets as opposed to any other notifications they may be getting when they’re working on our stuff and maybe other stuff at the same time. Very kind of you to play around and find out for me.