How do I configure JSON payloads for mobile platform integrations?

If you are a mobile business partner and you are integrating with Acoustic Exchange, you must send all user information from the mobile device to Acoustic Exchange, including user information for your app and the Acoustic Campaign SDK.

Verify that the Acoustic Campaign SDK is installed.

For information about iOS devices, see Detecting the SDK on your iOS app.

For information about Android devices, see Detecting the SDK on your Android app.

About this task

The Acoustic Exchange identity matching service maps identifiers in the user information to unique Acoustic Exchange x1Ids. The mapping allows Acoustic Exchange to exchange events between products. If you do not send the required user information, Acoustic Exchange cannot map user data, and user records become duplicated in the Acoustic Exchange database.

To send user information to Acoustic Exchange, build a JSON payload that includes the unique identifiers and attributes for your mobile app and the Acoustic Campaign SDK. Some mobile business partners use the mobile advertising ID (IDFA for iOS, GAID/AAID for Android) as a unique identifier. Acoustic Campaign uses Mobile User IDs (MUIDs), ChanneIds, and the appKeys as unique identifiers. When you build the JSON payload, ensure that the payload includes the identifiers for your mobile app, such as the mobile advertising ID, and the MUID, ChannelId, and appKey from the Acoustic Campaign SDK.

In some cases, you might not know the MUID, ChannelId, or appKey or whether the Acoustic Campaign SDK is installed. Before you build your payload, check the mobile device for the Acoustic Campaign SDK, and if the MCE SDK is installed, identify the identifiers for each platform.

  1. Identify the MUID, ChannelId, and appKey on the mobile device.
    1. For information about iOS devices, see Accessing registration details.
    2. For information about Android devices, see Accessing registration details.
  2. Build the JSON payload.
The following code shows a sample payload for an application install event, where the MUID is "RlqVsLpzJ2rdZe5y", the channelId is "q25QwSE8", and the appKey is "id554782625". The values for userid, iOS_advertising_id, and android_advertising_id are supplied by the business partner's mobile app.
[{
		"name": "userid",
		"value": "1473799578000-4774159"
	},
	{
		"name": "ios_advertising_id",
		"value": "0A40F5B8-F946-4FBF-BD0A-41628CF94063"
	},
	{
		"name": "android_advertising_id",
		"value": "0A40F5B8-F946-4FBF-BD0A-41628CF94063"
	},
	{
		"name": "mobileuserid",
		"value": "RlqVsLpzJ2rdZe5y"
	}
],

"events": [{
	"code": "appInstalled",
	"timestamp": "2016-09-13T11:55:06.279Z",
	"attributes": [{
			"name": "eventName",
			"value": "AppInstall",
			"type": "string"
		},
		{
			"name": "description",
			"value": "Installevent",
			"type": "string"
		},
		{
			"name": "mediaSource",
			"value": "organic",
			"type": "string"
		},
		{
			"name": "appKey",
			"value": "id554782625",
			"type": "string"
		},
		{
			"name": "channelId",
			"value": "q25QwSE8",
			"type": "string"
		},
		{
			"name": "campaignName",
			"value": null,
			"type": "string"
		},
		{
			"name": "platform",
			"value": "ios",
			"type": "string"
		}
	]
}]
Table 1. Identifiers in the JSON payload
Identifiers Description
userId This value corresponds to the unique identifier for the mobile business partner's mobile app. You can include values for iOS_advertising_id and the android_advertising_id.
mobileuserid This value corresponds to the MUID that you found in Step 1 for the Acoustic Campaign SDK.
Table 2. Event attributes in the JSON payload
Event attributes Description
channelId This value corresponds to the channelId that you found in Step 1 for the Acoustic Campaign SDK.
appKey This value corresponds to the appKey that you found in Step 1 for the Acoustic Campaign SDK.

When you build the JSON payload, ensure that the payload includes identifiers for your mobile app and the Acoustic Campaign SDK. The following tables describe the required identifiers and event attributes.

Use the v1/event API to send the payload to Acoustic Exchange. For more information about the UBX v1/event API, see UBX public API reference: Event API.