Sample data
Sample data lets your team inspect an email before choosing to send it. Use a representative customer and the fields the template expects, then check the rendered subject, content and links. A sample is review material; real recipient data is resolved for the actual send.
What an email needs
Every email template lists the information it needs, and it can only reference what is on that list. A welcome email needs a contact. A receipt might need a contact, an order, and a list of items. The template reference calls this list expectedDataRepresentation; a send supplies matching keys under data.
Each entry is either a record or a plain JSON value.
| Type | Fields | Sample value |
|---|---|---|
record | key, schema (the schema's slug), isArray, description | A record from that schema (contact, object, or event), or a list of them. |
json | key, jsonSchema, description | A plain value matching the JSON schema. |
Your sample is a JSON object with one key per entry. Each value has to fit: required fields present, the right types, and any constraint honored (a set list of allowed values, an email format). Where a value does not fit, that part of the preview cannot render.
maxclicks adds a branding entry (your brand, brand kit, colors, and fonts)
when it renders. It is reserved and appears in the editor as a note you cannot
edit. Do not set it in your sample.
Where you edit it
Open the editor’s Data tab. The upper section lists the email’s expected properties and To recipient (called recipientDataPath in the reference). The Sample section below it holds the record pickers.
Choose Edit as JSON to open the raw sampleDataStringified value in a JSON5 editor, with record pickers and AI generation controls. Choose Hide JSON to return to the compact sample view. Editing the JSON changes the preview, not the selected customer record.
Using a real record
In both views, each record entry has a picker listing records from its schema. Pick one and its fields are written into the sample under that entry's key. Contact and object entries you have not chosen yet fill themselves with the first available record, so the preview starts populated. Event entries are left for you to choose. Opening Edit as JSON fills anything still empty, events included, with a record picked at random from the first ten.
Edit as JSON also has a shuffle control that refills every record entry at once. In the sample pickers, an entry whose schema holds no records shows a Generate action instead of a picker.
The record's stored writable fields are copied across as they are. Evaluated fields and computed attributes follow the expansion ticks: evaluated fields run their lookup, while computed attributes read the latest published value for this standalone sample. A missing calculation can be null; a stale calculation can carry an older value. Unselected fields are not available for personalization. Tick a field after choosing a record and the editor refreshes the sample’s expansion.
Generating with AI
The editor can write the sample for you. In Edit as JSON, open Generate sample data by AI. It reads the list of what the email needs and your schemas, then invents believable values: names, dates, emails, all within the limits each field allows. maxclicks checks the result against that list before accepting it.
The dialog has an optional prompt field. Leave it blank for ordinary data, or describe the scenario you want:
Generate data for a user who just signed up, include a welcome offer code.
The Generate action beside a single entry (shown when its schema holds no records) fills that one entry, with no prompt.
Generating a sample is an AI action and spends credits from your space. Writing or editing the JSON by hand costs nothing.
Build a useful review set
Use real records to test your data mapping and invented samples to test edge cases. An AI-generated record is not evidence that a matching contact or order exists, and editing the sample does not update your customer records.
For a win-back email, review a frequent buyer, an occasional buyer and a contact with no usable purchase history. Include missing first names, empty related-record lists and unavailable computed values. Give Liquid a fallback and give Adaptyle explicit instructions for missing context.
Generate the personalized preview again after changing the sample. Send test sends the rendered sample to your chosen test address; it does not run the production recipient lookup or prove that the recipient has marketing consent. See the editor’s test-send behavior.
Keeping the sample in sync
What the email needs, and who it is addressed to, can drift away from where it is being sent. A broadcast fixes both to the contact in its audience, so the editor shows:
- Data out of sync: a Sync data properties action that resets the list to match the audience.
- Sync recipient: appears when the email is addressed to something other than the audience contact.
A standalone template sets its own list and its own recipient, so neither is forced.
Why a later refresh may not change an active send
A standalone sample can read the latest published computed values. A broadcast revision or root workflow run instead captures the published calculation generations on its first read; child runs inherit that snapshot. Publishing a newer calculation does not replace the values already selected for that execution.
A calculation that was unavailable when that snapshot was captured remains unavailable there. If the captured generation is erased or no longer usable, execution reports an error rather than silently switching to a newer value. Compare the sample and the execution’s data context when investigating different results. See attribute expansion.
Related
- Liquid: reference record fields in content.
- Adaptyle: AI personalization on top of the template.
- Schemas and attributes: where the records in a sample come from.