Skip to content

docs: merge-tag reference — custom fields, discovery, fallbacks - #14

Open
CosmoBlk wants to merge 2 commits into
mainfrom
feat/custom-field-merge-tags
Open

docs: merge-tag reference — custom fields, discovery, fallbacks#14
CosmoBlk wants to merge 2 commits into
mainfrom
feat/custom-field-merge-tags

Conversation

@CosmoBlk

@CosmoBlk CosmoBlk commented Jul 24, 2026

Copy link
Copy Markdown
Member

Summary

The merge-tag reference, written against what actually ships: {{ data.<path> }} as the canonical custom-field syntax, the supported contact.* paths, filters and fallbacks, which connector namespaces merge and which plumbing does not, the scalar-only projection rule, and discovery via merge_tag + nitro://fields.

Every {{ contact.<custom> }} / {{ contact.data.* }} claim from the rejected round is gone — that syntax is rejected by current authoring validation.

Review fix included

A reviewer caught the page claiming every empty tag fails the recipient, directly above a contact.first_name example that actually renders blank. The namespaces genuinely differ — a missing data.* tag hard-fails that recipient via Email::MergeArtifactGuard, a missing built-in contact.* tag renders as an empty string — and the page now says so. The advice is unchanged: give any sparse field a fallback.

Test plan

  • No contact.data. syntax survives anywhere in the docs
  • The reference documents the canonical {{ data. syntax
  • Merges last: api#278 → app#154 → app#157 → docs#14

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nitrosend-docs Ready Ready Preview, Comment Jul 26, 2026 11:52pm

Request Review

The personalization section taught one example and left everything else to be
guessed at, which is how an operator ends up inventing a tag the engine
rejects.

Documents the real grammar: the supported contact.* paths, the data.* namespace
for custom fields and connected-tool data, which fields deliberately come back
unmergeable and why, filters, and discovery through the editor's field picker
or GET /v1/my/contacts/fields.

Two things it is careful to state plainly. A tag with no value is an error, not
a blank — the send fails for that recipient rather than delivering "Hi ," — so
enrichment fields want a fallback. And transactional data.* is the caller's own
per-send payload, not stored contact data; conflating the two is the easiest
way to write a transactional template that silently never personalizes.
@CosmoBlk
CosmoBlk force-pushed the feat/custom-field-merge-tags branch from b0baa37 to 938cf05 Compare July 26, 2026 06:18
@CosmoBlk
CosmoBlk marked this pull request as ready for review July 26, 2026 06:19
F28: the reference claimed every empty tag fails the recipient, next to
a contact.first_name example that actually renders as an empty string.
The namespaces differ and now the page says so; the advice (always give
a sparse field a fallback) is unchanged.

@auscaster auscaster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not safe to merge against current product truth yet. Three concrete corrections: (1) “Available filters” is incomplete—Email::VariableInterpolator::SUPPORTED_FILTERS currently includes default, upcase, downcase, capitalize, number, currency, percent, date, datetime, and boolean; either project the complete canonical grammar or avoid an exhaustive claim. (2) “Test sends and previews render … against a real contact” is false by default: Email::TestSender uses an owner proxy unless contact_id/sample_contact_id is supplied; document the selected-contact condition. (3) hold publication until nitrosend/nitrosend#406 and #408 are deployed, because filtered tags and data values in hrefs are not yet reliable in production. The rest of the namespace/fallback description matches current main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants