Oracle Help Center | Oracle Responsys Mobile App Platform Cloud Service title

Managing Interactive Notifications

As described in the Interactive Notifications section of the "Design Mobile Apps for Responsys" topic, Marketers can use Interactive Notifications to add buttons to Push notifications. For Responsys accounts enabled for the Interactive Notifications feature, Marketers can add the standard interactive notifications, such as "Buy Now OR Add to Wishlist", to the Push notification. When the mobile app user receives the Push notification, they can choose their next action using the "Buy Now" or "Add to Wishlist" buttons displayed in the Push notification.

For Interactive Notifications to work in your mobile app, you must perform the following steps:

[1] Request access to the Interactive Notifications feature. To do so, contact your Customer Success Manager or log in to My Oracle Support and create a service request. The Interactive Notifications feature is currently released under our Controlled Availability program.

[2] Build your app with the Mobile App SDK for iOS, version 6.35 (when available) or greater. The SDK will be available from the Android Push IO Manager project on GitHub. The Mobile App SDK supports several default Interactive Notification buttons and categories, and your mobile app requires no additional configuration to use the defaults.

 

Implementing custom Interactive Notification buttons in your Android app

Optionally, you can add custom Interactive Notification buttons for Marketers to use in their Push campaigns. To do this for your mobile app, you must perform the additional steps in this section.

Step 1: Design the custom buttons

Work with the Marketing team to determine whether custom buttons are required for your mobile app, and then determine the button labels and functions.

In Responsys, Interactive Notification buttons are grouped by Category. When the mobile app user receives a Push notification that uses the button category, all buttons defined for that category are displayed in the notification. Each category supports having one or two buttons.

Allowable button actions are as follows:

"Screenshot of Responsys Push Message Designer that shows a campaign that uses Custom Interactive Notification buttons"

Step 2: Configure the custom buttons in the Mobile App Developer Console.

Use the Mobile App Developer Console to set up your mobile app to use Custom Interactive Notification buttons. See the topic Manage Notification button settings for instructions.

"Screenshot of Mobile App Developer Console that shows definition of a Custom Interactive Notification"

Step 3: Modify your Android app code to implement custom Interactive Notification buttons

To use custom Interactive Notification buttons in your mobile app, implement the APIs in this section.

API for adding a custom Interactive Notification

To add a custom Interactive Notification to the application, add the custom category along with its buttons.

Notes on the example below:

addInteractiveNotificationCategory(notificationCategory)

Parameter : Object for Notification category with details of category along with the buttons metadata.
Returns : True in case the category gets successfully added; False if there is a error reported

Example :
            PIOInteractiveNotificationCategory interactiveNotificationCategory = new PIOInteractiveNotificationCategory();
            interactiveNotificationCategory.setCategory(<Enter categoryId here>);

            PIOInteractiveNotificationButton button1 = new PIOInteractiveNotificationButton();
            button1.setId(<Enter buttonId 1 here>);
            button1.setLabel(<Enter button1 Label here>);
            button1.setAction("BG");
            interactiveNotificationCategory.addInteractiveNotificationButton(button1);

            PIOInteractiveNotificationButton button2 = new PIOInteractiveNotificationButton();
            button2.setId(<Enter buttonId 2 here>);
            button2.setLabel(<Enter button2 Label here>);
            interactiveNotificationCategory.addInteractiveNotificationButton(button2);

            PushIOManager mPushIOManager = PushIOManager.getInstance(this);
            mPushIOManager.addInteractiveNotificationCategory(interactiveNotificationCategory);
API for getting a custom Interactive Notification category

App developers can use this API to get the custom Interactive Notification category details for a particular categoryId.

getInteractiveNotificationCategory(categoryId);

Parameter : CategoryId for which the details are required
Returns : Object of the PIOInteractiveNotificationCategory; null if categoryId is not found

Example:
            PIOInteractiveNotificationCategory notificationCategory = mPushIOManager.getInteractiveNotificationCategory(<Enter categoryId string>);  
API for deleting a Custom Interactive Notification

App developers can use this API to delete a custom interactive notification which was initially added using the 'addInteractiveNotificationCategory'. Because custom Interactive Notifications are saved in your app's memory, using this API may help your save space.

deleteInteractiveNotificationCategory(categoryId);

Parameter : CategoryId of the custom interactive notification which is to be deleted
Returns : True if delete is successful; False if categoryId is not found

Example:
            boolean result = mPushIOManager.deleteInteractiveNotificationCategory(<Enter the categoryId string>);