Skip to content

Add Free form data support in SendEvent API#136

Merged
yangyansong-adbe merged 6 commits intoadobe:nonXdmDataSupportfrom
addb:freeformdataSupport
Jan 5, 2024
Merged

Add Free form data support in SendEvent API#136
yangyansong-adbe merged 6 commits intoadobe:nonXdmDataSupportfrom
addb:freeformdataSupport

Conversation

@addb
Copy link
Copy Markdown
Contributor

@addb addb commented Dec 20, 2023

Description

As per the internal discussion we decided to make a breaking change and update sendEvent API to accept the payload in a different format.

Current:

xdmData = {
   "key" : "value"
}

aepSDK.sendEvent(xdmData)

Updated

xdmData = {
   "key" : "value"
}

nonXdmData = {
  "customKey": "customValue"
}

xdmAndNonXdmData = {
   "xdm": xdmData,
   "data": nonXdmData
}

aepSDK.sendEvent(xdmAndNonXdmData)

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@addb addb requested review from emdobrin and praveek December 20, 2023 15:01
@addb addb linked an issue Dec 20, 2023 that may be closed by this pull request
@addb addb requested a review from emdobrin December 21, 2023 17:25
@addb addb requested a review from praveek December 22, 2023 05:59
@addb addb changed the base branch from dev to nonXdmDataSupport December 22, 2023 06:53
@yangyansong-adbe yangyansong-adbe linked an issue Jan 4, 2024 that may be closed by this pull request
@yangyansong-adbe
Copy link
Copy Markdown
Contributor

@emdobrin I need to add more tests and polish some code. Let me merge this PR for now and create a new PR to the dev or staging branch later.

@yangyansong-adbe yangyansong-adbe merged commit a3ff375 into adobe:nonXdmDataSupport Jan 5, 2024
yangyansong-adbe added a commit that referenced this pull request Jan 13, 2024
* Add Free form data support in SendEvent API (#136)

* Update sendEvent API parameter to accept xdm as well as free form data

* Update tests with the sendEvent API updates

* Update documentation with the freeform data support

* Update sample app with the updated the payload for the sendEvent API changes

* Updates based on reviews

* Added check to validate data is of type map

* some cleanup (#137)

* address review comments

* update the sample code for the sendEvent API

---------

Co-authored-by: Arjun Bhadra <arjun.d.bhadra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support to send freeform data to Edge [TBD] supports sending non-xdm data to the Edge network

4 participants