[Beta]{class="badge informative" title="This feature is currently in a limited beta release"}

Script Builder

Script Builder is an AI-powered assistant available in the Adobe Journey Optimizer B2B Edition email design space. It helps marketers and email developers create personalization scripts faster, and it helps with migrating from Marketo Engage by converting existing personalization logic into Journey Optimizer B2B Edition without rewriting code manually.

AVAILABILITY
Script Builder is currently available to select customers as a limited beta release for emails in account journeys only. Support for person journeys is planned for a future release. To get access, contact your Adobe representative.

Building conditional email personalization, such as switching language blocks by locale, swapping content by region or persona, or inserting dynamic profile or custom object values, requires authoring Handlebars expressions. If you migrate from Marketo Engage, you have the added challenge of rewriting Velocity scripts line by line. Script Builder addresses both obstacles from a single conversational interface:

  • Generate a new Handlebars personalization script from a plain-language description.
  • Paste a Marketo Engage Velocity script and convert it into an equivalent Handlebars script with automatic token mapping.
  • Preview, edit, validate, and save the output directly into the email, without copying and pasting between tools.

Guidelines and limitations

IMPORTANT
User access to Script Builder is controlled through the same permissions used for other generative AI capabilities in Journey Optimizer B2B Edition. For information about granting feature permissions, see Enable AI Assistant access.

Before you use Script Builder, review the guidelines and limitations that apply to generative AI features in Journey Optimizer B2B Edition. User agreement acceptance is also required before you can use AI capabilities.

Familiarize yourself with the Handlebars templating language, the personalization syntax, and the helper functions supported in Journey Optimizer B2B Edition. Script Builder generates valid Handlebars for you, but understanding the syntax helps you review and edit the output with confidence.

Open Script Builder open-script-builder

Script Builder is available from the personalization editor while you author email content for an account journey.

  1. In the email design space, select the component where you want to add or replace a personalization script.

  2. To open the personalization editor, click the Add personalization ( Add personalization icon ) icon.

  3. In the editor, select Script Builder.

    Personalization editor - select Script Builder {width="700" modal="regular"}

    [!BEGINSHADEBOX]

    The first time you access Script Builder, review the Generative AI Terms of Use and confirm your agreement.

    Generative AI Terms of Use agreement dialog in Script Builder {width="400"}

    The Script Builder panel opens with a conversational chat interface.

    Personalization editor - Script Builder panel {width="700" modal="regular"}

  4. Start the chat according to what you want to do:

Generate a personalization script generate-personalization-script

Use Script Builder to create a new Handlebars personalization script from a plain-language description, without writing the expression yourself.

Script Builder includes a mapping library that resolves Marketo Engage lead and account fields to their equivalent Journey Optimizer B2B Edition XDM profile attributes, based on the XDM field mapping defined for your organization.

  1. In the Script Builder chat interface, describe the personalization logic that you want.

    For example, describe the attribute, custom object, or condition that determines which content variant to display.

  2. Review the generated Handlebars script in the preview pane.

  3. Edit the script directly in the preview pane if you want to refine the logic or wording.

  4. Click Validate to check the script against the Journey Optimizer B2B Edition schema.

    Validation catches syntax errors and unresolved token references before you save the script, so that broken personalization is never published to a live email.

  5. Click Save to insert the script directly into the selected location in the email.

Convert a Marketo Engage Velocity script convert-marketo-velocity-script

Use Script Builder to migrate an existing Marketo Engage Velocity script into an equivalent Handlebars script for Journey Optimizer B2B Edition.

  1. In the Script Builder chat, enter Convert this and paste the Velocity script that you want to convert.

    Script Builder parses the Velocity constructs, matches the token references to XDM profile attributes, and generates the equivalent Handlebars script.

  2. Review the conversion report and resolve any tokens that need manual mapping.

  3. Preview and validate the generated script, then save it directly into the email.

Supported Velocity constructs supported-velocity-constructs

Script Builder converts the following Marketo Engage Velocity control-flow constructs into their equivalent Handlebars or Conditional Content expressions:

Velocity construct
Handlebars or Conditional Content equivalent
#if / #elseif / #else
Handlebars {{#if}}, {{else if}}, and {{else}} block helpers, or an Journey Optimizer B2B Edition conditional content rule
#set
A Handlebars variable assignment within the generated script

It translates segment-based conditional logic into conditional content rules that replicate the branching behavior, including emails with many language-variant blocks.

If a Velocity construct has no direct Handlebars or Conditional Content equivalent, Script Builder flags it in the conversion report instead of generating an incomplete or incorrect expression.

Review the conversion report review-conversion-report

After each conversion, Script Builder surfaces a structured report that lists:

  • Tokens that were successfully mapped.
  • Tokens that require manual resolution.
  • Velocity constructs with no direct Handlebars equivalent.

Use the report to confirm that the conversion is complete before you resolve any remaining tokens and save the script.

Resolve tokens without a mapping resolve-tokens-without-mapping

For tokens that are not in the mapping library, such as custom lead attributes or custom Marketo Engage objects, Script Builder attempts to resolve a mapping in the following order:

  1. It suggests a likely mapping based on the available XDM fields and, for custom objects, the model-based classes configured for your organization, when a confident match exists.

  2. If it cannot suggest a confident match, it asks you for the correct mapping in the chat.

When you confirm a mapping for a token that was not in the library, Script Builder asks whether you want to remember the decision. If you agree, the mapping is remembered for the source Marketo Engage instance, identified by its Munchkin ID, so that the same token resolves automatically the next time you convert a script from that instance.

Preview and validate the script preview-validate-script

Before you commit a conversion, Script Builder displays a side-by-side preview of the original Velocity script and the generated Handlebars output, with inline editing support. Use the preview to compare the two versions and make any adjustments directly in the generated script.

Click Validate to check the generated Handlebars against the Journey Optimizer B2B Edition schema. Validation runs again when you save, so that broken personalization is never published to a live email.

When you are satisfied with the result, click Save to insert the script directly into the chosen location in the email.

recommendation-more-help
journey-optimizer-b2b-help-user