Edit in GitHubLog an issue

Sending configuration overrides using sendEvent

Datastream overrides let you define additional configuration settings for your datastreams, allowing you to trigger different datastream behaviors on a per event basis.

Prerequisites

Before continuing with this tutorial, please ensure that the Edge extension version meets the minimum requirements:

  • Edge extension version >= 2.4.0 (Android) and >= 4.3.0 (iOS).

Additionally, please complete the following tutorials:

Datastream ID override

After configuring the datastream overrides, you can now send these overrides to the Edge Network through Mobile SDK. Sending the overrides using the sendEvent API is the final step of activating the datastream configuration overrides.

The following examples demonstrate what a datastream ID override looks like in a Mobile SDK integration:

Copied to your clipboard
// Create Experience event from dictionary
var xdmData: [String: Any] = [
"eventType": "SampleXDMEvent",
"sample": "data",
]
let experienceEvent = ExperienceEvent(xdm: xdmData, datastreamIdOverride: "SampleDatastreamId")
Edge.sendEvent(experienceEvent: experienceEvent) { (handles: [EdgeEventHandle]) in
// Handle the Edge Network response
}

Datastream configuration override

The following examples demonstrate what a datastream configuration override could look like in a Mobile SDK integration:

Copied to your clipboard
// Create Experience event from dictionary
var xdmData: [String: Any] = [
"eventType": "SampleXDMEvent",
"sample": "data",
]
let configOverrides: [String: Any] = [
"com_adobe_experience_platform": [
"datasets": [
"event": [
"datasetId": "SampleEventDatasetIdOverride"
]
]
],
"com_adobe_analytics": [
"reportSuites": [
"MyFirstOverrideReportSuite",
"MySecondOverrideReportSuite",
"MyThirdOverrideReportSuite"
]
],
"com_adobe_identity": [
"idSyncContainerId": "1234567"
],
"com_adobe_target": [
"propertyToken": "63a46bbc-26cb-7cc3-def0-9ae1b51b6c62"
],
]
let experienceEvent = ExperienceEvent(xdm: xdmData, datastreamConfigOverride: configOverrides)
Edge.sendEvent(experienceEvent: experienceEvent) { (handles: [EdgeEventHandle]) in
// Handle the Edge Network response
}

Payload example

The following example shows a sample payload after overriding the datastream configurations:

Copied to your clipboard
{
"meta": {
"configOverrides": {
"com_adobe_experience_platform": {
"datasets": {
"event": {
"datasetId": "SampleProfileDatasetIdOverride"
}
}
},
"com_adobe_analytics": {
"reportSuites": [
"MyFirstOverrideReportSuite",
"MySecondOverrideReportSuite",
"MyThirdOverrideReportSuite"
]
},
"com_adobe_identity": {
"idSyncContainerId": "1234567"
},
"com_adobe_target": {
"propertyToken": "63a46bbc-26cb-7cc3-def0-9ae1b51b6c62"
}
},
"state": { }
},
"events": [ ]
}
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.