On this page: Learn how to create code-based experiences in a journey or campaign and edit their content using the personalization editor.

In Journey Optimizer, you can create code-based experiences in a journey or a campaign.

Add a code-based experience through a journey or a campaign

To start building your code-based experience through a journey or a campaign, follow the steps below.

To add a code-based experience activity to a journey, follow these steps:

  1. Create a journey.

  2. Start your journey with an Event or a Read Audience activity.

  3. Drag and drop an Action activity from the Actions section of the palette. Learn more about the Action activity.

    IMPORTANT
    Legacy native channel activities (Email, Push, Mobile, In-app, Web, Code-based experience, and Content Card) are deprecated as of the March 2026 release. Existing journeys using these activities continue to work without any changes—no migration is required.
  4. Select Code-based experience as the action type.

    NOTE
    As Code-based experience is an inbound experience activity, it comes with a 3-day Wait activity. Learn more
  5. Enter a Label to identify your action in the journey canvas.

  6. Click the Configure action button.

  7. You are directed to the Actions tab. From there, select or create the code-based experience configuration to use. Learn more

    NOTE
    When you have multiple code-based experience actions using the same channel configuration, the journey’s Priority score determines what is delivered to the end-user if they qualify for more than one action. Learn more on priority scores
  8. Select the Edit content button and edit your content as desired using the personalization editor. Learn more

    You can also use an existing content template as a basis for your code content. Note that the templates available to choose are scoped to either HTML or JSON based on the channel configuration that has been chosen beforehand. Learn how to use content templates

  9. You can add one or more inbound actions to your code-based experience by clicking the Add action button. Learn more

  10. Go back to the journey canvas. If necessary, complete your journey flow by dragging and dropping additional actions or events. Learn more

For more information on how to create, configure and publish a journey, refer to this page.

To start building your code-based experience through a campaign, follow the steps below.

  1. Create a campaign. Learn more

  2. Select the Scheduled - Marketing campaign type.

  3. Complete the steps to create a campaign, such as the campaign properties, audience, and schedule. For more information on how to configure a campaign, refer to this page.

    CAUTION
    Custom upload (CSV) audiences are not supported for code-based experiences. Learn more
  4. Select the Code-based experience action.

  5. Select or create the code-based experience configuration to use. Learn more

    NOTE
    When you have multiple code-based experience actions using the same channel configuration, the campaign’s Priority score determines what is delivered to the end-user if they qualify for more than one action. Learn more on priority scores
  6. Edit your content as desired using the personalization editor. Learn more

    You can also use an existing content template as a basis for your code content. Note that the templates available to choose are scoped to either HTML or JSON based on the channel configuration that has been chosen beforehand. Learn how to use content templates

For more information on how to create, configure and activate a campaign, refer to this page.

➡️ Learn how to create a code-based experience campaign in this video

Edit the code content

To edit the content of your code-based experience, follow the steps below.

  1. From the journey activity or the campaign edition screen, select Edit code.

    NOTE
    If you are using a code-based experience content template with predefined editable form fields, you can manage the content of these fields without opening the personalization editor. Learn more
  2. The personalization editor opens. It is a non-visual experience creation interface which allows you to author your code.

  3. You can switch the authoring mode from HTML to JSON, and vice versa.

    CAUTION
    Changing the authoring mode will result in losing all of your current code, so make sure to switch modes before you start authoring.
  4. Enter your code as needed. You can leverage the Journey Optimizer personalization editor with all its personalization and authoring capabilities. Learn more

  5. You can add HTML or JSON expression fragments if needed. Learn how

    You can also save part of your code content as a fragment. Learn how

  6. With code-based experiences, you can use the Decisioning feature. Select the Decision policy icon from the left bar and click Add decision policy. Learn more

    From the journey or campaign edition screen, you can also directly add a decision policy without opening the personalization editor. Use the dedicated icon on the right rail to display the Decisioning section.

    Decisioning section displayed in the right rail of a code-based experience campaign.

    If a decision policy is already associated with your code-based experience, for example through a content template, the Decisioning section displays it. You can then change or edit it from there, without opening the code editor. Learn more

    The detailed steps to create a decision policy are presented in this section.

  7. Click Save and close to confirm your changes.

Now as soon as your developer makes an API or SDK call to fetch content for the surface defined in your channel configuration, the changes will be applied to your web page or app.

How-to video

