AI‑assisted expression generation
Overview
You can now describe the expression you want in plain language (for example, “join these names with a comma” or “add three days to the due date”) and the editor will generate a ready‑to‑use expression for you. AI‑assisted expression generation reduces the trial‑and‑error of hand‑crafting expressions and returns readable, validated expressions that are easy to review and test.
What’s new
- Natural‑language prompts: Type what you want—operations, date math, string transforms, array handling—and the AI creates the expression that implements it.
- Scenario context aware: The AI uses your scenario’s mapped fields, field types, the destination field, and your locale and time zone settings to produce expressions that fit the current context.
- Pre‑return validation: Expressions are validated before they’re shown. We check for unsupported functions, missing arguments, unknown field references, and common array/date mistakes.
- Auto‑fixes and best practices: Common syntax errors are corrected and known workarounds are replaced with built‑in functions when appropriate.
- Regenerate on failure: If validation fails, the AI retries with targeted feedback. If it still can’t produce a valid expression, you get a clear, actionable error instead of an invalid result.
- Readable, reviewable output: Generated expressions are formatted and annotated where useful so you can quickly confirm correctness and adjust if necessary.
How it works (quick)
- Open a mapping or field transformation where expressions are allowed and click Generate with AI (or the Explain/Generate icon).
- Enter your instruction in plain language (example: “format invoice_date as YYYY‑MM‑DD and add 3 business days”).
- The AI uses the scenario context (mapped fields, types, locale/time zone, and destination constraints) to build an expression.
- The expression is validated for syntax, supported functions, and field references. If problems are found, the AI attempts targeted fixes and revalidates.
- If successful, the validated expression is shown; review, adjust if needed, and save. If not, a clear error explains why the expression couldn’t be generated so you can refine your prompt or create the expression manually.
Why this matters
- Faster authoring: Write intent, not code—save time creating transformations, date math, and array operations.
- Fewer errors: Built‑in validation and auto‑fixes reduce common syntax and reference mistakes before they reach runtime.
- Contextually correct: Expressions respect your scenario’s fields, types, and locale/time zone settings so generated results are more likely to work first time.
- Lower ramp for new users: Non‑engineers and new team members can produce correct expressions without deep knowledge of the expression language.
Getting started
- Open a mapping or transform where expressions are supported.
- Click Generate with AI (or the Generate icon) to open the prompt panel.
- Describe the transformation you want in plain language. Be specific about source fields, desired format, and any locale or timezone expectations.
- Review the generated expression and the validation messages. Save it into the mapping or edit it further if needed.
- Run a test execution to confirm behavior in your scenario and adjust if necessary.
Troubleshooting (quick)
- No Generate control visible: Ensure you’re in the new designer and your organization has AI generation enabled. If you expect the control and don’t see it, contact your admin or open a support ticket.
- Generated expression uses unexpected fields or types: Confirm the mapping’s source fields and types are correct and that the destination field constraints are set; then regenerate with a clearer prompt (for example, name the exact source field).
- Validation returns an error: The panel shows specific feedback the AI used to retry. Use that feedback to clarify your instruction or edit the expression manually. If the AI cannot produce a valid expression, it will return a clear error explaining the limitation.
- Locale/time zone mismatches: If dates or number formats appear incorrect, verify your scenario or user locale and time zone settings before regenerating.
- Concerns about sensitive data: The AI uses only the scenario metadata (field names, types, locale/time zone) and visible error/context for generation. If your organization restricts AI usage for certain data, review your admin AI/data policies before using the feature.
Documentation & support
For detailed steps and examples, see the Experience League article: Generate an expression with AI. If you encounter issues, open a support ticket via the Admin Console Support portal or post in the Experience League Community scenario editor thread.
Feedback and support
Tell us how AI‑assisted generation speeds your workflows or suggest enhancements (examples: bulk generate for multiple mappings, configurable explanation depth, or a “show reasoning” toggle) by:
- Posting in the Experience League Community scenario editor thread.
- Opening a support ticket via the Admin Console Support portal for organization‑specific requests.
Try AI‑assisted expression generation to move from intent to working expressions faster—then share what improvements you’d like next.
