adobe / reactor-extension-core

This is the Core extension for Adobe Experience Platform Tags. It provides default event, condition, action, and data element types to all Tags properties.
https://experienceleague.adobe.com/docs/experience-platform/tags/extensions/adobe/core/overview.html
Apache License 2.0
21 stars 13 forks source link

Conditional data element returns empty string if fallback not set #62

Closed arobsco closed 3 years ago

arobsco commented 3 years ago

Expected Behaviour

When a conditional data element logic returns a fallback value and there is no fallback value set, the data element should return undefined as per normal logic for data elements

Empty strings is an issue for Web SDK, as unlike AppMeasurement, the XDM will be populated with empty strings and these will be sent to the edge, if certain items like product name are populated with an empty string then this will cause Target to return an error on the edge call

Actual Behaviour

The data element returns an empty string

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Create data element which uses conditional value type Do not set any fallback value Call the data element under such a condition that fallback value will be returned An empty string is returned instead of undefined

Platform and Version

Core 3.1.0

Sample Code that illustrates the problem

https://github.com/adobe/reactor-extension-core/blob/b18b0c05fbfd8a166d6b1d01db7c222012e70b9e/src/view/dataElements/conditionalValue.jsx#L66

Logs taken while reproducing problem

NA

arobsco commented 3 years ago

Further to this I believe the behaviour of this DE type goes against the expected behaviour per https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-launch/no-automatic-default-value-for-data-elements-anymore/ba-p/374101

dompuiu commented 3 years ago

@adobe export issue to Jira project PDCL as Story

github-jira-sync-bot commented 3 years ago

:white_check_mark: Jira issue PDCL-6855 is successfully created for this GitHub issue.

dompuiu commented 3 years ago

We added a checkbox that allows you to switch between undefined or a value here: https://github.com/adobe/reactor-extension-core/pull/63.