Skip to main content
Cards can be used to create targeted or automated App Inbox/NewsFeed messages that can be grouped into various categories and target users with different updates/offers that can stay in the Inbox/Feed over a designated period. For more information, refer to Cards.
Cards

SDK Installation

Pass the Cards config in the SDK initialization script as shown below:
placeholder is the icon on click of which the inbox will open. Make sure it is provided by you and it exist in the DOM.

UI Customizations

SDK provides a set of UI customizations that can overwrite the default values. Refer to the code snippet below for the UI customizations.

APIs

Unclicked Count

The SDK provides an API to fetch the number of cards that haven’t been clicked by the users. To get the count, use the following API.

New Card Count

The SDK provides an API to get the new cards for the user on the device. To get the count, use the following API.

Callbacks

The SDK provides the following callbacks:

Inbox Open Callback

To get a callback when the user clicks on the inbox icon and when the inbox is open, register the callback function to the setInboxOpenListener() method as shown below.

Inbox Close Callback

To get a callback when the user closes the inbox, register the callback function to the setInboxCloseListener() method as shown below.

Card Click Callback

To get a callback when the user clicks on a card, register the callback function to setCardClickListener() method: