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.