The video below shows how to create a code-based experience campaign, configure its properties, test, and publish it.

AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: In Journey Optimizer, you can create code-based experiences in a journey or a campaign and edit their code content using the personalization editor.

Intents:

  • Add a code-based experience to a journey with an Action activity, selecting Code-based experience as the action type.
  • Create a code-based experience campaign with the Scheduled - Marketing campaign type.
  • Select or create the code-based experience configuration to use.
  • Author code in the personalization editor in the HTML or JSON authoring mode, optionally starting from an existing content template.
  • Add HTML or JSON expression fragments, or save part of the code content as a fragment.
  • Add a decision policy to a code-based experience, from the personalization editor or from the Decisioning section of the journey or campaign edition screen.

Glossary:

  • Code-based experience configuration (product-specific): The channel configuration selected or created when you add a code-based experience to a journey or a campaign. It defines the surface for which a developer makes an API or SDK call to fetch content.
  • Label: The text entered in a journey to identify the code-based experience action in the journey canvas.
  • Personalization editor (product-specific): A non-visual experience creation interface which allows you to author your code, with all the Journey Optimizer personalization and authoring capabilities.
  • Authoring mode: The format used to author code in the personalization editor: HTML or JSON. You can switch from HTML to JSON, and vice versa.
  • Priority score (product-specific): When you have multiple code-based experience actions using the same channel configuration, the Priority score of the journey or of the campaign determines what is delivered to the end-user if they qualify for more than one action.
  • Decisioning section (product-specific): The section displayed with the dedicated icon on the right rail of the journey or campaign edition screen. You can directly add a decision policy there without opening the personalization editor. If a decision policy is already associated with the code-based experience, for example through a content template, the Decisioning section displays it, and you can change or edit it from there without opening the code editor.
  • Editable form fields (product-specific): Predefined fields of a code-based experience content template. You can manage the content of these fields without opening the personalization editor.

Guardrails:

  • Changing the authoring mode will result in losing all of your current code, so make sure to switch modes before you start authoring.
  • The content templates available to choose are scoped to either HTML or JSON based on the channel configuration that has been chosen beforehand.
  • When you create a code-based experience campaign, Custom upload (CSV) audiences are not supported for code-based experiences.
  • Legacy native channel activities (Email, Push, Mobile, In-app, Web, Code-based experience, and Content Card) are deprecated as of the March 2026 release. Existing journeys using these activities continue to work without any changes, and no migration is required.

Terminology:

  • Canonical name: Adobe Journey Optimizer — Acronym: AJO — variants: Journey Optimizer

FAQ:

  • Which campaign type do I select to create a code-based experience campaign? Select the Scheduled - Marketing campaign type.
  • What happens if I change the authoring mode after I start authoring? Changing the authoring mode will result in losing all of your current code, so make sure to switch modes before you start authoring.
  • What determines what is delivered when multiple code-based experience actions use the same channel configuration? The Priority score of the journey or of the campaign determines what is delivered to the end-user if they qualify for more than one action.
  • Does a code-based experience in a journey come with a Wait activity? Yes. An Action activity with Code-based experience selected as the action type is an inbound experience activity and comes with a 3-day Wait activity.
  • Can I add a decision policy without opening the personalization editor? Yes. From the journey or campaign edition screen, use the dedicated icon on the right rail to display the Decisioning section and add a decision policy there.
  • When are my code-based experience changes applied? As soon as your developer makes an API or SDK call to fetch content for the surface defined in your channel configuration, the changes are applied to your web page or app.

Related pages:

Personas:

  • marketer: Can add a code-based experience to a journey with an Action activity, selecting Code-based experience as the action type and entering a Label. Can create a code-based experience campaign with the Scheduled - Marketing campaign type. Can author code in the personalization editor in the HTML or JSON authoring mode. Can add a decision policy from the personalization editor or from the Decisioning section of the journey or campaign edition screen. The page states that changing the authoring mode will result in losing all of your current code. Where: “Intents”.

Onboarding:

  • Level: Experienced
  • First minimal step: Create a journey or a campaign.
  • Success check: Your developer makes an API or SDK call to fetch content for the surface defined in your channel configuration. As soon as this happens, the changes will be applied to your web page or app.
  • Previous: Before adding a code-based experience to a journey, create the journey: Create a journey

Announcements

Get hands-on with agentic AI.

Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.

Find an event

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.

Ask AI