This page describes edgeConfigOverrides in the Server SDK configure method. For the Web SDK, see edgeConfigOverrides.
The edgeConfigOverrides object lets you override datastream settings for every request that an instance sends. For example, you can send data to a different Experience Platform dataset, Analytics report suite, or Target property than the datastream’s defaults. This is useful when one server handles several websites or business units that share a datastream. To override settings for a single event, use the edgeConfigOverrides object in sendEvent instead.
Overriding datastream settings takes two steps:
- Define the overrides that you want to allow when you configure the datastream. See Datastream configuration overrides for instructions.
- Set the
edgeConfigOverridesobject in your code.
When you set edgeConfigOverrides in configure, it applies to every request from the instance and from every forRequest handle that the instance creates. The following methods also accept an edgeConfigOverrides object for a single call:
If a method call includes its own edgeConfigOverrides object, the SDK combines it with the object from configure for that call. For each top-level property, such as com_adobe_analytics, the value from the method call replaces the whole value from configure. Top-level properties that you set only in configure still apply.
For example, if configure sets com_adobe_analytics and com_adobe_target, and a sendEvent call sets only com_adobe_analytics, that event uses com_adobe_analytics from sendEvent and com_adobe_target from configure. Properties nested inside a top-level property aren’t combined, so include every nested property that you need, such as both enabled and reportSuites.
Example
The following example overrides the Experience Platform dataset, the Analytics report suites, and the Target property for every request:
await alloy.configure({
datastreamId: "ebebf826-a01f-4458-8cec-ef61de241c93",
orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg",
edgeCredentials: {
clientId: process.env.ADOBE_CLIENT_ID,
clientSecret: process.env.ADOBE_CLIENT_SECRET,
scopes: process.env.ADOBE_SCOPES.split(",")
},
edgeConfigOverrides: {
com_adobe_experience_platform: {
datasets: {
event: {
datasetId: "64b6f930753dd41ca8d4fd77"
}
}
},
com_adobe_analytics: {
reportSuites: ["examplersid1", "examplersid2"]
},
com_adobe_target: {
propertyToken: "01dbc634-07c1-d8f9-ca69-b489a5ac5e94"
}
}
});
Supported overrides properties
com_adobe_experience_platform.enabledcom_adobe_experience_platform.datasets.event.datasetIdcom_adobe_experience_platform.com_adobe_edge_ode.enabledcom_adobe_experience_platform.com_adobe_edge_segmentation.enabledcom_adobe_experience_platform.com_adobe_edge_destinations.enabledcom_adobe_experience_platform.com_adobe_edge_ajo.enabledcom_adobe_analytics.enabledcom_adobe_analytics.reportSuitescom_adobe_audience_manager.enabledcom_adobe_identity.idSyncContainerIdcom_adobe_audience_manager.enabled to be true.com_adobe_target.enabledcom_adobe_target.propertyTokencom_adobe_launch_ssf.enabledYou can override only the settings that you allowed in the datastream configuration. See Datastream configuration overrides.