Insights

The Canvas That Remembers

How journey-scoped memory changes the way we build in Braze: making content variation much easier than before.

The cavas that remembers

There is a pattern that shows up in almost every Braze implementation where a brand wants to serve varied content across a multi-step lifecycle journey.

The brief is usually simple. Across the touchpoints in a re-engagement sequence, show each user one of the content options available at each step. Rotate through the options, do not repeat, and every user should see all of them eventually, but not necessarily in the same order.

The traditional implementation approach for this use case is not always straightforward.

Audience Paths. One per variant. Four content options become four branches, four message steps, four QA cycles. A segment condition at each fork deciding which user goes which way. And a nagging problem underneath all of it: what the segment is actually tracking is not a durable user property. It is an operational state dressed up as audience data and written onto the profile where it does not belong.

The standard approach has been answering the wrong question. It asks: which users should see which variant? Canvas Context lets us ask the right one: what has this user already seen, and what should they see next?

Canvas Context closes the gap that made the first question the only option. It gives Canvas journeys a memory layer through a set of variables scoped to a single Canvas session, readable and writable at every step, that expire cleanly when the journey ends and writes nothing to the user profile.

What follows explores what that enables architecturally, what it changes operationally, and why the shift matters beyond this specific use case.

The Problem With Segments as State

To understand why Context matters, it helps to be clear about what segments are for and what we have been asking them to do instead.

Segments are audience filters. They answer the question: which users share a durable characteristic relevant to this campaign?

  1. Lapsed for 90 days

  2. Located in EMEA

  3. Has purchased in the last 30 days

These are properties of users that persist meaningfully, that inform strategy, that belong on the profile.

The state we create to manage a content rotation is none of those things. Whether a user has already seen the editorial variant in the current journey is not a characteristic of the user. It is a property of this execution. It expires the moment the journey ends; it has no analytical value outside of that context. Storing it as a custom attribute pollutes the profile with operational noise and creates a cleanup problem, because without intervention, it persists indefinitely.

Teams have been leveraging segments and attributes here because there was nowhere else for this kind of state to live. Canvas had no journey-scoped memory. The profile was the only persistent layer available. So that is where the state went, despite being the wrong place for it.

Custom attributes are for durable, profile-level, analytically relevant user properties. A flag marking which marketing hook a user saw on Tuesday in a Canvas they will exit by Friday is none of those things.

Canvas Context provides the right layer. A state that is temporary, journey-scoped and operationally relevant, but not analytically durable, now has somewhere appropriate to live. The question shifts from "how do we store this without creating complexity" to "where does this data actually belong".

How the Architecture Actually Works

The solution uses the Canvas Context component to maintain a single variable across the steps of a linear, single-entry Canvas. The structure is deliberately simple.



The Canvas is linear

Every user takes the same path. There are no Audience Paths. There are no Decision Splits. The Canvas flows:

Canvas flowA Context step fires immediately before every message step. It does two things in one operation: selects the next unseen content option from the remaining pool, and records the selection so the pool is smaller when the next Context step runs. The message step that follows simply renders what the Context block just selected.

There are no User Update steps or webhooks. Nothing writes back to the user profile.



The Context variable is the memory

The component maintains a single shown variable, which holds a comma-separated string of the content identifiers already served to this user in this journey run.

  • At step 1, shown is empty. All four variants are available. The Context block selects one, renders it through the message step, and appends the selection to shown.

  • At step 2, shown contains one identifier. Three remain. The Context block builds the available pool by excluding what is already in shown, selects randomly from what is left and appends again.

  • By step 4, exactly one variant remains. The selection is guaranteed. No guard clause is needed. The Liquid cannot pick a repeat because the repeat is not in the pool.



The Liquid logic at each Context block

{% comment %} Define the content pool — Liquid array or Catalog key list {% endcomment %}
{% assign all = "editorial,recommendation,reward,offer" | split: "," %}


{% comment %} Read what has been shown so far in this journey {% endcomment %}
{% assign shown_array = context.${shown} | default: "" | split: "," %}


{% comment %} Build the remaining pool by excluding already-shown options {% endcomment %}
{% assign available = "" %}
{% for v in all %}
  {% assign already_shown = false %}
  {% for s in shown_array %}
    {% if s == v %}{% assign already_shown = true %}{% endif %}
  {% endfor %}
  {% unless already_shown %}
    {% assign available = available | append: "," | append: v %}
  {% endunless %}
{% endfor %}


{% comment %} Randomise from remaining pool using epoch seconds as seed {% endcomment %}
{% assign pool = available | split: "," %}
{% assign seed = 'now' | date: '%s' | modulo: pool.size %}
{% assign selected = pool[seed] %}


{% comment %} Update shown for the next Context block to read {% endcomment %}
{% assign updated_shown = context.${shown} | default: "" | append: "," | append: selected %}

The message step renders {{context.${shown}}} or uses it as a lookup key into a Braze Catalog.



One implementation note worth calling out

The seed uses epoch seconds (%s) rather than nanoseconds (%N) to provide sufficient entropy for a pool of this size, this removes a risk of producing identical indices across users.

The comma-separated string pattern throughout is idiomatic Braze Liquid. There is no native array type. The pool is stored as a string, materialised into an array using split when iteration or indexing is needed and rebuilt using append. This is the standard approach and works reliably across all Canvas step types.

Per-User Randomisation Without Segments

The property that makes this architecturally interesting is that the randomisation is per-user and independently seeded, without any audience logic to achieve it.

SegmentsTwo users entering the same Canvas simultaneously will receive different content sequences. The epoch second seed is different, making the index into the pool different. The selection is different, and neither user needs to be in a different segment to receive a different experience.

