RISE has built-in push notifications and live updates (Web Push), so you don't need any other service. You can use Pusher instead. Pusher sends the changes at once, including the typing indicator in the chat. Follow these steps to set it up.
Create a Pusher app
- Sign in to your Pusher account.
- Create a new app here: https://dashboard.pusher.com/channels
- In the popup, choose your options. Select jQuery for the front end and PHP for the back end.
- After you create the app, the app details page opens.
- Click App Keys.
- Copy the app ID, key, secret and cluster.
- In RISE, go to Settings → Integration → Pusher. Turn on Enable Pusher, paste the keys and save.
Realtime chat
Turn on Enable chat via Pusher to get new chat messages right away through Pusher. This works for:
- Chat messages between team members and clients.
- The typing indicator in the chat box.
- AI chats from clients and website visitors. New chats and new messages show up at once in Messages → AI chats. A client also sees the team's reply at once.
If Pusher can't connect (wrong keys, network problem), RISE's own live updates check for new messages instead. Chat keeps working.
Website visitors who are not signed in don't use Pusher. Their chat checks for the team's replies every few seconds.
Live ticket updates
Turn on Enable live ticket updates in Settings → Tickets → Settings to see ticket changes without reloading the page. This is for team members and client contacts. It works without Pusher too (built-in live updates, within a few seconds). With Pusher, the changes come at once.
- Tickets list: new tickets and tickets with new replies show up in the list at once. Changed rows are highlighted for a few seconds. The list stays on the same page. In the compact view, the list shows the number of unread notifications on each ticket, so you see new replies on other tickets while you work on one.
- Open ticket: when someone adds a reply or a note to the ticket you are looking at, a bar under the Send button says This ticket has a new reply. Click View to see it.
- Notifications: when you open a ticket, its notifications are marked as read. When you see a new reply on the open ticket, its notification is marked as read too, so it doesn't show up later.
- Before you reply: if a new reply came in and you didn't see it, the Send button shows the new reply first and keeps your text. Read it, then click Send again.
- The status and the assignee of the open ticket update by themselves. A new ticket shows a short message with a link.
This works on the compact view, the ticket details page and on phones. It works for tickets from every source: the app, the client portal, ticket emails (IMAP), the ticket form and AI chats.
A team member gets updates only for the tickets they can see (admins, the assignee, and roles with access to all tickets or to that ticket type). You don't get updates for your own changes.
On the client portal, the client's contacts who can see tickets get the new replies and the status changes of their tickets. They never get the notes.
If Pusher loses the connection, the page catches up when it connects again. Until then, RISE's own live updates bring the changes.
Browser notifications (Pusher Beams)
To get notifications on the desktop or phone when RISE is closed, also add your Pusher Beams instance ID and primary key.
Each device is linked to the signed-in user. A user gets only their own notifications. When another user signs in on the same browser, the device moves to that user.
Security
RISE uses private Pusher channels. The browser must ask RISE for permission before it can listen to a channel, and RISE allows only the signed-in user's own channels. Nobody can read another user's notifications with the public Pusher key.
Only IDs (message ID, ticket ID) go through Pusher, never the message or ticket text. The page then loads the new content from RISE, which checks the user's access again.
Notes
- Browser notifications need an https connection. On http you get the alert inside the app.
- Push notifications need web notifications. Turn on web notifications in your Notification settings.
For plugin developers
Use Live_events::send() to send events to users. It works with and without Pusher (see the Web Push and live updates article). With Pusher as the push service, the event also goes to the user's private channel as rise-
If your plugin sends Pusher events to users directly, use the private user channel. The old public channel names (user_1_channel) are no longer used.
use App\Libraries\Pusher_connect;
$pusher = new Pusher_connect();
$channel = Pusher_connect::get_user_channel($user_id); //private-user_1_channel
$pusher->trigger_channel_event($channel, "my-plugin-event", array("id" => 5));
In the browser, bind to the same channel on the shared connection:
NotificationHelper.getPusher(); //null when Pusher is off
Ticket changes are also sent to the page as a jQuery event. A plugin can listen to it:
$[removed]("rise:ticket_updated", function (e, data) {
//data.ticket_id, data.action (created, commented, note, closed, reopened, assigned), data.comment_id
//after a reconnect, data is empty: reload what you show
});
A page that already shows what a notification is about can stop its alert. The notification data has ticket_id for ticket notifications:
$[removed]("rise:notification_received", function (e, data, seen) {
if (data.ticket_id == myOpenTicketId) {
seen.handled = true; //no alert; mark it as read on the server, then:
LiveUpdates.requestCheck(["web"]); //refresh the count
}
});