Expand my Community achievements bar.

Initializing a Web SDK "Data Variable" Data Element type, similar to "XDM object"

Avatar

Community Advisor

6/24/24

Description -  I LOVE (yes, that's uppercase!) the Web SDK "Data Variable" Data Element Type in conjunction with the "Update variable" action. Especially with the new UI, it looks almost exactly like AppMeasurement, even better. What I am missing is a way to initialize the DE in a similar way an "XDM object" can be defined directly in the Data Element section, to set an initial state, and which you can build upon in your rules to temporarily enhance it. After the rules have completed, the initial state is reset.

 

In my current setup with the ACDL (Adobe Client Data Layer), I need a standalone rule that is listening to "all events" and runs before any other ACDL triggered rule that further updates the variable, just to achieve this functionality.

 

Or am I missing a step / functionality? As a workaround, I could likely also create a "custom code" DE instead, that defines the core data structure as JS object, and can then be merged with the variable part and the result used instead. This would remove the need for an additional rule, but would also require you to be savvy enough to write that code yourself.

 

Why is this feature important to you? - It creates the need for unnecessary workarounds to set the globally applied pieces on the DE.

 

How would you like the feature to work? - The XDM object can also be defined in the Data Elements section, why not the variable data element as well?

In the DE definition, why not already display the same UI that is presented in the update variable step?

 

Untitled 11.jpgUntitled 12.jpg

 

Current Behaviour - Cumbersome additional step/rule needed to set commonly used parts on the data element e.g., through a custom rule that runs before the actual page view or interaction rule

4 Comments

Avatar

Employee

8/15/24

Having a base value for a data variable has been an oft requested feature. We will look into making this easier.

 

There is a way to do this now though. As far as your desire to "reset" the data variable to a known state at the start of a rule, I would recommend doing this:

1. Create a data variable A to act as the base.

2. Create a rule that triggers early to set values on the base data variable.

3. Create a data variable B to use for each rule.

4. In a set variable action, choose variable B. Click on the root level of the tree (the "data" label). On the right check the box to "clear existing value". Also click the data element button and specify variable A. This will reset variable B to variable A.

 

Avatar

Community Advisor

8/15/24

Hi @josnyder 

thx for the feedback, will look into it!

Would still be awesome if we had it a bit more similar to the XDM object data element type, or is that so fundamentally different that it will be hard to implement?

Avatar

Employee

8/16/24

Building the base value of the data variable is on our roadmap. Indeed we may deprecate XDM object data element and have all the same functionality in "variable".