Across four steps with four variants, both users see all four options exactly once. User A might see editorial, then reward, then recommendation, then offer. User B might see recommendation, then editorial, then offer, then reward. What differs is the runtime state of the Context variable, and that state is entirely private to each user's session.

This is what journey-scoped memory enables: individual, non-repeating, randomly ordered experiences across a shared Canvas path with no segment conditions, no profile writes, and no cross-user state.

The conventional approach would have required four segments and four branches to achieve something broadly similar, and even then, the randomness would have been approximate at best, governed by segment membership rather than runtime selection.

The Content Source Is Interchangeable

The variant identifiers in the pool are keys that help us identify the content to be sent to the users, and they can adopt the following patterns:

  1. A Liquid array: The identifiers can map to Content Blocks, Liquid conditionals, or hardcoded copy within the message step. The content lives in Braze, and updates to it require a Canvas or Content Block edit. This is the right approach for smaller, stable creative sets where the Canvas is owned by the same team managing the content.

  2. A Braze Catalog: The identifiers can be catalog row IDs. The message step uses the selected identifier to look up a row in the catalog and renders the relevant columns. The creative lives in the catalog, and the Canvas is never touched when content is refreshed. This is the preferred pattern in production for any team where creative refresh cycles faster than Canvas release cycles, which is most brand teams. Seasonal copy, A/B subject line tests, offer value updates: all happen in the catalog without triggering a Canvas re-QA. The Canvas architecture becomes a durable delivery mechanism, not a content management surface.

What This Removes From the Build

The operational implications are worth making explicit, because this is where the business case sits.

  1. No Audience Paths or Decision Splits for Message Copy Control. The routing logic lives in Liquid, not in Canvas architecture

  2. No User Update steps, the shown variable never touches the user profile

  3. No webhooks, no external system is involved in tracking or resetting the rotation state

  4. No cleanup Canvases, because the state lives in the Canvas session and expires with it, there is nothing to reset

  5. One message step to QA. One path means one QA cycle, regardless of how many content variants exist

  6. One line to add a variant, extending from four options to five is a string edit at the top of the Context block

In the traditional segment-driven model, every new content variant requires a new segment, a new Audience Path branch, a new message step, and a new QA pass. The cost of extending the creative set is architectural. In this Context-driven model, the cost is a comma and a new identifier. The Canvas does not change, the QA is not impacted., and the creative team can iterate without waiting for an architect.

The Trade-off Worth Naming

The single-message-step architecture that makes this pattern so straightforward to build and QA has one genuine cost: per-variant impression analytics at the Braze dashboard level.

In a segment-driven Canvas with four branches, each branch is a distinct message step. Braze's native reporting can tell you how many users opened the editorial variant, how many clicked the loyalty reward, and how each creative performed independently. The analytics are built into the structure.

In the Context-driven Canvas, a single message step renders whichever variant was selected. Braze sees one step. Click-through data still flows, and downstream conversion events are unaffected, but per-variant open and impression breakdowns are not available in the Canvas analytics panel directly.

This matters less than it might appear in the use case this pattern is optimised for. Content rotation for freshness is not an A/B test. The goal is preventing a user from seeing the same creative twice within the same journey, not measuring which hook performs best. Where the measurement question is "did the journey work" rather than "which variant worked," the analytics trade-off is acceptable.

Where it does matter, when variant-level impression data is a hard reporting requirement, the two paths remain open. The segment-driven architecture is still the right choice for that problem. Alternatively, the selected message can also be tracked as message extras at the point of send, and the attribution per-variant picture can be mapped with downstream reporting through Currents or Snowflake Data Sharing.

The choice is not between this pattern and perfect analytics. It is between architectural complexity with native reporting and architectural simplicity with recoverable reporting. Knowing which trade-off fits the brief is the architect's call.

The Broader Principle

Content rotation is one instance of a more general problem: journey state that is temporary, execution-scoped and irrelevant outside the current Canvas run.

The absence of a journey-scoped memory layer meant that all state, regardless of its actual scope and lifetime, had to be externalised to the only persistent layer available, the user profile. This created architectural pressure to use segments and attributes for things they were never designed for.

Canvas Context changes the design calculus. For any piece of information that needs to survive across steps within a journey but does not need to persist beyond it, there is now the right layer. That covers a wider range of patterns than content rotation:

  1. Entry-time data capture: An API-triggered Canvas can store booking details, flight times, or appointment metadata in Context at entry, making them consistently available across all downstream steps without the risk of the source attribute changing mid-journey.

  2. Computed personalisation: A value derived from Liquid logic, i.e. a formatted greeting, a calculated discount tier, a dynamically constructed product list, can be computed once in a Context block and referenced consistently across multiple message steps, rather than being recalculated at each one.

  3. Journey-local scoring: An engagement or propensity score computed at Canvas entry can inform both the routing logic and the message copy without being written to the profile as a durable attribute.

In each case, the question is the same: does this piece of data need to outlive this Canvas entry? If not, Context is the right layer. Custom attributes are for durable, profile-level, analytically relevant properties. Context variables are for everything else.

The Canvas did not get smarter. It got memory. Establishing the right place for temporary state has significant implications for how journeys can be designed


This article expands on a solution originally posted on Braze Bonfire as part of the Community Canvas Challenge 2026. You can view the original community post here.


Report
27 Min Read May 19, 2026
ACX OG image

The ACx Report

The state of Agentic Customer Experience — how agentic intelligence is reshaping the way the world's best brands connect, convert and compete.
Read more
 

We respect your privacy

We and selected third parties use cookies or similar technologies for technical purposes and, with your consent, for other purposes as specified in the cookie policy. Denying consent may make related features unavailable.