Initialization

Inbox Model

In this section you will find a series of more advanced functionalities that require a more complex development. We recommend that a developer be in charge of this configuration.

Below we indicate the models of the objects that are used:

Inbox = {
    lastAccess: "string",
    count: "int",
    pageSize: "int",
    numPage: "int",
    notifications: [InboxNotifications],
    newNotifications: [InboxNotifications]
}

InboxNotifications = {
    id: "string",
    sentAt: "string",
    status: "String",
    sendingId: "int",
    campaignId: "string",
    message: Push
}

InboxCounter = {
    click: "int",
    sent: "int",
    deleted: "int",
    unread:{
        lastAccess: "string",
        count: "int"
    }

}

Once the device has been successfully registered, you can start making the Inbox requests. The following characteristics of the Inbox must be taken into account, which are optionally configurable.

Inbox Properties
The Inbox notifications will have the following statuses:

  • Sent or sent: the notification has been sent to the client, it has been read or not.
  • Click: they have clicked on the notification shown in the Inbox.
  • Delete or deletion: the Inbox notification has been deleted by the client.

Each notification will be assigned with an integer and unique sendingId, to be able to differentiate them and use them for some of the functionalities.

Get the notifications

As explained previously, the following method is used to obtain the notifications:

Indigitall.getInbox({"YOUR_AUTH_CONFIG_MAP:IF_NEED"}, (inbox) => {
    //DO SOMETHING
},(error) => {
    //LOG IndigitallErrorModel
});

Next page

Once the Inbox request has been started and launched, we can request the following page, which is carried out with the following method:

Indigitall.getNextPage(inbox) => {
         //DO SOMETHING
    },(error) => {
         //LOG IndigitallErrorModel
    });