> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thread.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Applying Templates

> Understand how templates are applied to accounts and how to customize them

## Template Application Overview

When you create an account and select a template, Thread creates an **immutable snapshot** of that template's configuration. This ensures consistency and prevents mid-flight disruptions.

***

## What Happens When Templates Are Applied

<Steps>
  <Step title="Template Snapshot Created">
    Thread copies the entire template configuration (JSONB) to the account.

    **What's copied:**

    * All milestones (name, sequence, duration, descriptions)
    * All actions within milestones (type, trigger, content, config)
    * Portal visibility settings
    * Automation rules

    **What's NOT copied:**

    * Template name/description (just references template\_id)
    * Future template changes
  </Step>

  <Step title="Milestones Instantiated">
    Each milestone in the template becomes a milestone instance for the account.

    **Created:**

    * Milestone records in database
    * Status (all start as "pending")
    * Sequence order
    * Duration estimates
    * Target completion dates (estimated)
  </Step>

  <Step title="Actions Created">
    Each action in the template becomes an action instance.

    **Created:**

    * Action records linked to milestone instances
    * Status (pending)
    * Trigger configuration
    * Content templates (not yet populated)
    * Portal configuration

    AI drafts are NOT generated yet—they're created when triggers fire.
  </Step>

  <Step title="First Milestone Ready">
    The first milestone (sequence 1) is automatically set to "pending" or "in\_progress" depending on configuration.

    CSMs can manually start it when ready.
  </Step>
</Steps>

***

## Template Immutability Explained

### Why Templates Are Immutable

Imagine if template changes affected live accounts:

**Bad scenario:**

```
Day 1: Customer starts onboarding with 4-week timeline
Week 2: You edit template, add 2 more milestones
Result: Customer timeline suddenly changes mid-flight (bad experience!)
```

**Good scenario (immutable):**

```
Day 1: Customer starts with 4-week timeline (snapshot created)
Week 2: You edit template, add 2 more milestones
Result: This customer keeps 4-week timeline. NEW customers get 6-week version.
```

<Info>
  Template immutability ensures predictability for customers and consistency in their onboarding journey.
</Info>

### When Template Changes Take Effect

| Change Type          | Existing Accounts | New Accounts      |
| -------------------- | ----------------- | ----------------- |
| Edit milestone name  | ❌ No change       | ✅ New name        |
| Add new action       | ❌ Not added       | ✅ Included        |
| Change action timing | ❌ Old timing      | ✅ New timing      |
| Update email content | ❌ Old content     | ✅ New content     |
| Remove action        | ❌ Still has it    | ✅ Doesn't have it |

### Viewing Template Version

Each account stores:

* **Template ID**: Which template was used
* **Template Revision ID**: Exact version at creation time
* **Created At**: When snapshot was taken

***

## Customizing After Template Application

While the initial template is immutable, CSMs can customize individual accounts:

### Editing Milestones

<Tabs>
  <Tab title="Modify Milestone">
    **What you can change:**

    * Milestone name
    * Duration estimate
    * Descriptions (CSM and customer views)
    * Status (pending, in\_progress, completed, blocked)
    * Target dates

    **How:**

    1. Navigate to account Timeline tab
    2. Click milestone to edit
    3. Update fields
    4. Save changes

    <Warning>
      Milestone changes only affect this account, not the template or other accounts.
    </Warning>
  </Tab>

  <Tab title="Add Milestone">
    **When to add:**

    * Customer needs extra phase
    * Edge case not in template
    * Custom requirement

    **How:**

    1. Go to Timeline tab
    2. Click "Add Milestone"
    3. Set sequence number (where it fits)
    4. Configure milestone details
    5. Add actions if needed
  </Tab>

  <Tab title="Remove Milestone">
    **When to remove:**

    * Customer doesn't need this phase
    * Duplicate milestone
    * Simplified onboarding path

    **How:**

    1. Navigate to milestone
    2. Click "Remove Milestone"
    3. Confirm (cannot be undone)

    <Warning>
      Removing a milestone also removes all its actions. Make sure nothing critical is lost!
    </Warning>
  </Tab>

  <Tab title="Reorder Milestones">
    **When to reorder:**

    * Customer needs different sequence
    * Parallel work streams
    * Dependencies changed

    **How:**

    1. Go to Timeline tab
    2. Drag and drop milestones
    3. Or edit sequence numbers manually
    4. Save new order

    <Info>
      Reordering doesn't affect action triggers—they're still based on their parent milestone.
    </Info>
  </Tab>
