Campaign Variables
Campaign variables are the runtime data model used by ResultFly flows.
They still exist and they still matter, but they should not be confused with the CDP.
What They Are
Campaign variables are declared values used by runtime logic to make decisions inside campaigns.
ResultFly exposes two business scopes:
state.user_global.*state.user_campaign.*
These scopes are useful for deterministic flow execution, limits, counters, and campaign-level branching.
What They Are Not
Campaign variables are not:
- the customer profile
- the communication channel model
- the ingest event history
- the segment definition model
If a team is trying to answer “who is this customer?” or “which audience does this customer belong to?”, that is CDP territory, not variable design.
When to Use Variables
Use campaign variables for values such as:
- attempts left in a campaign
- progress through a multi-step flow
- counters used by a specific mechanic
- temporary flags needed by runtime branching
Use CDP entities for values such as:
- loyalty status
- known communication channels
- customer event history
- derived spending metrics
- reusable segment membership logic
Why This Separation Matters
Keeping runtime variables separate from CDP data makes both layers easier to manage:
- campaign logic stays predictable
- segments stay business-readable
- export contracts stay cleaner
- developers know which API surface to use
For endpoint details, see API Reference → Campaign Variables.