🔔Setting Up and Troubleshooting Push Notifications for OmniChat

📚 Learn to set up push notifications for OmniChat. Unlike desktop notifications, push notifications work even when devices are offline and OmniChat isn’t open, ensuring persistent and visible alerts.

💡 PRO TIP: Click here to hire an expert to guide you in the step by step. Book a call now to learn all the tips and tricks for training your AI, or let us handle it all for you instead.

In this tutorial, we’ll guide you through the steps to activate push notifications, including setting up the service worker file and configuring your notification settings.

Push notifications are like Desktop notifications but with some key difference. Desktop notifications, also called Web notifications, are requested directly by the client while Push notifications come from a server. The main difference is that the Push notifications work always, also if your device is offline, or OmniChat is not open. Also, they are persistent and always visible until closed.

  • Go to Settings > Notifications > Push notifications and activate them.


Activation for users #

  • Download the service worker file here.
  • Upload this file to your site at the following location: https://your-site.com/service-worker.js
  • Go to Settings > Notifications > Push notifications > Service Worker URL and enter the URL of the file. E.g. https://your-site.com/service-worker.js.

  • You’re done.

Information #

  • Pusher is free to use for up to 1000 concurrent subscribers. While you should be able to use the free plan for the admin area and all the agents, you may need a paid plan for Push notifications sent to the users depending on your site traffic.
  • Push notifications only work for full HTTPS websites. The only exception is localhost to ease development.
  • When a user click the notification the last page visited by the user is open and the chat is open automatically.
  • On desktop the browser needs to be running since that is the process that receives the push messages.
  • When Push notifications are active, they replace desktop notifications.
  • On Android and mobile devices, desktop notifications may not work, in which case you need to use Push notifications.
  • If Push notifications are active and not working, disable them and try again.
  • Push notifications can not be received on a desktop PC unless a browser is running.
  • Push notifications on iOS devices (iPhone) are available only from iOS 16.4. You need to install OmniChat as a PWA (details here). You need to use OneSignal. Pusher does not support iOS devices.
  • To reset the OneSignal subscription and subscribe again check the docs at https://documentation.onesignal.com/docs/clearing-cache-and-resetting-push-permissions.

Push notifications for admin and agents #

  • When an agent click the notification the admin area is open and the right conversation is selected. If the admin area is already open the notification will not open a new tab.
  • When a user sends their first message, a Push notification is sent to all validated agents; subsequent notifications are sent only to the last agent in the conversation.
  • If you’re using the Artificial Intelligence app, and Settings > Artificial Intelligence > Human takeover is active, no notifications are sent if the chatbot knows the answer.

  • If you’re using the WordPress version, Push notifications are not supported in the WordPress admin area, you need to access the OmniChat admin area directly, more details here.
  • If the Routing setting is active, only the agent assigned to the conversation receive the notification, admins see all conversations but don’t receive notifications.
  • If queue or routing settings are active, only the agent assigned to the conversation receive the notification. Notifications are not sent for messages sent by the user while waiting in queue. Admins see all conversations but don’t receive notifications.
  • If a user conversation is assigned to a department, only the agents assigned to that department receive the notification.
  • If a user conversation is not assigned to any department, only agents with no assigned department receive the notification.
  • Notifications are sent only if the last agent in the conversation is offline.
  • If human takeover is active, no notifications are sent if the chatbot knows the answer.
  • If Push notifications are not working, make sure you allowed the notifications, in Chrome you can check this from Privacy and Security > Site settings > Notifications.

 

 

 

  • If they don’t work on a mobile device, try these steps too: install the PWA or delete it and install it again, restart the mobile device.
  • If Push notifications are not working, and you are using Windows, ensure that the notification feature is not being blocked by Windows. To do this, click on the Start button and search for Notifications. Then, open the Turn app notifications on or off option and verify that your browser is not being blocked.
  • If Push notifications are not working, ensure that the OmniChat admin area is not visible and open. If the admin area is open, please minimize it or open another window or browser tab.
  • If Push notifications are not working, your system might be blocking them. If you are using Windows 10+ check this link. If you are on Mac check this link.If you have additional doubts, remember that you can always contact us.