</Tabs>

### Editing Actions

<Tabs>
  <Tab title="Modify Action">
    **What you can change:**

    * Action label/description
    * Trigger timing (delay\_hours)
    * Content (email body, form fields, etc.)
    * Portal visibility
    * Recipients (for emails)

    **How:**

    1. Go to Implementation tab
    2. Find action to edit
    3. Click "Edit Action"
    4. Update configuration
    5. Save changes
  </Tab>

  <Tab title="Add Action">
    **When to add:**

    * Customer-specific requirement
    * Follow-up needed
    * Extra document request

    **How:**

    1. Navigate to milestone
    2. Click "Add Action"
    3. Select action type
    4. Configure trigger and content
    5. Save action

    <Tip>
      Added actions inherit the milestone's context. Set triggers relative to milestone start.
    </Tip>
  </Tab>

  <Tab title="Remove Action">
    **When to remove:**

    * Not relevant to this customer
    * Redundant with another action
    * Customer request

    **How:**

    1. Go to Implementation tab
    2. Find action to remove
    3. Click "Delete Action"
    4. Confirm removal

    <Warning>
      If the action was already executed (email sent, form created), removal doesn't undo that. It just removes it from the account timeline.
    </Warning>
  </Tab>

  <Tab title="Reschedule Action">
    **When to reschedule:**

    * Customer needs more time
    * Dependency changed
    * Holiday or blackout date

    **How:**

    1. Go to Implementation tab
    2. Click action to reschedule
    3. Change delay\_hours or trigger type
    4. Or manually set execution date
    5. Save changes
  </Tab>
</Tabs>

***

## Template Selection Guidance

### Choosing the Right Template

<CardGroup cols={2}>
  <Card title="Customer Size" icon="building">
    **SMB:** Quick Start (2-3 weeks)
    **Mid-Market:** Standard SaaS (6-8 weeks)
    **Enterprise:** Full Implementation (12+ weeks)
  </Card>

  <Card title="Product Tier" icon="layer-group">
    **Basic:** Self-serve onboarding
    **Professional:** Standard implementation
    **Enterprise:** White-glove service
  </Card>

  <Card title="Use Case" icon="diagram-project">
    **Simple:** Standard template
    **Complex:** Custom template with extra phases
  </Card>

  <Card title="Industry" icon="industry">
    **Regulated:** Templates with compliance steps
    **Standard:** General templates
  </Card>
</CardGroup>

### Template Fit Assessment

Before applying template, consider:

<Tabs>
  <Tab title="Complexity Match">
    **Questions:**

    * How many integrations needed?
    * Custom development required?
    * Data migration volume?
    * Stakeholder count?

    **Template selection:**

    * Low complexity → Quick Start
    * Medium complexity → Standard
    * High complexity → Enterprise
  </Tab>

  <Tab title="Timeline Match">
    **Questions:**

    * Customer's target go-live date?
    * Their internal resource availability?
    * Dependencies on external vendors?
    * Holiday blackout periods?

    **Template selection:**

    * Aggressive timeline → Fast-track template
    * Standard timeline → Normal template
    * Flexible timeline → Extended template
  </Tab>

  <Tab title="Support Level Match">
    **Questions:**

    * Contract tier (Basic, Pro, Enterprise)?
    * Customer's technical expertise?
    * Expected CSM involvement?
    * Self-service vs hands-on?

    **Template selection:**

    * Low touch → Self-serve template
    * Medium touch → Standard template
    * High touch → White-glove template
  </Tab>
</Tabs>

***

## Common Customization Patterns

### Accelerated Onboarding

**When:** Customer needs to go live ASAP

**Template modifications:**

1. Reduce milestone durations (50% of standard)
2. Remove optional actions
3. Combine related actions
4. Use immediate triggers (no delays)
5. Parallel track where possible

