Goal: a dynamic template that renders correctly for every recipient.
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.
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.
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.
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.
Step 5. Promote by pointing production at the proven template_id. Monitor open/click events per template version in the first sends.
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.