## TL;DR

Add a new template version for each iteration rather than editing in place. Create the template in the console and add a version.

## Steps

1. Goal: a dynamic template that renders correctly for every recipient.

2. Step 1. Create the template in the console and add a version. Build the layout with Handlebars: conditionals and loops over the fields you will pass in dynamic_template_data.

3. Step 2. Define the data contract first: list every dynamic_template_data key the template reads, with types and fallbacks for missing values. Handlebars renders missing keys as empty, which is how blank sections ship.

4. Step 3. Test-render with sandbox mode: send with the template_id and representative dynamic_template_data (including the empty/missing cases). The 200 response confirms acceptance; no mail is delivered and no events fire.

5. Step 4. Add a new template version for each iteration rather than editing in place. Keep the last known-good version intact until the new one is proven.

6. Step 5. Promote by pointing production at the proven template_id. Monitor open/click events per template version in the first sends.

7. Verify: test renders for the full, partial, and empty data cases all look right, and production events show expected engagement. Pitfall: changing the data contract without updating the template ships silent blank sections.

## When to use

You are seeing this: Goal: a dynamic template that renders correctly for every recipient. Use this skill when you run into "SendGrid dynamic template rollout: versions, test renders, promotion".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