**Example:**

```
Standard: 8 weeks
Accelerated: 4 weeks

Changes:
- Kickoff: 7 days → 3 days
- Setup: 21 days → 10 days
- Training: 14 days → 5 days
- Launch: 7 days → 3 days
```

<Warning>
  Accelerated onboarding increases risk. Set expectations with customer about trade-offs.
</Warning>

### Enterprise Extended

**When:** Large, complex customer with many stakeholders

**Template modifications:**

1. Add discovery/requirements phase upfront
2. Add UAT and security review phases
3. Add stakeholder alignment checkpoints
4. Add training for multiple user groups
5. Add staged rollout phases

**Example:**

```
Standard: 8 weeks
Enterprise: 16 weeks

Additions:
+ Discovery (2 weeks)
+ Architecture Design (2 weeks)
+ Security Review (2 weeks)
+ Department Rollouts (4 weeks)
```

### Industry-Specific Compliance

**When:** Regulated industry (healthcare, finance, government)

**Template modifications:**

1. Add compliance documentation actions
2. Add security questionnaire
3. Add audit trail requirements
4. Add compliance training
5. Add certification validation

**Example additions:**

```
+ HIPAA Compliance Form
+ BAA Execution
+ Security Audit
+ Compliance Training
+ Certification Review
```

***

## Template Performance Tracking

### Per-Account Metrics

For each account using a template:

| Metric                           | Insight                        |
| -------------------------------- | ------------------------------ |
| **Actual vs Estimated Duration** | Is template realistic?         |
| **Actions Completed**            | Are actions valuable?          |
| **Actions Skipped**              | What's not being used?         |
| **Milestone Blocks**             | Where do customers get stuck?  |
| **CSM Edit Rate**                | How much customization needed? |

### Cross-Account Analysis

Compare accounts using the same template:

```
Template: Standard SaaS Onboarding
Accounts using it: 47

Average time to value: 52 days (estimate: 56 days) ✅
Action completion rate: 87% ✅
Most skipped action: "Integration Testing Document" (23% skip rate) ⚠️
Most blocked milestone: "Technical Setup" (34% block rate) ⚠️

Recommendation: Simplify Technical Setup milestone, remove or improve Integration Testing Document action
```

<Info>
  Review template performance quarterly. Use data to improve templates for future customers.
</Info>

***

## When to Create New Templates vs Customize

### Create New Template When:

* ✅ 10+ accounts will use this variant
* ✅ Structure differs significantly (not just timing)
* ✅ Segment is predictable at account creation
* ✅ Customizations are consistent across accounts

### Customize Existing Template When:

* ✅ One-off customer requirement
* ✅ Edge case or exception
* ✅ Minor timing adjustment
* ✅ Add/remove 1-2 actions

**Decision tree:**

```
Is this a common customer segment?
├─ Yes → How many accounts per year?
│  ├─ 10+ → Create new template
│  └─ <10 → Customize per account
└─ No → One-off? → Customize existing template
```

***

## Best Practices Summary

<CardGroup cols={2}>
  <Card title="Choose Wisely" icon="bullseye">
    Select template based on complexity, timeline, and support level
  </Card>

  <Card title="Customize Sparingly" icon="sliders">
    Only change what's necessary for this specific customer
  </Card>

  <Card title="Track Performance" icon="chart-line">
    Monitor how accounts progress through templates
  </Card>

  <Card title="Iterate Templates" icon="rotate">
    Update templates quarterly based on learnings
  </Card>
</CardGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Accounts" icon="plus" href="/csm-guide/accounts/creating-accounts">
    Learn how to create accounts and select templates
  </Card>

  <Card title="Implementation Tab" icon="tasks" href="/csm-guide/accounts/implementation-tab">
    Manage milestone and action execution
  </Card>

  <Card title="Template Design" icon="palette" href="/csm-guide/templates/creating-templates">
    Build better templates from the start
  </Card>

  <Card title="Best Practices" icon="star" href="/csm-guide/templates/best-practices">
    Design high-performing templates
  </Card>
</CardGroup>
