For the complete documentation index, see llms.txt. This page is also available as Markdown.

Expression

Use custom JavaScript expressions when connector logic cannot be represented by fields or direct edits

Use an Expression connector when a connector needs custom JavaScript to calculate a value or control an interaction. Expressions are best for logic that cannot be represented cleanly with a single Dynamic Data field, Live Control value, or direct edit.

Shared Studio connector detail panel showing the expression source tab beside data, live control, and edit source options

Options

Option
What it controls
Notes

Target connector or layer

The value, layer, or interaction affected by the expression.

Confirm the expression is attached to the right connector type.

Input data

Dynamic Data, Live Control, or other values referenced by the code.

Keep input field names aligned with the project data schema.

JavaScript code

The custom logic used to return a value or trigger behavior.

Keep the code focused on the connector's job.

Fallback behavior

What happens if the expression returns an empty or invalid value.

Define a safe default before publishing.

Platform editing

Whether any connected values should be editable from Platform.

Avoid exposing code-like controls to operators unless the workflow is designed for it.

Internal description

A note explaining the expression purpose.

Include the business rule, not just the implementation detail.

When to Use an Expression

Use an expression when you need to:

  • Combine multiple fields into one output.

  • Format values in a way the connector options do not support.

  • Choose different text, media, color, frame, or visibility behavior from multiple inputs.

  • Add custom interaction logic.

  • Reuse a business rule that depends on more than one runtime value.

Use Data, Edit, or Live Control instead when a simple field or direct value can do the same job. Simpler connector sources are easier to preview, operate, and maintain.

Configure an Expression

1

Define the Desired Output

Write down what the expression must return or trigger, including the fallback behavior.

2

Confirm Input Fields

Check that every field referenced by the expression exists in Dynamic Data, Live Control, Catalog, or the integration payload.

3

Add the JavaScript

Add the code in the connector expression area and keep it limited to the current connector behavior.

4

Test Normal and Missing Values

Preview values that should pass, values that should branch differently, and missing or invalid values.

5

Document the Rule

Add an internal description so future editors understand why the expression exists.

Success Checks

Before publishing an Expression connector, confirm:

  • The expression handles missing, empty, and unexpected values.

  • Every referenced field exists in the data setup.

  • The output matches the expected type for the connector.

  • The expression does not duplicate logic that could be handled by a simple field or live control.

  • QA has previewed each meaningful branch of the expression.

Data in Studio

Last updated