Switch this contract to a different template

Picked the wrong template? Choose another from the dropdown and the contract re-renders server-side with this job's estimate data intact.

What it is

A 'Switch template…' Select in the editor header lists the org's saved templates, marking the default. Choosing one POSTs to /api/contracts/[id]/apply-template, which rebuilds the body through the shared generator from the contract's estimate link and frozen form_data, persists rendered_body + required_sections + template_id/version, and returns the new body into the editor.

Also called: wrong contract template · change template on a contract · re-render contract

See it
Switch this contract to a different template
Prepared for
Marlin Hoover
1140 Ridge Line Rd · Fair Play
Shell package$31,285
Concrete & site$9,083
Doors & windows$6,055
Trim & finish$4,037
Total
$50,460
Signature
The 'Switch template…' dropdown open over the editor showing 'Post-Frame Building (default)' and 'Concrete', with the body reloading behind it. Sample data — no customer information appears here.
How it works
  1. 1Role gate: admin, sales or project_manager, scoped to the caller's org.
  2. 2Refuses unless the contract is 'pending' or 'sent' ('This contract is already signed or closed.').
  3. 3Loads the estimate link — including job_id, because 'the builder's real payment schedule hangs off it in job_meta. Without it the contract falls back to invented 50/50 terms.'
  4. 4Re-renders via buildContractArtifacts and re-derives the initials manifest.
  5. 5The modal loads the new body and switches to Preview.
Why we built it

From the route header: re-rendering through the shared generator means 'the new body has the same estimate table / payment schedule / initials manifest the original generation would.' Before this, correcting a template choice meant regenerating the whole customer flow or hand-editing a body.

The problem
  • A mis-picked template forcing a restart of the customer's flow
  • Manual re-typing to convert one contract body into another
Sound familiar?
What you get
Fix the template choice in one click
Estimate data, payment schedule and initials manifest all rebuild correctly
Blocked automatically once signed

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →