Overview
Inbox messages are customizable messages delivered to contacts that can be viewed while actively using your mobile app. You can use custom HTML and key/value pairs to fully control the appearance and functionality of your in-app messages, thereby extending the look and feel of your brand. Given that inbox messages can be viewed while the app is open, you can use them to send helpful onboarding tips to new app users, confirm purchases, showcase new products or ongoing sales, and display personalized content based on contacts' in-app behavior.
Inbox message characteristics:
- Inbox messages sent to contacts will be stored inside the app and can be viewed until deleted.
- There is no message character limit, but the size of the device viewing the messages should be considered.
Create a New Inbox Message
Inbox messages are integrated into the mobile push channel so the steps to create a new inbox message are the same as the steps to create a new push notification. First, create a batch or automated message and choose Mobile Push from the channels dropdown menu.
Edit the message content section and choose Inbox message as the message type.

Edit Inbox Message Content
Use the message HTML editor to add the entirety of your custom inbox message content, including HTML and key/value pairs. By default, in-app messages are not styled, giving you complete control over the structure and appearance of your message templates.

- Image library - Insert an image stored in the Image library.
- HTML Content library - Insert reusable HTML content stored in the HTML Content library.
Since inbox messages are not saved forever, you can specify a window of time for the Cordial platform to keep them.

Preview and Test
The presentation of inbox messages will vary depending on the screen size and operating system of the mobile device. We recommend sending test inbox messages to ensure proper rendering on various devices.
Learn more about using Preview and Test tools.


Custom Key/Value Pairs and Preview Data
You can use the setKeyValuePair
Smarty utility to call add key/value pairs to your inbox message payload. For example, our demo app displays a card and list view that only need a few key/value pairs to generate (title, subtitle, imageUrl). The list view then renders the HTML payload if a message from the list is clicked, and the card view deep links to certain products by using another key named deepLink. Showing how you don't have to use HTML to create a great Inbox experience.
Preview data
Preview data can be very useful when the entire Inbox message payload is not needed right away. This data is limited to 4 KB but allows you to attach some extra pieces of data to your message for quick use inside your application. A good example is if you have a list view of inbox messages, you need to quickly populate multiple messages and using preview data can speed this up to prevent lag inside your application. More information on how an app developer can use this can be found in our SDK documentation (iOS, Android).
Here is some sample code using preview data, that we use when sending Inbox messages to our demo application:
{$isPreviewData = true} {$utils->setKeyValuePair("title", "Order Confirmation", $isPreviewData)} {$utils->setKeyValuePair("subtitle", "Order #A37B92 has been received", $isPreviewData)}
{$utils->setKeyValuePair("imageUrl", "https://cdn.shopify.com/s/files/1/1070/1848/products/3835572-p-MULTIVIEW_1024x1024.jpg?v=1470290912">https://cdn.shopify.com/s/files/1/0757/9123/products/linjer-crossbody-purse-2_1440x.jpg", $isPreviewData)}
{$utils->setKeyValuePair("deepLink", "https://tjs.cordialdev.com/prep-tj1.html", $isPreviewData)}
Comments
0 comments
Please sign in to leave a comment.