Use vars.xxx in typology rule / script on delivery? | Community
Skip to main content
Cl4ud
Level 2
June 2, 2026
Question

Use vars.xxx in typology rule / script on delivery?

  • June 2, 2026
  • 1 reply
  • 116 views

In a workflow I set a variable, e.g. vars.contentId, in a Content Management activity.
In a typology rule (JavaScript) I need this value, but vars.contentId is not available there.

Questions:

  • Can a typology rule access vars.xxx from the workflow if that value is not stored on the delivery (i.e. not mapped to a delivery attribute)?
  • If not, is it possible to add a script field on the delivery Advanced tab that would be able to read vars.xxx, or do scripts there also run only in the delivery context (no vars)?

What is the recommended way to pass a workflow variable into a typology rule?

1 reply

ccg1706
Community Advisor
Community Advisor
June 4, 2026

Hi ​@Cl4ud

 

Typology rules are applied at delivery preparation and analysis level. They are linked to the delivery or delivery template, not to the workflow activity execution. 

 

A typology rule can’t directly access vars.contentId form the workflow if that value is only stored as a workflow variable. Workflow vars belong to the workflow execution context, while the typology rule will always run in the delivery context. Therefore, the value must be stored somewhere the delivery can access. 

 

Adding a script in the Advance tab of the delivery would not normally solve this if the script runs in the delivery scenario, because it would also not automatically have access to workflow vars. However, if the script is on the workflow Delivery activity, then it can be used before preparation to copy the workflow variable into the delivery.

 

My recommendation is to pass the value before the delivery analysis starts. As an example, store vars.contentId in a custom delivery attribute, a delivery variable, or another persistent location such as a custom table linked to the delivery. Then the typology rule can read that value from the delivery context. 

 

Here I share you useful documentation to check: 

Get started with campaign typologies | Adobe Campaign

Apply typology rules | Adobe Campaign

 

Hope it helps and if not don’t hesitate to come back. 

 

Kind regards, 

Celia Castilla