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

App with Multiple Responsys accounts

App developers can associate a single app with multiple Responsys accounts. If you have multiple Responsys accounts (each possibly corresponding to a separate brand, organization, or geographic region), but have a single app, you can configure and use the same app for each of your Responsys accounts.

To enable this feature:

Step 1: Add your app to each Responsys account

Your app needs to be associated with each Responsys account. Ensure that the same iOS credentials are configured for the app in each account.

[1.1] Log in to your Responsys account and navigate to the Mobile App Console.

[1.2] Find your app and click Edit. If you are creating the app for the first time, see Manage Apps and Platforms for instructions.

[1.3] Under Multiple Responsys Account, select Yes.

Responsys Mobile App Developer Console Manage Apps image

[1.4] Repeat these steps for each Responsys account for which you want to associate with the app.

Step 2: Download configuration files

You must download and bundle the configuration files from each Responsys account with your app.

[2.1] Log in to your Responsys account and navigate to the Mobile App Console.

[2.2] Find your app and click Edit. If you are creating the app for the first time, see Manage Apps and Platforms for instructions.

[2.3] Click the Platform link on the left-side navigation bar. The Platform page is displayed.

[2.4] Locate the platform for which you want to download the files, and then click Download > pushio_config.json. The file will download. Your Responsys account name will be prefixed to the filename.

"Platform Download menu screenshot"

[2.5] Bundle the file with your app. The configuration file contains an account attribute which you can use to understand which Responsys account each app configuration belongs to.

[2.6] Repeat these steps for each Responsys account for which you want to associate with the app.

Step 3: Changing configuration

When an app user installs the app, the app must use the configure API to initialise the app configuration to a specific geography, brand, or organization.

Whenever an app user switches the app's configuration (geography, brand, or organization) the app must use the configure APIs to re-configure the app to a new configuration, thereby unregistering the app from the current account and registering the app to a new Responsys account. The Responsys SDK provides several APIs to configure the Responsys account. The following APIs are used to configure Responsys accounts:

[3.1] Configure with filename

This API configures accounts by filename. The xxx_pushio_config.json file must be available in your app bundle. This API reads the content of the xxx_pushio_config.json file and configures the SDK. Whenever the app needs to switch accounts the new configuration file name must be provided. The configuration file should contain the details of that account.

The API returns response or error (if errors occur while sending the event to Responsys server).

void configure (String configFileName, PIOConfigurationListener listener)

This is the recommended method to configure the SDK.

[3.2] Configure with parameters

This API configures accounts with parameters provided in xxx_pushio_config.json. If you are using this API you need to read the xxx_pushio_config.json file for specific account and provide all the parmaeters to the API. It is recommended you use configureWithFileName API to avoid any mistakes.

The API returns response or error (if errors occur while sending the event to Responsys server).

void configure (String apiKey, String accountToken, String senderId, String conversionUrl, String riAppId, String accountName, PIOConfigurationListener listener)

Step 4: Clear old data

This step is optional if you want to delete the data when an app's configuration switches (geography, brand, or organization). There are several APIs available in the Responsys SDK to clean up old data if required. Ensure that you call these APIs if configure API call is successful. In the event the configure API call fails, an error will be returned in callback.

Upon successful SDK reset, the device installation / record / device ID will be marked as "Undeliverable" in the old Responsys account.

void resetMessageCenter() // Reset Message Center Messages

void clearInAppMessages() // Reset In App Messages

void clearAllPreferences() // Reset Notification Preferences

void registerUserId (String userId) // Reset the user id. Pass null to unregister a user

Step 5: Registration

You need to call the register API to register the SDK with the Responsys Platform after a successful configuration and data clean up. Responsys SDK provides several APIs to register the SDK.