Web Message Inbox
This guide refers to Message Inbox integration into your website

Private Offering Feature

Web Message Inbox is available only for Marketing and Private Offering subscription.

Prerequisites

Make sure you've implemented Pushwoosh Web SDK on your website. To do so, please follow our guide.
Message Inbox is available for Geozones and CSV Push messages.

Overview

Prolong the effect of your campaigns with Message Inbox for websites! Being displayed at any time the browser is launched, web push notifications allow you to interact with your customers when they are surfing the web or doing their work on a desktop. But sometimes users don't pay enough attention to push messages and cannot make a decision right at the moment. By keeping web push notifications in Web Message Inbox, you let users who missed (or dismissed) your message return to your website and re-read the message whenever they prefer. Store messages in Message Inbox while they are valid to give customers time to think your offers over. Integrate Web Inbox into your website with Web Push SDK 3.0 to keep customers informed!

See it in action!

Check out Message Inbox in seconds! To make this powerful tool easy to try out, we've implemented it in our Push On website. Follow the guide to start exploring Web Message Inbox.

Mobile Message Inbox

To implement Message Inbox for mobile platforms, please follow the Mobile Message Inbox guide.

How does it work

Here's a typical workflow with InboxMessages:
Step
Method
Page load
Synchronizing messages with the server
InboxMessagesModel.updateMessages Executed while the SDK is initialized
Deleting outdated messages
InboxMessagesModel.updateMessages Executed while the SDK is initialized
Receiving the number of unread messages to update a badge
Pushwoosh.pwinbox.unreadMessagesCount Executed manually (after the onUpdateInboxMessagesevent triggers)
Loading messages to be displayed in Inbox
Pushwoosh.pwinbox.loadMessages Executed manually (after the onUpdateInboxMessagesevent triggers)
Marking messages got in the viewport as read
Pushwoosh.pwinbox.readMessagesWithCodes Executed manually
Performing an action assigned to the message opened
Pushwoosh.pwinbox.performActionForMessageWithCode Executed manually
Deleting messages by click on a delete icon or swipe-right a message
Pushwoosh.pwinbox.performActionForMessageWithCode Executed manually

Event listeners

onUpdateInboxMessages
1
// Executed after the Inbox is updated automatically while the page is loading.
2
Pushwoosh.push(['onUpdateInboxMessages', function(api, pwinbox) {
3
pwinbox.loadMessages().then(function(messages) {
4
console.log('EVENT: onUpdateInboxMessages', messages);
5
});
6
}]);
Copied!
onPutNewMessageToInboxStore
1
// Executed by ServiceWorker after the Inbox Message is received and saved to indexedDB.
2
Pushwoosh.push(['onPutNewMessageToInboxStore', function(api, message) {
3
console.log('EVENT: onPutNewMessageToInboxStore', message);
4
}]);
Copied!

Public module

WebSDK InboxMessagesPublic module presents a public interface to implement Web Inbox.
Model
1
type TInboxMessageTypePlain = 0;
2
type TInboxMessageTypeRichmedia = 1;
3
type TInboxMessageTypeURL = 2;
4
type TInboxMessageTypeDeeplink = 3;
5
type TInboxMessageType = TInboxMessageTypePlain // depends on action_params
6
| TInboxMessageTypeRichmedia
7
| TInboxMessageTypeURL
8
| TInboxMessageTypeDeeplink;
9
10
11
interface IInboxMessagePublic {
12
code: string; // inbox_id
13
title: string; // title
14
message: string; // body
15
imageUrl: string; // image
16
sendDate: string; // send_date
17
type: TInboxMessageType; // depends on action_params
18
isRead: boolean; // true if status is "read" or "open"
19
isActionPerformed: boolean; // true if status is "open"
20
}
Copied!

Public methods

Check out public methods' descriptions in the Web Push SDK 3.0 guide.