Integrating Adobe Experience Platform Decisioning Engine with AEM Websites

Authors: Varun Rawat and Ankur Taneja.

Jaemi Bremner
6 min readSep 10, 2020

In this Digital Era, we are served with a targeted ad the minute we browse through a website. Therefore, companies are prioritizing to deliver authentic, useful, and personalized experiences for their customers has become a necessity. This experience needs to be seamless, in real-time, and to the customers’ immediate need or preferences for it to be impactful.

This is wherein Adobe Experience Platform Decisioning Service can be a great asset as we can base our offers on the entire interaction history spanning from behaviors detected in the past to the latest situational context. Adobe Experience Platform Decisioning Service gives our customers the capability to create personalized, optimized, and orchestrated experiences in applications running on our platform.

In this blog post, we’re going to explore how we can leverage Decisioning Service to show personalized content on an AEM website integrated on Adobe Experience Platform.

Adobe Experience Platform Decisioning Service: Overview

Decisioning Services help customers to create personalized and optimized experiences by using integrated/unified data ingested from various data sources into Adobe Experience Platform. Decisioning Services provides a set of APIs to fetch personalized and fallback offers based on Activity and that can be used to show personalized and relevant experience to the user on any platform.

For example: Displaying a free delivery offer to a user who complained to customer care about his order being lost yesterday may be a brave choice but not a long term best decision.

Figure 1: A brief flow diagram

With Decisioning Service, we can reuse business logic as well as share a catalog of options across channels and applications. Instead of managing decision options — and strategies for selecting them — deeply inside an application, they can now be leveraged regardless of when, how, and on which channel a customer’s end-user interacts with a business or organization.

In order to setup Decisioning Service, the user has to create the following:

Once we are done with the offers setup in Adobe Experience Platform, the next step is to display these on AEM site. AEM will contain pages with components and Decisioning Service APIs can be used to personalized components based on user interactions or Profile.

Business Use Case

Let’s take a use case wherein we want to personalize the home page banner for the users based on their Loyalty Status.

Loyalty data will be regularly ingested into Adobe Experience Platform through connectors and the same will be used for creating segments.

We will create 3 segments here based on the Loyalty status of user and show different personalized image offers based on these segments and as users loyalty status change based on their online or offline actions they can move across segments accordingly

  • Loyalty Status = Platinum
  • Loyalty Status = Gold
  • Loyalty Status = Silver
Figure 2: Decision Service UI

The above segments have their corresponding personalized offers and a fallback offer. They have been mapped to segments imported from Adobe Experience Platform in an activity.

Here is a diagram of the building blocks.

Figure 3: Building blocks

Steps to access decision service API

1. Setup Integration

In order to make calls to any Experience Platform APIs, one needs to setup an integration user with required access rights via

Once you have created a project in your marketing org, add AdobeExperience Platform and IO Management APIs via <Add to Project> button

For further details, please take a look at the detailed instructions provided in this link.

Figure 4: Adobe IO setup

2. Add Product Profile

Once the integration user is set, make note of the technical account ID to added to Offers product profile in the Admin Console as per the next step.

Figure 5 : Adobe IO Integration Details

3. Add Technical Account ID in Admin Console

Go to Admin Console and add the technical account ID of integration created in the previous step as a user via the <Add User> button

Figure 6 : Add user via Admin Console

AEM and Decisioning Service Integration sequential flow

Once you are done with the integration user setup, below mentioned flow will give you quick oversight on how the Decisioning service will work with AEM in order to serve personalized experience to our users.

Figure 7: Flow of API calls

Once we have our building blocks ready we are good to proceed to the main integration step

Required API calls

Write a Java sling servlet that will retrieve CRMID of the logged-in user and make the REST API calls to Adobe Experience Platform.

  1. Please use this link to create JWT token programmatically.
  2. The JWT token generated in the above step is then used along with client-id and client-secret to generate a bearer access token which is passed as an authorization header in successive calls. For details around required headers please refer to API documentation here .
  3. Get eligible/qualified OFFERs for Customer PROFILEs:{{OFFER_CONTAINER_ID}}/decisions

Sample Request

The response of the above POST call gives us the offer id for which the customer qualifies for, it can be a personalized offer or the fallback offer depending upon how you have set up offers and their eligibility rules.

In our sample use case offer eligibility is based on Loyalty status which is an attribute of our CRM data. The identity namespace to be used in the above call will be ‘CRMID’ and we will pass crmid from the user profile as identity id to identify the user.

Sample Response

4. The {OFFER_ID} received above will be in “xcore:personalized-offer:11bbe2c7c053ac60” format or a fallback offer depending on user’s eligibility, now to get the details of offer via the offer id we will make use of the below API:

As a response from the above GET request, we will receive a JSON object which will have a JSON array called “xdm:components” which contains details of the offer.

Sample Response

5. Since we created image-based offers, the above response will contain the image URL i.e. {OFFER_IMAGE_URL} however the said url is NOT a public one and requires you to make a GET call with required Authorization headers to get the image content.

6. The offer image comes in BASE-64 Encoded format which can be retrieved via ${body.content} and can be used to display the image on AEM site by targeting the required Image tag as per below

Below mentioned a quick code snippet which makes an ajax call to AEM sling servlet to retrieve offer image in Base-64 encoded format


By integrating decision service with an application, we can serve end-users with personalized experiences across interactions and make use of all the data associated with a user’s unified profile in Adobe Experience Platform which can help us to base our decisions on the entire interaction history spanning from behaviors detected in the past to the latest situational context.

In the above use case, we displayed the personalized banners on the website however the same service can be reused to retrieve eligible offers in Customer Journey Orchestration by setting up the data source and we can send one-to-one offer communication to customers via various channels like email and PUSH.

Follow the Adobe Tech Blog for more developer stories and resources, and check out Adobe Developers on Twitter for the latest news and developer products. Sign up here for future Adobe Experience Platform Meetups.







Jaemi Bremner

DevX and Experience Technologist. LinkedIn: @jaemibremner Twitter: @jaeness