Templates are the foundation of Magic Merge. They define the structure and content of your generated documents. This guide covers how to create, customize, and manage templates effectively.
Magic Merge templates support multiple document formats:
Create your document in Microsoft Word, Excel, or PowerPoint. Design it exactly as you want the final output to look, including formatting, images, tables, and branding.
Insert Salesforce field references using the merge field syntax:
{{!Account.Name}} - Standard fields{{!Account.Custom_Field__c}} - Custom fields{{!Owner.Name}} - Related object fields{{!TODAY}} - System functionsTip: Test your template with sample data before deploying to production to ensure merge fields render correctly.
Show or hide content based on field values:
{{#if Opportunity.IsClosed}}
Congratulations on closing the deal!
{{/if}}
Display related records like line items:
{{#each OpportunityLineItems}}
{{ProductName}} - {{Quantity}} - {{TotalPrice}}
{{/each}}
Format dates, numbers, and currency:
{{!Account.AnnualRevenue | currency}}{{!Opportunity.CloseDate | date:"MM/DD/YYYY"}}{{!Contact.Name | uppercase}}Include dynamic images from Salesforce fields or static assets:
{{image Account.Logo__c width="200"}}
Magic Merge automatically versions templates. You can view history, compare versions, and roll back changes if needed.
Control who can use templates:
Use folders and naming conventions to keep templates organized:
Yes. Download the template, make changes in Word/Excel/PowerPoint, then upload a new version. The template retains its ID and settings.
By default, blank fields display as empty. You can configure fallback text or use conditional logic to handle missing data.
Yes. Use relationship notation to access parent and child objects (e.g., {{!Account.Owner.Manager.Name}}).
Need Help? Check out our template gallery for examples and pre-built templates you can customize for your use case.