Expand my Community achievements bar.

Adobe Experience Platform (AEP) & Apps User Groups are live to Network, learn, and share in your regional locations.

Enhance Data Elements with JavaScript Promise Support

Avatar

Level 2

3/5/25

Summary:
Expand the capabilities of Adobe Launch Data Elements by enabling them to return JavaScript Promises. This feature will allow asynchronous data retrieval and processing directly within Data Element configurations, enhancing flexibility and power for dynamic data handling.


Problem Statement:

Currently, Adobe Launch Data Elements are limited to storing static or computed values within the confines of Rules. While they are invaluable for capturing and managing data on web pages, their functionality is constrained by synchronous operations. Asynchronous tasks, such as API calls or event-driven data retrieval, require external code, limiting the tool's potential for multisolution integration and Extension Development.

 

Proposed Solution:

Introduce exiting functionality with Rules where Data Elements can return JavaScript Promises. This will enable asynchronous operations directly within Data Element configurations, allowing users to handle dynamic and async data retrieval without leaving Adobe Launch's interface.

 

Key Features:

 
  1. Promise Return Option:
    Add the ability or an option in the Data Element configuration to specify whether it returns a synchronous value or a Promise.

  2. Asynchronous Functionality:
    Allow users to define asynchronous functions within Data Elements, enabling tasks like API calls or event handling directly from the Data Element setup.

  3. Code Snippet Support:
    Provide fields for embedding code that defines how the Promise is created, making it easier to handle complex async operations.

  4. User Experience Enhancements:
    Include templates and examples for setting up Promises within Data Elements, ensuring a smooth transition for users familiar with asynchronous programming.

 

Benefits:

  • Enhanced Capabilities:
    Users can perform advanced tasks like API data fetching or waiting for events directly within Data Elements, making tag management more dynamic.

  • Extension Development:
    Give the Developer the ability to leverage Browser APIs in their Custom Extension Development. (Shoutout to @yuhuisg)
  • Simplified Workflows:
    Reduce the need for external code by handling async operations natively in Adobe Launch, streamlining the development process.

  • Backward Compatibility:
    Existing users will see no changes unless they opt-in to use Promises, ensuring a seamless transition and minimal disruption.