> For the complete documentation index, see [llms.txt](https://docs.neonblue.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neonblue.ai/email-integration/braze-integration/braze-canvas-setup.md).

# Braze Canvas Setup

## Braze Canvas Setup

### Overview

Once your Braze template is Neon Blue-ready (see \[Braze Templates]), imported into the app (see \[Importing Templates to the Neon Blue App]), and the experiment using it is set-up (see \[Experiments Setup]), connect it to a Canvas to start sending experiment traffic.

***

### Prerequisites

The following Content Blocks must be synced to your Braze account:

* `nb_experiment_render` (raw variant field retrieval)
* `nb_experiment_render_content` (templated variant retrieval)

The following Email Templates must be synced to your Braze account:

* `[Neon Blue] Dynamic Experiment Template` (dynamic content & template testing)

In the Neon Blue portal, ensure:

* Your experiment has variants set to **Active**
* A **Control** variant is selected
* The experiment status is set to **Staging** (for testing) or **Active** (for go-live)

***

### Steps

For each message node that is part of the experiment you will need to:

1. Add a Neon Blue Message Node
2. Select the Neon Blue Dynamic Experiment Template
3. Update four fields with the desired values

#### Step 1 — Adding a Neon Blue Message Node

Add a **Message** node to your Canvas and select your template. Then connect it to your experiment using one of the two approaches below.

#### Step 2 — Neon Blue Dynamic Experiment Template

Use `[Neon Blue] Dynamic Experiment Template` when you want Neon Blue to handle the full email rendering.

#### Step 3 — Updating Fields

For every message node, you will need to update the 4 following fields in the template selected above with the right `experiment_slug` and `slot_key`.

## Connected Content

Every experiment on Neon Blue has an `EXPERIMENT_ID` or `EXPERIMENT_SLUG` associated with it to reference it externally. Each experiment has 1 or more slots (referenced by `SLOT_KEY`) and each variant has 1 or more fields (referenced by `VARIANT_FIELD`).

Replace the fields in the following snippet and paste it into any Connected Content enabled field to make that field experiment-enabled:

{% @neonblue-snippet/snippet-block template="{% assign experiment\_id = "{{EXPERIMENT\_SLUG}}" %}{{content\_blocks.${nb\_experiment\_render}}}{% assign nb = nb.{{SLOT\_KEY}} %}{{nb.{{VARIANT\_FIELD}}}}" %}

### Dynamic Content & Template Testing

Specifically for email, Neon Blue can render full HTML emails on a per-variant basis.

Use the `[Neon Blue] Dynamic Experiment Template` as the base template for the Canvas node.

![](https://3940235945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0In3UCjZvAgYWvb8eTzO%2Fuploads%2FBz5wjQIqIdaHPD0ezvhY%2Fimage.png?alt=media\&token=370ac35c-6ad6-4687-8537-1060f2fe1fd5)

![](https://3940235945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0In3UCjZvAgYWvb8eTzO%2Fuploads%2FYdYUWHgbgG7Sz9hA9fKi%2Fimage.png?alt=media\&token=bb0e0ebd-65c6-4a8d-aad1-6bfa84946caf)

You will need to update 4 fields:

#### HTML

{% @neonblue-snippet/snippet-block template="<!DOCTYPE html><html lang="en"><head><title>{% assign experiment\_id = "{{EXPERIMENT\_SLUG}}" %}{{content\_blocks.${nb\_experiment\_render\_content}}}{% assign nb = nb.{{SLOT\_KEY}} %}{{nb.preheader}}</title></head><body>{{nb.body\_html}}<!--{{${set_user_to_unsubscribed_url}}}--></body></html>" %}

#### Plaintext

{% @neonblue-snippet/snippet-block template="{% assign experiment\_id = "{{EXPERIMENT\_SLUG}}" %}{{content\_blocks.${nb\_experiment\_render\_content}}}{% assign nb = nb.{{SLOT\_KEY}} %}{{nb.preheader}}

{{nb.body\_text}}" %}

#### Send Settings / Subject

{% @neonblue-snippet/snippet-block template="{% assign experiment\_id = "{{EXPERIMENT\_SLUG}}" %}{{content\_blocks.${nb\_experiment\_render\_content}}}{% assign nb = nb.{{SLOT\_KEY}} %}{{nb.subject}}" %}

#### Send Settings / Preheader

{% @neonblue-snippet/snippet-block template="{% assign experiment\_id = "{{EXPERIMENT\_SLUG}}" %}{{content\_blocks.${nb\_experiment\_render\_content}}}{% assign nb = nb.{{SLOT\_KEY}} %}{{nb.preheader}}" %}

### Key Concepts

#### experiment\_slug

The external identifier for your experiment. Accepts either a UUID or a plaintext slug (e.g., `welcome-sequence-april-update`). Set during experiment creation in the Neon Blue portal.

#### slot\_key

Each experiment contains one or more slots. The `slot_key` directs the system to the correct slot's variant fields. Each slot maps to a content slot in your draft (e.g., Email 1, Email 2 in a welcome series).

***

### Testing

With the experiment in **Staging** status, send test emails from your Canvas to verify:

* The render hook is fetching content correctly
* Dynamic fields are populating as expected
* Subject line and preheader resolve properly

Once verified, set the experiment to **Active** in the Neon Blue portal to begin live assignment.

***

### Monitoring

Once the experiment is live and serving traffic, use the **Experiment Diagnostics** tab in the Neon Blue portal to monitor assignments once your Canvas is sending traffic.

***

### Next Steps

* For attribute-based variant routing, see [Braze Custom Attributes & Variant Routing](https://docs.neonblue.ai/~/revisions/ci1CQupP72b6kFr4LlWO/email-integration/braze-integration/braze-custom-attributes-and-variant-routing)
* For experiment results, see [Experiment Results](https://docs.neonblue.ai/~/revisions/P5QzffC9uE0xjEdsUyhh/experiment-results)
