Our documentation is changing, please click here to enjoy it!

Skip to end of metadata
Go to start of metadata

6.1 Basic configuration

The inbox feature lets you store targeted Inbox messages inside an Inbox within your app, in a similar way that a mailbox stores emails. With this Inbox, your users can retrieve messages over time, browse through the list of inbox messages and interact with them. Inbox messages are a good complement to push notifications or in-app messages.

These Inbox messages can be a text, a webpage, a landing page, ... with or without buttons.

 

Note that Inbox messages are independent from Push notifications. You can send Inbox messages which were never sent as Push notifications, and Push notifications will not automatically be displayed in your Inbox.

Please note that inbox messages are not impacted by the optin/optout system.

This means that a user can be targeted for inbox messages event if this one is optout to push notification.

Inside the Accengage dashboard, when setting up a Push notification, there is a shortcut to set up the equivalent of your push as an Inbox message.

 

The Inbox messages and buttons interact directly with the Accengage SDK.

You can for instance send a message with a button which will trigger an event, a URL scheme, or display a banner/interstitial when the user clicks on the message.

With Accengage Inbox you can : 

  • Obtain messages and display them in your own template
  • Update messages status on Accengage Servers (Read/Unread/Archived)
  • Track message events like displaying, opening and button click for statistic purpose

 

If you don' have access to the Inbox feature on the Accengage Dashboard, please contact our Support Team

Sample code

If you want to use this feature, Accengage servers will send all the message information to your app but you will need to create the interface yourself.

A complete sample project containing an Inbox implementation is available here. You can use it as a starting point and then adapt the interface to your needs.

Get Messages

Use the following method to get some messages
You will need an async callback block to be notified when a message is received. Here is an example of how to define it :

List Messages

Now that we have our inbox object filled with messages, we can display them in a UITableView.
In this example, we will associate a UITableViewCell for each message.

Do not forget to track the display of your message.

The callback is called in the main thread, but the process is asynchronous and the callback order is NOT garanteed.
Double checking the index provided when a message is received is mandatory to avoid errors in your code.

Message interactions

Now that we have downloaded and displayed our messages, we will allow our user to interact with them.
For example, if you display a message in a UITableView, you may want to provide the user with some interaction if he touches a table row.
You will need to give the message the user interacted with to the SDK.
According to the message format, the SDK can either start a predefined action or give it back to you to be displayed.

Do not forget to track the message opening when the user interacts with the message.

Tracking

The SDK provides three methods that allow you to track Inbox related events.

To track the message opening use the following BMA4SInboxMessage method:

To track the message display use the following BMA4SInboxMessage method:

To track the button click use the following BMA4SInboxButton method:

From the version 6.1 of the SDK, you have to track message events manually.

6.2 Advanced configuration

Work with Message Buttons

A message content can have some buttons. Here is an example of how to display and interact with these them.

Do not forget to track the message button click.

Update message status

You can change the status of a message, here is how to do it

  • No labels