Skip to content

Override variables per target

Variable overrides let you change specific values for a Publication target settings without creating a separate Create variable sets. This is useful when a target needs one or two different values but shares everything else with an existing set.

Before you begin

Add an override

  1. Open your Create and organize a map and scroll to Publication Targets.

  2. Click the target you want to configure.

  3. In the target settings, find the Variable Overrides section.

  4. Add an override: enter the variable key and the override value.

The override value replaces the set's value only for this target. All other variables from the set remain unchanged.

Overrides take precedence over the variable set. During publishing, the The publishing pipeline resolves each variable token by first checking for a target-level override, then falling back to the variable set's value.

For example, if the "Production" variable set contains:

{
  "product_name": "Acme Pro",
  "support_email": "help@acme.com",
  "api_base_url": "https://api.acme.com"
}

And a staging target adds this override:

{
  "api_base_url": "https://api-staging.acme.com"
}

The staging target resolves api_base_url to the override value while product_name and support_email come from the original set.

When to use overrides vs. new sets

Scenario

Approach

Reason

One or two values differ for a specific target

Override

Avoids duplicating an entire set for minor differences

Most values differ between targets

New variable set

A full set is clearer than a set with many overrides

Temporary change for a staging or preview target

Override

Easy to add and remove without affecting other targets

Distinct product editions with different names, URLs, and version numbers

New variable set

Each edition deserves its own clearly named set

Use overrides for environment-specific differences (staging URLs, test email addresses) while keeping your named variable sets aligned with product editions or audience segments.

Remove an override

Delete the override entry from the target settings. The variable reverts to the value from the target's selected variable set.

Removing an override immediately affects the next publish for that target. If the overridden value was critical (e.g., an API URL), verify the fallback value in the variable set is correct before removing the override.


See also

Was this page helpful?