Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 7th edition is out.

Hyper-personalization at Scale: Integrating Large Language Models in Adobe Journey Optimizer




Firefly hyper-personalization at scale in customer journeys using large language models 86105.jpg


In today’s fiercely competitive digital marketing landscape, delivering hyper-personalized and engaging customer experiences is the key to retaining customers, driving business growth, and creating brand loyalty. Adobe Journey Optimizer (AJO) has been an indispensable tool for marketers looking to create and manage customer journeys based on individual behavior and preferences. However, as businesses scale their marketing efforts, the need for more sophisticated personalization techniques becomes a must-have. Enter large language models (LLMs), such as OpenAI’s ChatGPT, which can generate human-like text responses tailored to specific inputs, enabling marketers to create truly contextually relevant and engaging customer interactions at scale. In this post, we will explore how to effortlessly integrate LLMs into Adobe Journey Optimizer for unparalleled hyper-personalization that sets your brand apart from the competition.

Use Cases & Examples of Hyper-personalized Customer Interactions

By integrating LLMs into AJO, marketers can take customer interactions to new heights with real-world use cases such as:

  • Engaging with your customers in a way that truly feels personalized. This will create a huge uplift in customer engagement / click rates.
  • Shift from rule-based marketing to intelligent agent engagements for product recommendations, next-best-actions (NBA), and more.
  • Make every customer communication contextually relevant and create a luxury brand feeling without the need of a team of client advisors.
  • Engage globally with a local marketing team. With the help of LLMs you can consolidate and simplify your customer journeys.
  • Make translation needs obsolete. LLMs can return messages in the customers preferred language, for all supported languages, and even adapt to local terminology and slang (if desired).

Prerequisites & Setup

To get started with integrating LLMs into AJO, you'll first need the following essential tools and platforms in place:

Integrating OpenAIs API as a Custom Action in AJO

What we aim to build in this example is a lean journey which handles the order shipped journey for customers of all countries where our example brand (Luma) is active.

Pasted image 20240423211420.png

To seamlessly integrate the OpenAI API into AJO, follow these simple steps:

  1. In AJO navigate to Configurations (under Administration) and click on Manage on the Actions pane.
  2. Click Create Action to create a new custom action.
  3. Give the action a name, we will use "OpenAI_ChatGPT4Turbo".
  4. Configure action type, channel, and marketing action.
  5. For endpoint configuration set the URL to your API endpoint: "https://api.openai.com/v1/chat/completions" and choose POST as method.
  6. Leave the header Content-Type default value (application/json) untouched.
  7. For the authentication parameters, choose "API key" as type, enter "Authorization" as name, and "Header" as location. Enter "Bearer YOUR_API_KEY" as the value.
  8. Modify the following JSON snippet according to your needs, copy it and then paste it into the editing screen for the request payload:



	"model": "gpt-4-turbo-preview",
	"messages": [
			"role": "system",
			"content": "You are Anna, a marketeer of the Luma corporation writing a text to a customer. Luma is a sports brand. The communication style of Luma is young and modern. The customer should feel that it's a personalized email from a real person, try to build a connection by finding similarities. Only provide the text for communication without title or metadata. When translating text, do not translate names and product names."
			"role": "system",
			"content": {
				"toBeMapped": true,
				"dataType": "string",
				"label": "Communication Purpose"
			"role": "system",
			"content": {
				"toBeMapped": true,
				"dataType": "string",
				"label": "Customer Details"
	"temperature": 0.7



For the model value use the appropriate one from https://platform.openai.com/docs/models/overview (here the latest GPT4 turbo model is used). Afterwards, 3 system prompts are used in this snippet. The first one sets the scene by giving information about your company (Luma in this example), the general interaction style, and instructions on how responses from the model should look like. This value is set as a constant as it is universally true and should not be modified by marketeers building journeys. The second system prompt is a variable, so modifiable when the custom action is used in the journey. It's purpose is the set the communication purpose. E.g., "You are writing a text message to a customer who recently ordered an item and you ask the person to leave a review for this item". The third and last system prompt is another variable where all communication-relevant customer details from the real-time customer profile should be entered in the journey. E.g., "Customer name: Jane Smith, Age: 35, Gender: Female, Order: Running Shoes Ultralight 2024 in Grey, text language should be: en-US".

9. For the response payload copy and paste the following JSON snippet:



	"id": "string",
	"object": "string",
	"created": "integer",
	"model": "string",
	"usage": {
		"prompt_tokens": "integer",
		"completion_tokens": "integer",
		"total_tokens": "integer"
	"choices": [
			"finish_reason": "string",
			"index": "integer",
			"message": {
				"role": "string",
				"content": "string"



10. Hit Save, you are done with the setup of the custom action.

Use the Custom LLM Action in a Journey

1. Open a journey in draft that you want to modify.

2. Find your custom action by the name given under ACTIONS.

3. Drag the custom action to the right point in the journey.

4. Set the communication purpose parameter to something fitting your journey. E.g.,



'You are reaching out to the customer to convince them to leave a review for the products he or she recently ordered. The text should be personalized and referring to the products bought.'​


5. Set the customer details parameter to include all relevant data points. E.g.,


"Customer name: "+#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}+" "+#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.lastName}+" Customer birthdate (YYYY-MM-DD): "+#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}+" Product ordered is: "+@event{OrderShipped.productListItems.at(0).name}+" Language of the text should be: "+#{ExperiencePlatform.ProfileFieldGroup.profile.preferredLanguage}


6. Add the send-out action to the journey. Edit the content and from the contextual attributes add the response from the LLM-action. The response will be an array so a for each clause is needed. E.g.,




{{#each context.journey.actions.d13e3c7b-fac8-4a81-a402-7e31ea7f4317.choices as |choice|}}



Test your Journey

Now it's time to test your journey with your test profiles. Here are some examples of personalized messages generated:

Communication for a young customer with English set as preferred language:

Pasted image 20240328132253.png

Communication for an older customer with German set as preferred language:

Pasted image 20240328133743.png

Try it out yourself!

Visit https://ajo-llm.streamlit.app and see how the communication would look like depending on different instructions and customer profiles. Please note that this app is using the GPT3.5 model and has a limited amount of credits available.

Best Practices & Considerations

When using LLMs within your customer journeys, remember these best practices and considerations:

  1. Check with your data privacy officer (DPO) which customer attributes can be used with your LLM. In this example OpenAI's API was used. In a production deployment where GDPR applies, you probably want to host your own LLM endpoint.
  2. Optimize the size of text inputs to reduce latency and token usage.
  3. Extensively test your journeys and LLM outputs. Sometimes unexpected things happen in responses, e.g., product names are translated and doesn't make sense anymore.
  4. Explore options to feed additional information into the LLM by utilizing retrieval augmented generation (RAG) and a vector database. E.g., to include your product catalog to retrieve product recommendations.
  5. Explore options to save previous customer communication so future communication can use this contextually. E.g, save LLM responses via profile update on the AEP customer profile and include the last three communications as context in your LLM.


By integrating LLMs into Adobe Journey Optimizer, marketers can revolutionize their customer interactions with unparalleled hyper-personalization at scale. This integration empowers businesses to create truly contextually relevant and engaging experiences that set your brand apart from the competition and drive lasting customer loyalty. So don't miss out on this game-changing opportunity – follow our guide, experiment with LLMs in AJO, and share your results or insights below! If you have any questions or want to discuss an implementation - reach out!