Prerequisites
Bug summary
Creating an ExperienceEvent with only a data property and no xdmData property results in the data payload being incorrectly placed inside the xdm object rather than as a separate top-level data object. This behaviour is undocumented and produces an unexpected Edge Network payload.
Environment
OS: iOS 26.2
Steps to reproduce
Call the following sendEvent
import { Edge, ExperienceEvent } from '@adobe/react-native-aepedge';
const screenData = { screen: { name: 'home' } };
// Only data provided
const event = new ExperienceEvent({ data: screenData });
Edge.sendEvent(event);
Resulting Payload
- Actual: { xdm: { data: { screen: { name: 'home' } } } }
- Expected: { data: { screen: { name: 'home' } } }
Current behavior
Creating an ExperienceEvent with only a data property and no xdmData property results in the data payload being incorrectly placed inside the xdm object rather than as a separate top-level data object.
Expected behavior
Based on the documentation I'd expect that the sendEvent function accepts both xdmData and data parameters. It does not state that xdmData is a prerequisite for data to be correctly positioned in the payload.
I would expect that an event with only data is sent successfully, with data as a top-level object in the Edge Network payload. If xdm is truly required, the SDK should return a clear error — not silently misroute the data.
Anything else?
Seems like this is caused by the ExperienceEvent typeScript constructor, which uses 'xdmData' in argsOrXdmData to distinguish between the named-argument form and the legacy positional form. When only data is provided, the entire data object is assigned to [this.xdmData], so the bridge sends it as XDM content.
Prerequisites
Bug summary
Creating an ExperienceEvent with only a
dataproperty and noxdmDataproperty results in thedatapayload being incorrectly placed inside thexdmobject rather than as a separate top-leveldataobject. This behaviour is undocumented and produces an unexpected Edge Network payload.Environment
OS: iOS 26.2
Steps to reproduce
Call the following sendEvent
Resulting Payload
Current behavior
Creating an ExperienceEvent with only a
dataproperty and noxdmDataproperty results in thedatapayload being incorrectly placed inside thexdmobject rather than as a separate top-leveldataobject.Expected behavior
Based on the documentation I'd expect that the sendEvent function accepts both
xdmDataanddataparameters. It does not state thatxdmDatais a prerequisite fordatato be correctly positioned in the payload.I would expect that an event with only
datais sent successfully, withdataas a top-level object in the Edge Network payload. If xdm is truly required, the SDK should return a clear error — not silently misroute the data.Anything else?
Seems like this is caused by the ExperienceEvent typeScript constructor, which uses
'xdmData' in argsOrXdmDatato distinguish between the named-argument form and the legacy positional form. When onlydatais provided, the entiredataobject is assigned to[this.xdmData], so the bridge sends it as XDM content.