---
schema_version: "1"
id: 476c7d2ab5defda277a1f74bda6697a18a5d61e8f2627eb856efa052411f11b4
title: Add Dynamic Merge Fields to a Document Template
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_add_dynamic_merge_fields.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_add_dynamic_merge_fields.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d48d9b0c155a272532331e9bf3a10d18de1c178ac353fa77465b8050a80123f7
description: Insert live Spiff data into your compensation plan document templates. Dynamic merge fields pull values directly from Spiff—such as a rep's team name, plan assignments, or quotas—or to data synced in from external systems like Salesforce or Workday. Spiff quota tables and fields that are mapped to the user object are available as dynamic merge fields. Spiff populates these fields when you send or preview a document.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Add Dynamic Merge Fields to a Document Template

Insert live Spiff data into your compensation plan document templates. Dynamic merge fields pull values directly from Spiff—such as a rep's team name, plan assignments, or quotas—or to data synced in from external systems like Salesforce or Workday. Spiff quota tables and fields that are mapped to the user object are available as dynamic merge fields. Spiff populates these fields when you send or preview a document.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d13797e76">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d13797e76 ">To add dynamic merge fields to a document template:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d13797e76 ">
              <p>A Spiff <a href="https://help.salesforce.com/s/articleView?id=sales.spiff_users_roles_and_permissions.htm&amp;release=264.0.0&amp;type=5" title="Give users the appropriate level of access so they can be successful in Salesforce Spiff, and enforce the principle of least privilege. Assign a default role to each user, or create custom roles with access to specific Spiff functionality.">user role</a> with these permissions turned on.</p>
              <ul>
                <li>Documents: Manage</li>

                <li>Document Templates: Edit</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

1. From the Spiff navigation, go to **Documents** > **Templates**.
2. Open the template that you want to edit, or select **New Template** to create one.
3. In the Document Designer, click inside the document where you want to insert a field.
4. In the right panel, locate the **Merge Fields** section.
5. Under **Dynamic Merge Fields**, browse for the field you want to add.
6. Select the field to insert it at your cursor position.
7. Repeat steps 3–6 for each additional dynamic merge field you want to add.
8. Save your template.
    
    The dynamic merge field placeholder appears in the document. In the merge fields panel, dynamic merge fields appear with a visual indicator that distinguishes them from uploaded merge fields. When you preview the document or send it for approval, Spiff replaces each placeholder with the rep's current data.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/images/icon_note.png)

Note If you delete a quota table or a dynamic merge field from a template, Spiff removes them from the template and from any document you haven't already sent. Documents that you previously sent aren't affected and they retain the values that you defined at send time.