Deploy and send a custom template
A pushed custom template is a draft. A deploy makes it the active version, and every send of every variant that names it renders that version. This page covers what comes after a push: putting the template on a variant, deploying it, and sending it.
Put a custom template on a variant
Section titled “Put a custom template on a variant”- Push the template at least once. Until then it is not offered.
- Open the publication in Messaging › Email & Push Editions › Publications.
- On the variant, pick
custom:<name>as the template, and set its props as JSON. - Save the variant.
The template picker lists every custom template that has a pushed version and is not archived, with the locales of its draft version.
What saving checks
Section titled “What saving checks”EdgeKit runs these checks in order and stops at the first that fails:
- Your organization runs an EdgeKit release that sends custom templates. EdgeKit rolls releases out, so ask EdgeKit if this check fails.
- The template has a pushed version and is not archived.
- The props are a JSON object of at most 64 KB.
- The publication’s locale is one the draft version lists. When a version is already deployed, it must list the locale too.
- The publication has no slot on a personalised feed.
- The template’s own
propsvalidator accepts the props, in the sandbox. It runs once for the draft version and once for the deployed version, when there is one, because the next deploy can make the draft active.
The publication’s locale is held to the same rule afterwards: you cannot change it to a locale the template does not list. Saving the publication’s slots is refused when a slot is on a personalised feed and a variant names a custom template.
Deploy the template
Section titled “Deploy the template”A deploy makes each custom template’s draft version active. Check what a deploy changes with edgekit deploy diff
before you deploy:
edgekit deploy diff --tier prodedgekit deploy run --tier prod --expect 8f3c…e1Under Template versions, diff lists each custom template whose active version the deploy changes: the hash
before and after, and the commit, the branch and who pushed the new version. A push from any branch moves the draft,
so this list is where you see a push someone else made. The deploy’s document diff shows the same change as a
presentational one: it moves no entity version.
Below each template, diff lists every variant whose props the new version’s validator refuses, on publications
that are not archived, as <publication> / <variant>:
- `custom:digest` 1b2c3d4e5f60 → 3f9a2c41d07e, pushed from `c0ffee1` on `main` by Ada - rejects the props of Morning Briefing / Main: Template "custom:digest" refused its props: ctaUrl — Invalid input: expected string, received undefined.The deploy is not refused, but after it each listed variant’s sends fail until you fix its props.
edgekit templates list shows each template’s draft version and its active version.
To go back to an earlier version, push the earlier build again, then deploy. There is no other way to make a version active.
Checks and previews
Section titled “Checks and previews”Previews and test sends render the deployed version, as a send does. Before the first deploy there is no deployed version, so a preview of that variant is refused and Checks gives a warning:
Template "custom:digest" is not deployed: a send renders its deployed version, and fails while there is none. Deploy it first.
It is a warning, not an error: you can schedule the edition and deploy the template before its send time.
Preview or test-send a version before you deploy it
Section titled “Preview or test-send a version before you deploy it”In the edition editor, one version picker beside Send test sets the version for both the email preview and the
test send. It shows when an active variant uses a custom template, and not when every active variant uses one of
EdgeKit’s templates. The picker shows Deployed version by default and lists every pushed version of those
templates after it, newest first, as custom:<name> and the first 12 characters of the hash, with the deployed and
the draft versions marked. An archived template’s versions are not listed. If EdgeKit cannot read the versions, the
picker is disabled and says why, and the preview and the test send render the deployed version.
The version you pick must list the publication’s locale in its manifest. If it does not, the preview or test send is refused and names the template and the locale.
- In the preview, the version you pick renders the variant shown, when that variant names its template. Otherwise the preview renders the deployed version.
- In a test send, it renders every active variant that names its template. Other variants render their deployed version.
The props are checked with the version you pick, as a send checks them with the deployed one. A send always renders the deployed version, whatever you pick. The pick stays when you save the edition.
Props the draft refuses
Section titled “Props the draft refuses”Checks warns on each active variant whose custom template has a draft version, other than the deployed one, that refuses the variant’s props:
Variant "Main" stops sending once draft version 3f9a2c41d07e is deployed. Template "custom:digest" refused its props: ctaUrl — Invalid input: expected string, received undefined.
The edition still sends with the deployed version. Fix the props or the template before the next deploy.
At the send
Section titled “At the send”For each variant that names a custom template, the send:
- reads the version the deployed configuration names;
- checks the variant’s props with that version’s own validator;
- renders the edition with that version, in the sandbox;
- adds EdgeKit’s unsubscribe link and headers, the first names and the link tags, as for every template.
The record of the send keeps the hash of the version it rendered, and the stories of the slots that version rendered. A slot the template leaves out does not count as sent, so a feed that leaves out stories already sent can still send those stories later.
The props stay on the variant and are not part of a deploy. A deploy can make a version active whose validator refuses props a variant saved earlier. That variant’s send then fails, naming the refusal.
If EdgeKit cannot read the template bundle from your organization’s storage for a reason that may pass, the send tries again. If storage stays unreadable after the retries, the send job stops and the edition shows why.
What a custom template cannot send
Section titled “What a custom template cannot send”- A personalised feed slot. Saving such a pairing is refused. A feed can still become personalised later, when you edit the feed itself: then Checks gives an error, and a send that meets one fails.
- Slot content that an experiment arm changes. A custom template renders each slot’s own content for every recipient. The arms would not differ, but every subscriber would still be logged as exposed to one. Checks gives an error, and the edition cannot be scheduled. Arms that change only the subject or the preheader are fine. See Experiments.
Refusals
Section titled “Refusals”| Sentence | Cause |
|---|---|
Custom templates need EdgeKit release 1.17.0 on this organization's stack, which runs 1.16.0. Ask EdgeKit to roll it out. |
Your organization is on an earlier EdgeKit release. |
"custom:digest" has no pushed version. Push it first: edgekit templates push. |
The template was never pushed, or it is archived. |
Template "custom:digest"'s props are over 65,536 bytes of JSON. |
The props are too large. |
Template "custom:digest" has no "fr" version. Pick a locale it supports, or another template. |
The template does not list the publication’s locale. |
Template "custom:digest" is a custom template, which cannot render a personalised feed slot. Use a query feed there, or a library template. |
The publication has a slot on a personalised feed. |
Template "custom:digest" refused its props: … |
The template’s validator refused the props, with its own message. |
Template "custom:digest" could not check its props: … |
EdgeKit could not run the check. Save again. |
Template "custom:digest" is a custom template, which cannot vary a slot by experiment arm. … |
An experiment arm changes a slot’s content. |
Template "custom:digest" is not deployed: … |
No deploy has made a version active yet. |
Template "custom:digest" is on contract 1, whose support ended on 2027-11-07 UTC: … |
Its contract’s support has ended. |
Template "custom:digest"'s template bundle 3f9a2c… is missing from this organization's template storage. |
The active version’s bytes are not in storage. Contact EdgeKit. |
Version 3f9a2c41d07e is not a pushed version of "custom:digest". … |
A preview or test send picked a version of another template. |
Version 3f9a2c41d07e cannot render here: no variant it would render uses a custom template, … |
A preview or test send picked a version for EdgeKit’s templates. |
In a send, every refusal but the not-deployed one reads The edition could not render: <sentence>.