Talk to Us

Excel Add In User Guide

Table of Contents

1. Introduction & Overview

The 360 InstantDocs Excel Add-In is a Microsoft Excel sidebar that connects directly to your Salesforce organization. It allows you to build smart excel sheet templates — Excel files that automatically populate with real Salesforce data when a document is generated.

Instead of manually updating every quote, contract, or proposal, you place merge tags (placeholders like {Account.Name} or {Amount}) into your Excel sheet. When a user generates a document from Salesforce, those tags are automatically replaced with live data from the selected record.

Who this guide is for: This guide is written for anyone who wants to create or edit document templates — no technical knowledge required. Every step is explained from scratch.
Related Documentation:
360 InstantDocs Installation & Setup Guide — For administrators: installing the package, configuring OAuth, assigning permissions, and initial setup.
360 InstantDocs Feature & User Guide — For all users: generating documents from Salesforce records, bulk generation, template management, and more.

How It Works

Step 1
Login
Step 2
Browse Available Templates
Step 3
Build Template
Step 4
Preview
Step 5
Publish

Full Microsoft Excel Features Supported

Your templates are real .xlsx Excel files. You have complete freedom to use all standard Excel features:

Headers and footers with page numbers
Tables with custom borders, shading, and merged cells
Fonts, colors, bold, italic, underline, strikethrough
Bullet lists, numbered lists, multi-level lists
Images, shapes, text boxes, and SmartArt
Page breaks, section breaks, columns
Styles, themes, and document templates
Mail-merge-style layouts

The add-in simply helps you insert dynamic Salesforce placeholders (merge tags). Everything else in the document behaves exactly like a normal Excel file.

Important: Document templates must be created and edited in Microsoft Excel using this Add-In. You cannot create or edit templates with merge fields directly within Salesforce. The Salesforce template record stores metadata (name, object, document type), but the actual template file ( .xlsx ) must be designed here in Excel using the Add-In. Attempting to create templates without the Add-In may result in incorrect template structure, missing merge fields, or unusable documents.
Manual Tag Entry: You do not have to use the add-in for every tag. If you know the field name and the tag format, you can type merge tags directly into your Excel Sheet without using the add-in UI at all. The add-in is a helper tool — not a requirement. See Section 12 — Tag Syntax Quick Referencefor all supported formats.

Picture 1030

Figure 1: The 360 InstantDocs add-in panel open alongside a Excel Sheet

2. Getting Started

Prerequisites

A Salesforce account (Production or Sandbox)
Microsoft Excel for Desktop (Windows or Mac) or Excel Online (Microsoft 365 in a browser)
360 InstantDocs managed package installed and authorized in your Salesforce org — if not already done, your Salesforce administrator must:
1.Install the 360 InstantDocs managed package from the Salesforce AppExchange into your org (Production or Sandbox).
2.Open the App Launcher, navigate to the 360 InstantDocs app, and click the Smart Docs Setup tab.
3.Select License Details from the left sidebar and click "Authorize & Sync with Server" to complete the OAuth authorization. Once done, the license status will show Active.
The 360 InstantDocs add-in installed in Excel (contact your administrator if not yet installed)

How to Open the Add-In

1
Open Microsoft Excel on your computer.

2
Go to the Home tab in the Excel ribbon.

3
Click Add-ins or My Add-ins.
4
Find 360 InstantDocs in the list and click Add.
5
The 360 InstantDocs panel will appear on the right side of your Excel window.

Group 86

Figure 2: Opening the add-in from Excel's Insert tab → Add-ins

2.1 Signing In

When you first open the add-in, you will see the login screen with two buttons:

Button

What it connects to

When to use

Sign in to Production

Your live Salesforce org (real data, real customers)

When building templates for actual use

Sign in to Sandbox

Your test/sandbox Salesforce org (safe to experiment)

When building and testing templates before go-live

1
Click either Sign in to Production or Sign in to Sandbox depending on your environment.

2
A Salesforce login window will open in your browser or as a dialog.
3
Enter your Salesforce username and passExcel and click Log In.
4
If prompted, click Allow to authorize 360 InstantDocs to access your Salesforce data.
5
You will be redirected back to the add-in, now logged in and showing your templates.
Login Failed? If you see an authentication error, contact your Salesforce administrator. They may need to check the External Client App settings or grant you access to the 360 InstantDocs application.

Group 124

Figure 3: The login screen — choose Production or Sandbox

3. Template Listing Page

After signing in, you will see the Template Listing page — a list of all document templates saved in your Salesforce org.

Picture 1

Figure 4: The Template Listing page

Searching Templates

Type in the search box at the top of the list. The list filters in real-time as you type. Click the × (clear) button to reset the search.

Picture 1

Sorting Columns

Click any column header to sort the list:

Name — sort alphabetically by template name
Object — group by the Salesforce object (Opportunity, Account, etc.)
Status — sort by Active vs Draft
Last Modified — sort by most recently edited

Click the same column header again to reverse the sort order.

Status Indicators

Indicator

Meaning

Active (green dot)

Template is live and available to users for document generation

Draft (gray dot)

Template is still being built — not yet available to users

Creating a New Template

Click the New button in the top-right corner of the listing. A new blank template will open and the add-in will move to the CREATE tab.

Opening an Existing Template

Click any row in the list to open that template. The template file will open in Excel and the add-in will load the template's settings.

Infinite Scroll: If you have many templates, the list loads 20 at a time. Scroll to the bottom to automatically load more.

4. Building a Template — The CREATE Tab

When creating or editing a template, the add-in shows a 3-step wizard at the top of the panel:

Step 1
CREATE
Step 2
PREVIEW
Step 3
LIVE

In the CREATE tab, you:

1.Select a Primary Object — Select the object whose fields you want to merge into the template
2.Select an Action — what type of content to insert (Field, Conditions, View, or Image)
3.Configure the details and click Insert or Copy to place the tag in Excel

Repeat steps 2–3 for every piece of dynamic content in your template.

Group 155

Figure 5: The CREATE tab — 3-step wizard and Object & Action selection

4.1 Selecting a Primary Object

The Primary Object is the type of Salesforce record your document is based on. For example:

Quote — for sales quote documents
Opportunity — for proposals and deal summaries
Account — for account profiles and reports
Contact — for contact sheets or letters
Order — for order confirmations

1
Click the Select Object dropdown.
2
Type to search for your object (e.g., type "opportunity" to find Opportunity).
3
Select your object from the list.
Important: The Primary Object cannot be changed after the template has been saved for the first time. Choose carefully before saving.

Image 183

Figure 6: Selecting a Primary Object from the dropdown

4.2 Selecting an Action

After selecting an Object, choose an Action from the Action dropdown. The Action determines what type of content the add-in will help you insert:

Action

What it inserts

Example use case

Field

A single field value from the record

Opportunity name, amount, close date

Conditions

Text that shows or hides based on a rule

Show "Approved" section only if approved

View

A list of related child records (table, loop, or grid)

All line items on an Opportunity

Image

A dynamic image from the record

Company logo, product photo

5. Action: Field

What it does: Inserts a single field value from a Salesforce record into your Excel Sheet. When a document is generated, the tag is automatically replaced with the actual value from the record.

Example: You place the tag {Account.Name} in your template. When a user generates a document from an Opportunity where the Account is "Acme Corporation", the tag becomes Acme Corporation in the final document.

5.1 Understanding Field Types

When you open the "Select Field" dropdown, fields are grouped by type. Each type has a small icon to help you identify it:

Icon

Field Type

Examples

Aa

Text / String

Account Name, Status, Description, Subject

#

Number / Currency / Percent

Amount, Discount %, Quantity, Annual Revenue

📅

Date / Date-Time

Close Date, Created Date, Expiration Date

Checkbox (True/False)

Is Active, Closed Won, Has Attachment

🔗

Lookup / Reference (drillable)

Account (on Opportunity), Owner, Campaign, Quote

🌎

Global Variables

TODAY, Running User (you), Running Org (your company)

5.2 Drilling into Reference (Lookup) Fields

Reference fields (🔗 icon) link to another Salesforce object. For example, an Opportunity has a reference to an Account. You can click the arrow next to a reference field to "drill in" and see that related object's fields.

Maximum depth: 5 levels

Example: Getting the Account Owner's Email from an Opportunity

1
On an Opportunity template, open the field selector.
2
Find Account (reference field 🔗) and click the arrow — you are now inside Account fields.
3
Find Owner (reference field 🔗) and click the arrow — you are now inside User (Owner) fields.
4
Select Email.
5
The resulting tag is: {Account.Owner.Email}

More Drilling Examples

Path

Result Tag

What it shows

Quote → Account → Name

{Account.Name}

The account's company name

Quote → Owner → Email

{Owner.Email}

The quote owner's email

Quote → Account → Owner → Manager → Department

{Account.Owner.Manager.Department}

Manager's department (4 levels deep)

Opportunity → Account → BillingCity

{Account.BillingCity}

The account's billing city

Figure 7: The field selector showing field types with icons

Image 247

Group 249

Figure 8: Drilling into a reference field — click the › arrow to navigate deeper

5.3 Global Variables

Global Variables are available in the 🌎 Globe group in the field selector. These values are automatically calculated each time a document is generated — they do not come from the Salesforce record.

Date Literals

Tag

What it inserts

Real-world use case

{TODAY}

Today's date

"Generated on: {TODAY | formatDate:'MM/DD/YYYY'}" — auto-stamps the current date on every document

{YESTERDAY}

Yesterday's date

Daily sales reports: "Activity as of {YESTERDAY | formatDate:'MM/DD/YYYY'}"

{TOMORROW}

Tomorrow's date

Urgent deadlines: "Response required by {TOMORROW | formatDate:'MMMM DD, YYYY'}"

{THIS_WEEK}

Monday of the current week

Weekly status reports: "Week of {THIS_WEEK | formatDate:'MMM DD'}"

{THIS_MONTH}

1st day of the current month

Monthly invoices: "Invoice period: {THIS_MONTH | formatDate:'MMMM YYYY'}"

{THIS_QUARTER}

1st day of the current fiscal quarter

Quarterly reviews: "Period starting {THIS_QUARTER | formatDate:'MM/DD/YYYY'}"

{THIS_YEAR}

January 1st of the current year

Annual reports: "Year-to-date from {THIS_YEAR | formatDate:'MM/DD/YYYY'}"

{CURRENT_YEAR}

Just the 4-digit year number

Copyright footers: "© {CURRENT_YEAR}

{Organization.Name}"

{CURRENT_MONTH}

Month as a number (1–12)

Custom date labels

{CURRENT_DAY}

Day of month as a number

Custom date labels

Running User — The Person Generating the Document

These tags automatically resolve to the details of whoever is generating the document at the time. This means different users will see their own name and contact info in generated documents.

Tag

What it inserts

Example use

{User.FirstName}

First name of the generating user

Personalized "Prepared by" footer

{User.LastName}

Last name

Same

{User.Email}

Email address

"Questions? Contact {User.Email}"

{User.Title}

Job title (e.g., Account Executive)

Show the rep's role below their name

{User.Department}

Department name

"From the {User.Department} team"

{User.Phone}

Direct phone number

"Call your rep: {User.Phone}"

Example — Document footer that personalizes itself per rep:

Prepared by: {User.FirstName} {User.LastName}
Title: {User.Title} | Department: {User.Department} Email: {User.Email} | Phone: {User.Phone}

Every time a different sales rep generates this template, their own contact information appears automatically.

Running Org — Your Salesforce Organization

These tags reflect your organization's Salesforce settings.

Tag

What it inserts

Example use

{Organization.Name}

Your company/organization name

Letterheads, copyright footers

{Organization.InstanceName}

Salesforce instance identifier

Internal reference only

Example — Consistent letterhead across all templates:

{Organization.Name}
Confidential — © {CURRENT_YEAR} {Organization.Name}. All rights reserved.

5.4 Step-by-Step: Inserting a Field

1
Make sure you have selected a Primary Object (e.g., Opportunity).
2
From the Action dropdown, choose Field.
3
Click the Select Field dropdown to open the field browser.
4
Browse or type to search for your field (e.g., type "account" to find Account-related fields).
5
If you see a field with a chevron (reference/lookup field), click it to drill into that related object and see its fields.
6
Click your target field to select it.
7
If the field is a number, currency, or date type, configure formatting options that appear below (see Section 5.5).
8
Click Insert to place the tag at your cursor in Excel, or Copy to copy it to your clipboard.
Tip: Click inside your Excel Sheet first to position your cursor before clicking Insert. The tag will be placed exactly where your cursor is.

5.5 Field Formatting Options

Number, Currency & Percent Fields

When you select a numeric field, formatting options appear below the field selector.

Decimal Places (0–10): How many digits to show after the decimal point.

Example: 12345.6789 with Decimal Places = 2 → 12,345.68
Example: 12345.6789 with Decimal Places = 0 → 12,346

Number Format: The style of thousands and decimal separators.

Format Name

Example Output

When to use

US — 10,000.5

12,345.68

United States documents

European — 10.000,5

12.345,68

European documents (Germany, France, etc.)

International — 10 000,5

12 345,68

International / French style

Indian — 1,00,000

1,23,456.68

India and South Asia

Currency Symbol: Adds a currency symbol before the number.

Options: $ (USD) (Euro) £ (Pound) ¥ (Yen/Yuan) (Rupee)
Example: Amount = 50000, Symbol = $, Decimals = 2 → $50,000.00

Group 365

Figure 9: Number formatting options

Steps for number formatting:

1
Select a numeric, currency, or percent field from the field selector.
2
Set the Decimal Places (e.g., 2 for money, 0 for whole numbers).

3
Choose the Number Format appropriate for your document's region.

4
Choose a Currency Symbol if the field represents money.
5
Click Insert or Copy.

Number Tag Syntax — toFixed vs format

The add-in generates one of two filters depending on what you choose. You can also type these directly:

toFixed:N — controls decimal places only. Use this when you want to keep your org's default number formatting and just override the decimal precision.

Example: {TotalPrice | toFixed:2}

format:decimals:'pattern' — full number format (decimal places + thousands/decimal separators). Use this when you need a specific regional pattern regardless of org defaults.

Example: {Amount | format:0:'10,000,000.5'} → integer with US-style thousands separator
format:decimals:'pattern':'symbol' — same as above, with a currency symbol prepended.

Example: {Amount | format:2:'10,000,000.5':'$'} $1,234,567.89

Pattern values match the Number Format dropdown choices: '10,000.5' (US), '10.000,5' (European), '10 000,5' (International), '1,00,000' (Indian).

Which one should I use? Pick toFixed when you only care about decimal places and want the org's default number formatting. Pick format when you need a specific separator pattern or currency symbol.

Date & Date Time Fields

When you select a Date or DateTime field, formatting options appear. Both Date and DateTime fields support every date format below; DateTime fields additionally let you append a time format.

Date Format (works for both Date and DateTime fields):

Format

Example Output

MM/DD/YYYY

12/31/2024

DD/MM/YYYY

31/12/2024

YYYY/MM/DD

2024/12/31

MMMM DD, YYYY

December 31, 2024

MMM DD, YYYY

Dec 31, 2024

DD MMMM YYYY

31 December 2024

Time Format (DateTime fields only — append to any date format above when a time component is needed):

Format

Example Output

hh:mm A

03:45 PM

HH:mm

15:45

hh:mm:ss A

03:45:09 PM

HH:mm:ss

15:45:09

If a DateTime field doesn't need a time component, just pick a date format and "None" in time format — it will render as a plain date.

Add Days / Subtract Days: Offsets the date by a set number of days from the field's value. Both addDays and subtractDays accept positive or negative integers.

Add days (future): addDays:30 → 30 days after the field value (e.g., Close Date + 30 days)
Subtract days (past): subtractDays:7 → 7 days before the field value (e.g., one week before the contract end)
Both filters accept negative numbers too — addDays:-7 is equivalent to subtractDays:7.
Use case: Payment due date = {InvoiceDate | addDays:30}
Use case: Expiry reminder = {ContractEndDate | subtractDays:14}

Group 466

Figure 10: Date formatting options

Steps for date formatting:

1
Select a Date or DateTime field.
2
Choose a Date Format from the dropdown.

3
(DateTime only) Choose a Time Format if you need a time component; leave it blank for date-only output.

4
(Optional) Enter a number in Add Days or Subtract Days to offset the date (positive or negative).
5
Click Insert or Copy.

Tag Examples

{Name}
{Account.Name}
{Account.Owner.Email}
{CloseDate | formatDate:'MMMM DD, YYYY'}
{CreatedDate | formatDate:'MM/DD/YYYY HH:mm:ss'}
{LastModifiedDate | formatDate:'DD/MM/YYYY hh:mm A'}
{Amount | format:2:'10,000,000.5':'$'}
{TotalPrice | toFixed:2}
{CloseDate | addDays:30 | formatDate:'MM/DD/YYYY'}
{ContractEndDate | subtractDays:14 | formatDate:'MM/DD/YYYY'}
{TODAY | formatDate:'MM/DD/YYYY'}
{User.FirstName} {User.LastName}
{Organization.Name}
© {CURRENT_YEAR} {Organization.Name}

6. Action: Conditions

What it does: Shows or hides a block of text in the document based on a rule you define. Think of it as: "if this condition is true, then show this content."

Example: Only show a "Terms & Conditions" section if the customer is an Enterprise client. For standard clients, that section simply doesn't appear.

6.1 If Block vs. If/Else Statement

Type 1 — If Block

Content is shown only when the condition is TRUE. If the condition is FALSE, nothing is shown — the section is completely hidden and takes up no space in the document.

Best for: Large optional blocks of content — entire paragraphs, multi-line clauses, full sections
Real examples:
Show a full "Terms & Conditions" section only for Enterprise tier customers
Show a "California Residents" legal clause only when Billing State = "CA"
Show an "Installation Instructions" block only when Product Type = "Hardware"
Show a "Payment Plan Details" section only when a payment plan was selected
Show a "Warranty Information" section only for physical products

Type 2 — If/Else Statement

Shows Content A when the condition is TRUE, or Content B when it is FALSE. Something always appears — it just changes based on the data.

Best for: Short inline labels, single Excels, or one-line phrases that need two versions
Real examples:
Amount > $10,000 → show "Premium Client" else show "Standard Client"
Is Active → show "Active Account" else show "Inactive Account"
Stage = "Closed Won" → show "Closed" else show "○ Open"
Discount > 0 → show "Discounted Pricing Applied" else show "Standard Pricing"

How this renders in the template: The add-in's If/Else Statement produces an inline ternary like
{Amount > 10000 ? "Premium Client" : "Standard Client"} . The TRUE and FALSE values can be either literal text (quoted) or Salesforce field names (unquoted) — for example {IsActive ?
active_labelc : inactive_labelc} . If you need block-level alternate content (multiple lines or paragraphs in the FALSE branch), type it into Excel manually as an inverted-section pair: take the
{#Condition}…{/} If Block and add a second block immediately after it with # replaced by ^
{^Condition}…{/} . That second block is what renders when the condition is false.

6.2 Nested Conditions

You can place a condition inside another condition to build complex logic. This is done by typing tags directly into your Excel Sheet (not available via the add-in UI buttons).

Pattern 1 — If Block inside an If Block

Show inner content only when BOTH the outer AND inner conditions are true:

{#Region == "North America"} North American Standard Terms Apply. {#CustomerType == "Enterprise"} Enterprise SLA: 4-hour guaranteed response time, 24/7 support. {/} {/}

Result: All North American customers see the first line. Only North American Enterprise customers also see the SLA line.

Pattern 2 — If/Else Statement inside an If Block

Show a label that changes, but only within a larger conditional section:

{#Status == "Active"}
This account is currently active.
Account tier: {Amount > 50000 ? "Premium" : "Standard"}
{/}

Pattern 3 — Nested If/Else Block (Multiple Tiers)

Show different content for three or more tiers:

{#Amount > 100000}
Platinum Client — Dedicated Account Manager Assigned
{/}
{^Amount > 100000}
{#Amount > 50000}
Gold Client — Priority Support Included
{/}
{^Amount > 50000}
Standard Client — Self-Service Portal Access
{/}
{/}

Result: Platinum for >$100k, Gold for $50k–$100k, Standard for everything else.

How to add nested conditions: Build the outer condition first using the add-in, then position your cursor inside that block in Excel and type or Insert the inner condition. Make sure every {#…} opening tag has a matching {/…} closing tag. Use the Preview tab to test all combinations.

6.3 Operators & Multiple Conditions

Comparison Operators

Operator

Meaning

Example

==

Equals exactly

Status == "Approved"

!=

Does not equal

Status != "Draft"

>

Greater than

Amount > 10000

<

Less than

Discount < 5

>=

Greater than or equal to

Score >= 80

<=

Less than or equal to

Days <= 30

contains

Field value contains this text

Name contains "Corp"

startsWith

Field value starts with this text

Email startsWith "info@"

endsWith

Field value ends with this text

Email endsWith "@gmail.com"

Multiple Conditions

Click "Add Condition" in the add-in to add more condition rows. Connect them with:

AND (&&) — ALL conditions must be true for the content to show
OR (||) — if ANY one condition is true, the content shows

6.4 Step-by-Step: Building a Condition

1
Make sure your Primary Object is selected.
2
From the Action dropdown, choose Conditions.
3
Choose the condition type: If Block or If/Else Statement.

4
Select a Field from the dropdown (e.g., StageName).

5
Choose an Operator from the dropdown (e.g., ==).
6
Enter a Value in the text box (e.g., type Closed Won ). This is the value you are comparing against.
7
(Optional) Click Add Condition to add another rule, then choose AND or OR to connect them.
8
In the Content text box, type the text or paragraph to show when the condition is TRUE.
9
(If/Else only) In the Alternate Content text box, type the text to show when the condition is FALSE.
10
Click Insert or Copy.

Group 613

Figure 11: Setting up an If Block condition

Group 617

Figure 12: If/Else statement with Content and Alternate Content

6.5 Real-Life Examples

Example 1 — If Block: Finance Approval Notice

Show the approval paragraph only when Approval Status equals "Approved":

{#ApprovalStatus == "Approved"} This quote has been reviewed and approved by the Finance department. All pricing and terms are final. {/}

Example 2 — If/Else Block: Deal Tier Label

Show "ENTERPRISE DEAL" for amounts over $50,000, otherwise "STANDARD DEAL":

{#Amount > 50000}
ENTERPRISE DEAL — VP Approval Required
{/}
{^Amount > 50000}
STANDARD DEAL — Standard Terms Apply
{/}

Example 3 — Multiple Conditions (AND): Priority Customer Notice

Show a notice only for customers who are Active AND New:

{#Status == "Active" && Type == "New Customer"}
Priority New Customer — Please attach the Onboarding Checklist.
{/}

Example 4 — Multiple Conditions (OR): Payment Processing Note

Show a note for customers paying by Check OR Wire Transfer:

{#PaymentMethod == "Check" || PaymentMethod == "Wire Transfer"} Please allow 5–7 business days for payment processing.
{/}

6.6 Custom Conditions — Direct Document Editing (Advanced)

This is the same inline If/Else Statement syntax described in 6.1— the same format the add-in's If/Else Statement button generates for you. You only need to type it by hand when the UI button doesn't cover what you need: for example, using a Salesforce field name (unquoted) as the TRUE or FALSE value instead of literal text, combining comparison operators the button doesn't expose, or placing the condition inside a nested block.

Syntax: {field operator value ? "text if true" : "text if false"}

{StageName == "Closed Won" ? "Deal Closed — Begin Onboarding" : "Deal In Progress"} {Amount > 10000 ? "High Value Account" : "Standard Account"} {IsActive ? "Active Customer" : "Former Customer"} {Discount > 0 ? "Discounted Pricing Applied" : "Standard Pricing"}

1
Click in your Excel Sheet where you want the inline condition.
2
Type the tag using the inline If/Else syntax shown above.
3
Use straight quotes ( " ) — not Excel's curly/smart quotes ( " " ).
4
If Excel autocorrects your quotes to curly quotes, press Ctrl+Z immediately to undo.
5
Go to the PREVIEW tab to verify the condition renders correctly.

Picture 1036

Figure 13: Inline If/Else condition typed directly in an Excel Sheet

7. Action: View

What it does: Inserts a repeating block that lists all related child records from Salesforce into your document. For example, all the products on a quote, all contacts at an account, or all tasks on an opportunity.

7.1 Three Layout Types

Layout

What it looks like

Best for

Real-world example

Table

Rows and columns — like a spreadsheet

Structured data where comparison across columns is useful

Opportunity Line Items (Product | Qty | Unit Price | Total)

Loops

Each record is a repeated block of formatted text

Narrative or labeled fields

— one "card" per record

Contact directory (Name, Title, Email, Phone — one block per person)

Grid

Records in multiple columns side-by-side (2–4 per row)

Compact visual display of many items

Product catalog (Name + Price in cards, 3 per row)

7.2 Complete Step-by-Step: Creating a View

Step 1: Select View Type

From the View Type dropdown, choose Table, Loops, or Grid.

Group 676

Figure 14: Choosing a View Type

Step 2: Select Child Relationship

This is the related list (child object) connected to your primary object. Examples:

Primary Object = Quote → child relationships include: QuoteLineItems, Contacts, Attachments
Primary Object = Account → child relationships include: Contacts, Opportunities, Cases, Orders
Primary Object = Opportunity → child relationships include: OpportunityLineItems, Tasks, Events, Notes

Selecting a child relationship works the same way as selecting a field in the Field action (see Section 5):

1
Click the Select Field dropdown to open the field browser.
2
Browse or type to search for a relationship field (look for the 🔗 reference icon).
3
Click the chevron next to a reference/lookup field to drill into that related object.
4
Continue drilling deeper through relationship fields as needed (up to 5 levels).

Group 704

Figure 15: Selecting the child relationship using the field dropdown

Step 3: (Optional) Using Parent Fields Inside a Loop

Inside a loop, you can reference fields from the parent record (the primary object). For example, inside an OpportunityLineItems loop, you can display the parent Opportunity's name on every row.

Use dot notation referring to the parent: {Opportunity.Name} inside an OpportunityLineItems loop
This is useful for things like showing the Opportunity Name as first column for each line item row.

Group 711

Figure 16: Accessing parent record fields inside a loop

Step 4: Add Fields to "Selected Fields"

Selecting fields for the view works the same way as the Field action (see Section 5):

1
Click the Select Field dropdown to open the field browser.

2
Browse or type to search for your desired field.

3
If you see a field with a chevron (reference/lookup field), click it to drill into that related object and see its fields.
4
Click your target field to select it — it will be added to the Selected Fields list.
5
Repeat to add more fields. Fields appear in the Selected Fields list in the order they were selected.
6
To remove: Click the remove button next to a field in the Selected Fields list.

Each selected field is shown with a number indicating its position in the list.

Group 751

Figure 17: Selecting fields using the dropdown and viewing them in the Selected Fields list

Step 5: Reorder Your Fields

The order of fields in "Selected Fields" = the column order (for Table) or display order (for Loops/Grid) in the document. By default, fields appear in the order they were selected. To reorder:

Drag and drop a field in the Selected Fields list to your desired position.
Each field displays a number indicating its current position — the numbering updates as you reorder.

Group 754

Figure 18: Reordering Selected Fields by dragging and dropping

Step 6: Set Row Count (Row Limit)

Enter the maximum number of child records to include in the document.

Example: Enter 10 → only the first 10 records are shown
Leave blank or enter 0 → unlimited (all records)
Recommendation: Set a reasonable limit (e.g., 50 for line items) to prevent unexpectedly long documents

Step 7: Set Sort Field

Choose which field to use for sorting the child records. Example: sort Opportunity Line Items by "Quantity" or "Unit Price".

Step 8: Set Sort Direction

ASC (Ascending): A → Z, 0 → 9, Oldest → Newest
DESC (Descending): Z → A, 9 → 0, Newest → Oldest

Step 9: (Grid only) Set Grid Columns

Choose how many cards appear per row: 2, 3, or 4 columns.

Step 10: Insert or Copy

Click Insert to place the view block at your cursor in Excel, or Copy to paste it manually.

Group 764

Figure 19: The generated view tag and output options

7.3 Real-Life Examples

Example 1 — Table: Quote Line Items on a Sales Quote

Scenario: You're building a Sales Quote document. The customer wants to see all products with their quantities and prices in a clean table.

Setting

Value

View Type

Table

Child Relationship

QuoteLineItems

Selected Fields

Product Name, Description, Quantity, Unit Price, Total Price

Sort Field

Product Name

Sort Direction

ASC

Row Count

50

What the final document looks like:

Product Name

Description

Qty

Unit Price

Total

Support Plan Annual

24/7 support coverage

1

$200.00

$200.00

Widget Lite

Basic model

10

$49.00

$490.00

Widget Pro

Standard model

5

$99.00

$495.00

Example 2 — Loops: Contact Directory on an Account Profile

Scenario: You're creating an Account Profile document that lists all key contacts at the customer's company, formatted as labeled blocks — one per person.

Setting

Value

View Type

Loops

Child Relationship

Contacts

Selected Fields

First Name, Last Name, Title, Email, Phone

Sort Field

Last Name

Sort Direction

ASC

Row Count

10

What the final document looks like:

Name: Sarah Johnson
Title: VP of Procurement
Email: sarah.johnson@acme.com
Phone: (415) 555-0101
Name: Michael Chen
Title: IT Director
Email: mchen@acme.com
Phone: (415) 555-0202

Example 3 — Grid: Product Brochure Catalog

Scenario: You're creating a product brochure and want to display products as compact cards — 3 per row — showing the name, description, and price.

Setting

Value

View Type

Grid

Child Relationship

Products (or OpportunityLineItems)

Selected Fields

Product Name, Short Description, Price

Sort Field

Name

Sort Direction

ASC

Grid Columns

3

What the grid layout looks like (3 cards per row):

| Widget Lite |
| Basic model |
| $49.00 |
| Widget Max |
| Premium model |
| $199.00 |
| Widget Pro |
| Standard model |
| $99.00 |

7.4 Summarize / Aggregate (Advanced — Direct Document Entry)

The system supports summing a numeric field across all child records. This feature is not available in the add-in's UI but works when you type the tag directly into your Excel Sheet.

Syntax: {RelationshipName | sumBy:'FieldName'}

Total Amount: {OpportunityLineItems | sumBy:'TotalPrice'}
Grand Total (formatted option 1):
{OpportunityLineItems | sumBy:'TotalPrice' | toFixed:2}
Grand Total (formatted option 2):
{OpportunityLineItems | sumBy:'TotalPrice' | format:2:'10,000,000.5':'$'}
Total Items Ordered:
{OpportunityLineItems | sumBy:'Quantity'}
1
Click in your Excel document where you want the total to appear (e.g., below your line items table).
2
Type: {OpportunityLineItems | sumBy:'TotalPrice'}
3
Replace OpportunityLineItems with your actual child relationship name.
4
Replace TotalPrice with the exact Salesforce API field name (case-sensitive).
5
Add formatting if needed: | format:2:'10,000,000.5':'$' for a currency total, or | toFixed:2 for
decimals only.
6
Go to the Preview tab to verify the sum calculates correctly.
Case-Sensitive Field Names: Field names in sumBy must match the Salesforce API name exactly (e.g.,
TotalPrice not Total Price ). Check in Salesforce Setup → Object Manager if unsure.

7.5 Calc — Expression Evaluator (Advanced — Direct Document Entry)

The calc filter is a powerful, unified expression evaluator that lets you perform arithmetic, comparisons, and logical operations directly in your template tags. It works on both arrays (child records) and scalar values (text, numbers). This feature is not available in the add-in's UI — type the tags directly into your Excel Sheet.

Syntax: {Input | calc:'expression'}

Arithmetic on Child Record Fields

Use field names inside the expression to sum that field across all child records, then perform arithmetic on the result. You can use sumBy(FieldName) or just use the field name directly — both are equivalent.

Sum of TotalPrice:
{OpportunityLineItems | calc:'TotalPrice'}
Same as above using explicit sumBy:
{OpportunityLineItems | calc:'sumBy(TotalPrice)'}
Multiply two field sums:
{OpportunityLineItems | calc:'UnitPrice * Quantity'}
Compound expression with parentheses:
{OpportunityLineItems | calc:'(UnitPrice * Quantity) / 100'}
Formatted result:
{OpportunityLineItems | calc:'(UnitPrice * Quantity) / 100' | toFixed:2}
{OpportunityLineItems | calc:'TotalPrice' | format:2:'10,000,000.5':'$'}

Percentage Discount / Markup

Use N% after + or to add or subtract a percentage of the preceding value. This follows common business logic for discounts and markups.

Subtract 10% discount from total:
{OpportunityLineItems | calc:'TotalPrice – 10%' | toFixed:2}
Add 15% markup:
{OpportunityLineItems | calc:'TotalPrice + 15%' | toFixed:2}
Chain with other operations:
{OpportunityLineItems | calc:'(UnitPrice * Quantity) – 5%' | toFixed:2}

How percentage works:

TotalPrice – 10% means "sum of TotalPrice minus 10% of that sum." If the sum is 1000, the result is 1000 – 100 = 900.

Using Parent Record Values ($1, $2, …)

Filters cannot access parent record fields directly. To use a parent field value inside a calc expression, pass it as an extra argument after the expression string and reference it with $1, $2, etc.

Subtract parent Amount from line item total:
{OpportunityLineItems | calc:'TotalPrice – $1':Amount | toFixed:2}
Use two parent fields:
{OpportunityLineItems | calc:'TotalPrice – $1 + $2':Amount:Discount | toFixed:2}

How $N works:

$1 refers to the first value after the expression string, $2 the second, and so on. These values are resolved from the parent Salesforce record by the template engine.

Length — Count Records or Characters

Use the length keyword to get the count of child records in an array or the character count of a text field.

Number of line items:
{OpportunityLineItems | calc:'length'}
Length of a text field:
{Name | calc:'length'}
Arithmetic with length:
{OpportunityLineItems | calc:'length * 2'}

Conditions — Show / Hide Content

Use comparison and logical operators with the {#…}{/} conditional block syntax to show or hide sections of your document based on calculated values.

Comparison operators: ><>=<===!=

Logical operators: && (AND), || (OR), ! (NOT)

Show content only if line items exist:
{#OpportunityLineItems | calc:'length > 0'} This opportunity has {OpportunityLineItems | calc:'length'} line items. {/}
Show content if more than 5 items:
{#OpportunityLineItems | calc:'length > 5'} Large order — qualifies for bulk discount. {/}
Combined condition (AND):
{#OpportunityLineItems | calc:'length > 0 && length < 100'} Standard processing applies. {/}
Compare length against a parent field value:
{#OpportunityLineItems | calc:'length > $1':MinItems} Minimum item requirement met. {/}

All Supported Operators

Operator

Description

Example

+

Addition

calc:'TotalPrice + 100'

Subtraction

calc:'TotalPrice – Discount'

*

Multiplication

calc:'UnitPrice * Quantity'

/

Division (0 returns 0)

calc:'TotalPrice / Quantity'

%

Modulo (remainder)

calc:'Quantity % 3'

** or ^

Exponentiation (power)

calc:'TotalPrice ** 2'

N%

Percentage of left operand

calc:'TotalPrice – 10%'

(unary)

Negation

calc:'-TotalPrice'

( )

Grouping

calc:'(A + B) * C'

> < >= <=

Comparison

calc:'length > 0'

== !=

Equality / Inequality

calc:'length == 5'

&&

Logical AND

calc:'length > 0 && length < 100'

||

Logical OR

calc:'length == 0 || length > 10'

!

Logical NOT

calc:'!(length > 5)'

Complete Examples

Use Case

Tag

Sum a field

{OpportunityLineItems | calc:'TotalPrice'}

Sum with formatting

{OpportunityLineItems | calc:'TotalPrice' | toFixed:2}

Subtract 10% discount

{OpportunityLineItems | calc:'TotalPrice – 10%' | toFixed:2}

Add 15% markup

{OpportunityLineItems | calc:'TotalPrice + 15%' | toFixed:2}

Multiply two field sums

{OpportunityLineItems | calc:'UnitPrice * Quantity' | toFixed:2}

Compound expression

{OpportunityLineItems | calc:'(UnitPrice * Quantity) / 100' | toFixed:2}

Use parent record value

{OpportunityLineItems | calc:'TotalPrice – $1':Amount | toFixed:2}

Count child records

{OpportunityLineItems | calc:'length'}

Count string characters

{Name | calc:'length'}

Condition: has items

{#OpportunityLineItems | calc:'length > 0'}…{/}

Condition: compare to value

{#OpportunityLineItems | calc:'length > $1':MinItems}…{/}

Condition: AND logic

{#OpportunityLineItems | calc:'length > 0 && length < 50'}…

{/}

Negation

{OpportunityLineItems | calc:'-TotalPrice'}

Exponentiation

{OpportunityLineItems | calc:'TotalPrice ** 2'}

1
Click in your Excel document where you want the calculated value or conditional block.
2
Type the tag directly — for example: {OpportunityLineItems | calc:'TotalPrice – 10%' |
toFixed:2}

3
Replace OpportunityLineItems with your child relationship name.

4
Replace field names in the expression with exact Salesforce API field names (case-sensitive).
5
To use a parent record field, add it after the expression string: | calc:'TotalPrice – $1':Amount
6
Add formatting if needed: | toFixed:2 or | format:2:'10,000,000.5':'$'
7
Go to the Preview tab to verify the result.
Case-Sensitive Field Names: Field names inside calc expressions must match the Salesforce API name exactly (e.g., TotalPrice not totalprice ). Check in Salesforce Setup → Object Manager if unsure.
Division by Zero: Dividing by zero returns 0 instead of an error. The same applies to modulo by zero.

8. Action: Image

What it does: Inserts a dynamic image from a Salesforce record into your document. The image is fetched and embedded automatically when the document is generated. Common uses:

Company or account logo in the document header
Product photos in a catalog or proposal
User profile photos in contact sheets
Signature images in contracts

Step-by-Step: Inserting an Image

1
Select your Primary Object.

2
From the Action dropdown, choose Image.

3
Choose the Source Type:
URL — a publicly accessible image URL.
Salesforce File Id — a ContentDocumentId or ContentVersionId of a file stored in Salesforce Files.
4
Enter the value based on the source type you chose:
For URL — paste the full image URL (e.g., https://example.com/logo.png ).
For Salesforce File Id — paste the Content Document Id (15/18-char Id starting with 069 ) or Content Version Id (starting with 068 ).
5
Set the Width and Height (in pixels).
6
Click Insert or Copy.

Group 1121

Figure 20: Image action — choose source type, enter URL or File Id, then set size

Image Tag Syntax

Image tags use the %Img(…) function with three arguments: the source (URL or File Id, in quotes — or a Salesforce field name unquoted), width, and height in pixels.

{%Img('Salesforce File Id', width, height)}
{%Img('https://your-url/image.png', width, height)}
{%Img(FieldApiName__c, width, height)}

Examples

Tag

What it inserts

{%Img('069dM00000OdBPBQA3', 300, 300)}

File from Salesforce by ContentDocumentId, sized 300×300px

{%Img('068dM00000Jd3vxQAB', 300, 300)}

File from Salesforce by ContentVersionId, sized 300×300px

{%Img('https://monochrome-watches.com/app/uploads/2025/12/2026-Land-Rover-Defender-Dakar-DX7-R-Featured-1536×1024.jpg', 300, 300)}

Image fetched from a public URL, sized 300×300px

{%Img(ImageId__c, 300, 300)}

Resolves the field value at runtime (the field should contain a URL or a Salesforce File Id), sized 300×300px

Quoted vs unquoted source: Wrap a literal URL or File Id in single quotes. Use a bare field API name (no quotes) when the source value lives on the record and should be resolved at generation time.

Real-Life Scenario: Using a Merge Field as the Image Source

If the image source (a URL or a Salesforce File Id) is already stored on the record in a field, pass the field API name unquoted as the first argument. The system reads the field value at generation time and uses it as the image source.

{%Img(FieldApiName__c, 300, 300)}

Example — the ImageId__c field on the record holds an image URL or a Salesforce File Id:

{%Img(ImageId__c, 300, 300)}

This is the most common pattern for record-driven templates: each generated document automatically pulls the right image (logo, signature, product photo, etc.) from the record being merged.

Real-Life Scenario: Professional Document Header

Place this at the very top of your Excel template to create a branded header on every generated document:

{%Img(Account.LogoUrl__c, 200, 60)}
{Organization.Name}
Prepared by: {User.FirstName} {User.LastName} | {User.Title} Date: {TODAY | formatDate:'MMMM DD, YYYY'}

Supported image formats: PNG, JPEG/JPG, SVG

9. Copy vs. Insert — Which Should I Use?

After configuring any field, condition, view, or image in the add-in, you will see two buttons at the bottom: Copy and Insert. Both put the generated tag into your Excel Sheet — they just do it differently.

Copy

Insert

What it does

Copies the generated tag to your clipboard

Places the tag directly at your cursor position in Excel

Then what

Switch to Excel, click where you want it, press Ctrl+V to paste

Nothing else needed — the tag is already placed

Best for

Placing a tag inside a Excel table cell, or at a very specific location

When building the template sequentially from top to bottom

Confirmation

Button briefly shows "Copied "

Button briefly shows "Inserted "

For Insert to work: You must click inside your Excel Sheet first to set your cursor position before clicking Insert. The add-in panel and the Excel Sheet are separate — Excel needs to know where your cursor is. If Insert does not seem to work, click once inside your document, then click Insert again.

Tip for tables: When inserting tags inside Excel table cells, use Copy, then click inside the correct table cell in your document, and press Ctrl+V to paste. This gives you precise control over placement.

10. Preview Tab — Test Your Template (Step 2)

What it does: Renders your template with real Salesforce data so you can see exactly what the final generated document will look like — before you publish anything.

Why this matters: It lets you catch mistakes — wrong field names, broken conditions, unexpected blank values — before real users see them.

CRITICAL WARNING — Do NOT Edit the Document in Preview Mode
The Preview tab generates a live copy of your template filled with real data. Any edits you make to the Excel document while in Preview mode are NOT saved back to your template.
If you fix text, reposition content, or change anything in the document while previewing, those changes will be permanently lost the next time you generate a preview or when the template is used to create a document.
Rule: Preview is for viewing only. If you spot something that needs fixing, go back to the CREATE tab and make the correction there, then re-preview.

Step-by-Step: Using the Preview Tab

1
Click the PREVIEW tab at the top of the add-in panel (Step 2 in the wizard).
2
In the Preview Record section, you will see a search box.
3
Type the name of a record to search (e.g., type "Acme" to find records related to Acme Corporation).

4
Select a record from the dropdown results.

5
The add-in generates your template with that record's real data and displays the result in Excel.
6
Review the document carefully — check that all fields, conditions, and tables render correctly.
7
If you see an error or something unexpected, note what is wrong → go back to the CREATE tab → fix the tag →
return to PREVIEW and repeat.

Group 1212

Figure 21: The Preview tab — search for and select a record

Group 1216

Figure 22: Preview result — template rendered with real data

Understanding Preview Results

What you see

What it means

What to do

All fields show real values

Template is working correctly

Ready to publish!

Some fields are blank

That field is empty on the selected record

Try a different record that has data, or check the record in Salesforce

An error message appears

A tag has a typo, deleted field, or syntax error

Note the field name → go to CREATE tab → fix the tag

Wrong value displayed

You selected the wrong field in the add-in

Remove the tag, re-select the correct field in CREATE tab

Condition always shows/hides

The condition logic may be inverted or using wrong operator

Test with records where condition should be both true and false

Best Practices for Previewing

Test with at least 2–3 different records, including edge cases
Test with a record that has empty optional fields — blank fields display as blank (not as an error), which is the correct behavior
For every condition, test with a record where the condition is TRUE and one where it is FALSE
Use sandbox records with realistic test data for the most accurate preview
Do not edit the document during preview — any changes will be lost

11. Live Tab — Publish Your Template (Step 3)

What it does: Saves your finished template to Salesforce and makes it available for users to generate documents.

Group 1221

Figure 23: The Live tab — publish your template

11.1 Fields Explained

Field

Description

Example

Primary Object

(Read-only) The Salesforce object this template is for

Opportunity

Template Name

The internal name used to find this template in the listing

2024 Sales Opportunity Template

Document Name

The filename for generated documents. Supports merge tags!

Opportunity_{Name}

Status

Draft = still building | Active = live and ready

Active

Document Type

Format of the generated file

XLSX

11.2 Status Options

Status

What it means

When to use

Draft

Template is saved but NOT available to users for document generation

While you are still building or testing the template

Active

Template IS available to users for document generation

When the template is fully tested and ready to use

11.3 Document Type Options

Type

What it generates

XLSX

Always generates a Microsoft Excel (.xlsx) file

11.4 Smart Document Naming

The Document Name field supports merge tags — making every generated file uniquely named. This makes it easy to find specific documents in Salesforce later.

Document Name you enter

Generated filename

Opportunity_{Name}

Opportunity_Green Farm Deals

{Account.Name}_Proposal

Acme Corporation_Proposal

{Account.Name}_Opportunity_{Name}

Acme Corporation_Opportunity_Green Farm Deals

Proposal_{TODAY | formatDate:'MM-DD-YYYY'}

Proposal_01-15-2024

How to get a tag for the Document Name: Go back to the CREATE tab, select the Field action, pick your desired field (e.g., Name), and click Copy. Then come back to the LIVE tab and paste the tag into the Document Name field. Alternatively, if you know the field API name, you can simply type it in
{FieldName} format directly — for example: {Account.Name}_Quote_{QuoteNumber} .

11.5 Step-by-Step: Publishing Your Template

1
Click the LIVE tab (Step 3 in the wizard).
2
Confirm the Primary Object shown (read-only).
3
Enter a descriptive Template Name (e.g., "2024 Sales Opportunity Template").
4
Enter a Document Name. Use merge tags for unique, meaningful filenames (see examples above). You can type
the tag manually or paste it from the CREATE tab.
5
Set Status:
Draft — if you are still testing
Active — when fully ready for users

6
Set Document Type: Doc, PDF, or Any.

7
Click the appropriate button:
"Publish Template" — if this is a new template being saved to Salesforce for the first time
"Update Template" — if you are editing an existing template that was previously published
8
A success confirmation appears — your template is now saved in Salesforce.
Note — Versioning: When you click "Update Template", a new version of the template file is created under the same template record in Salesforce. Previous versions are preserved and can be viewed in the Preview Attached Files component on the template record page. This allows you to roll back to an earlier version if needed.
Note — Activation: Template activation can be controlled from either location:
From the Excel Add-In: Set the Status field to "Active" in the Live tab before clicking Publish/Update.
From Salesforce: Open the template record and use the Preview Attached Files component to activate the desired version.
If you set the Status to "Draft", the template will be saved to Salesforce but will not appear in the template selection dropdown during document generation until it is activated.

12. Tag Syntax Quick Reference

Manual Entry: You do not have to use the add-in for every tag. If you are comfortable with the syntax, you can type these tags directly into your Excel document. Use straight quotes ( " ) — not Excel's curly smart quotes. Use the Preview tab to verify manually typed tags work correctly.

Basic Field Tags

Tag

Example

Description

{FieldName}

{Name}

Simple field value (case-insensitive)

{Object.Field}

{Account.Name}

Nested lookup field (up to 5 levels)

Formatting Tags

Tag

Example

Description

{Field | formatDate:'format'}

{CloseDate |

formatDate:'MM/DD/YYYY'}

Format a Date or DateTime field. Append a time pattern for DateTime (e.g., 'MM/DD/YYYY HH:mm:ss' )

{Field | toFixed:N}

{TotalPrice | toFixed:2}

Set decimal places only — keeps org's default number formatting

{Field | format:N:'pattern'}

{Amount |

format:0:'10,000,000.5'}

Full number format — decimal places + thousands/decimal separator pattern

{Field |

format:N:'pattern':'symbol'}

{Amount |

format:2:'10,000,000.5':'$'}

Full number format with currency symbol

{Field | addDays:N}

{CloseDate | addDays:30}

Offset date forward by N days. N can be positive or negative.

{Field | subtractDays:N}

{ContractEndDate | subtractDays:14}

Offset date backward by N days. N can be positive or negative.

{Rel |

orderBy:'Field':'asc'|'desc'}

{#Contacts |

orderBy:'LastName':'asc'}

Order rows in a table, loop, or grid (child records)

{Rel | limit:N}

{#OpportunityLineItems | limit:10}

Limit rows in a table, loop, or grid (child records)

Pattern values for format : '10,000.5' (US) · '10.000,5' (European) · '10 000,5'
(International) · '1,00,000' (Indian).

Conditional Tags

Tag

Description

{#field == "val"}content{/}

If Block — show content when condition is true; nothing if false

{#Cond}yes{/} {^Cond}no{/}

If/Else block — show "yes" when true, "no" when false (manual pattern: add a second block with ^ in place of # )

{Condition ? "yes" : "no"} or

{Condition ? yes_fieldc : no_fieldc}

Inline ternary — TRUE/FALSE values may be literal text (quoted) or Salesforce field names (unquoted)

{#f1 == "v1" && f2 == "v2"}…{/}

Multiple conditions with AND

{#f1 == "v1" || f2 == "v2"}…{/}

Multiple conditions with OR

View / Loop Tags

Tag

Example

Description

{#Relationship}…

{/Relationship}

{#OpportunityLineItems}…

{/OpportunityLineItems}

Loop through child records

{#Rel|orderBy:'Field':'asc'}

{#Contacts|orderBy:'LastName':'asc'}

Loop with sort (ascending)

{#Rel|orderBy:'Field':'desc'}

Loop with sort (descending)

{#Rel|limit:10}

Limit to first 10 records

{Rel|sumBy:'Field'}

{OpportunityLineItems|sumBy:'TotalPrice'}

Sum a numeric field across all child records

{Rel|calc:'expression'}

{OpportunityLineItems|calc:'TotalPrice -10%'}

Evaluate an arithmetic expression on child record fields

{Rel|calc:'expr':ParentField}

{OpportunityLineItems|calc:'TotalPrice – $1':Amount}

Expression using a parent record value via $1

{Rel|calc:'length'}

{OpportunityLineItems|calc:'length'}

Count child records (or string characters)

{#Rel|calc:'length > 0'}…{/}

{#OpportunityLineItems|calc:'length > 0'}…{/}

Conditional block — show content based on a calculated condition

Image Tags

Tag

Example

Description

{%Img('SF File Id', W, H)}

{%Img('069dM00000OdBPBQA3', 300,

300)}

Insert a Salesforce file by ContentDocumentId

( 069… ) or

ContentVersionId ( 068… ) at W×H pixels

{%Img('url', W, H)}

{%Img('https://example.com/logo.png', 300, 300)}

Insert an image fetched from a public URL at W×H pixels

{%Img(FieldApiName, W, H)}

{%Img(ImageId__c, 300, 300)}

Resolve the source from a record field at runtime (field value should be a URL or a Salesforce File Id) — note: no quotes around the field name

Global Variable Tags

Tag

Description

{TODAY}

Today's date

{YESTERDAY}

Yesterday's date

{TOMORROW}

Tomorrow's date

{THIS_WEEK}

Monday of the current week

{THIS_MONTH}

1st of the current month

{THIS_QUARTER}

1st of the current fiscal quarter

{THIS_YEAR}

January 1st of the current year

{CURRENT_YEAR}

Current year as a 4-digit number

{User.FirstName}, {User.LastName}, etc.

Fields from the user generating the document

{Organization.Name}

Your Salesforce organization name

Date Format Tokens

Token

Meaning

Example Output

YYYY

4-digit year

2024

MM

2-digit month

01, 12

MMMM

Full month name

January, December

MMM

Abbreviated month

Jan, Dec

DD

2-digit day

01, 31

HH

24-hour hour

00, 15, 23

hh

12-hour hour

01, 03, 12

mm

Minutes

00, 30, 59

ss

Seconds

00, 30, 59

A

AM or PM

AM, PM

13. Tips & Best Practices

Start in Sandbox: Always build and test templates in your Salesforce Sandbox before creating them in Production. Mistakes in Sandbox have no impact on real customers.
Draft first, Active later: Keep Status = Draft while building. Only switch to Active once you have thoroughly previewed and verified the template.
Preview with multiple records: Test with at least 3 different records. Include records where optional fields are empty to see how blank values display.
Test both sides of every condition: For every If Block and If/Else condition, preview with a record where the condition is TRUE and one where it is FALSE.
Use unique Document Names: Include merge tags like {Account.Name}_{Name} in the Document Name so generated files are easy to find and distinguish.
Cursor position for Insert: Always click inside the Excel Sheet to place your cursor before clicking Insert. The add-in needs to know where to place the tag.
Tags inside table cells: Use Copy → click inside the table cell → Ctrl+V for precise placement inside Excel table cells.
Use Add Days for deadline calculations: Use {InvoiceDate | addDays:30} to automatically calculate payment due dates, expiry reminders, renewal dates, etc.
Avoid deep nesting unnecessarily: Reference fields up to 3 levels deep work great. Going 4–5 levels is supported but may slow document generation slightly.
Smart quote warning: When typing tags directly in Excel, use straight quotes (") not curly/smart quotes (“ ”). Press Ctrl+Z immediately if Excel autocorrects your quotes.
Use the format option for consistent numbers: Use the Number Format setting to ensure amounts display correctly for your document's target region (US, European, Indian, etc.).
Don't forget headers and footers: You can place merge tags inside Excel headers and footers too — great for page numbers combined with a document title tag like {Name}.

14. Troubleshooting

Problem

Likely Cause

Solution

Error: "Field not found"

The field was renamed or deleted in Salesforce

Re-select the field in the add-in using the field selector, or update the tag in your document to match the current field API name

Preview shows blank where a value should be

That field is empty on the selected record

Try a different record that has data in that field, or enter data on the record in Salesforce first

Insert button does nothing or inserts in the wrong place

No cursor position set in Excel

Click inside the Excel Sheet to position your cursor, then click Insert again

Login fails or authentication error

OAuth or External Client App misconfiguration

Contact your Salesforce administrator to check the External Client App settings and user permissions

Template doesn't appear in the listing

Wrong environment (Production vs. Sandbox) or template is Draft

Check you are signed into the correct environment. If Status is Draft, it won't appear for end users — set to Active to make it available

Smart quote error in tag

Excel autocorrected your typed quotes to curly/smart quotes

Replace curly quotes with straight quotes in the tag, or type tags in Notepad first then paste into Excel

Image shows as broken/missing

The image field is empty or does not contain a valid image URL or attachment

Verify the field value exists and contains a valid image in Salesforce. Check with your administrator if the field should contain an image

Sum total shows 0 or wrong value

Wrong field API name in the sumBy tag (case-sensitive)

Use the exact Salesforce API field name. Check in Salesforce Setup → Object Manager → Fields for the correct API name

Template saves but users cannot find it

Status is still set to Draft

Go to the Live tab, change Status to Active, and click Save again

View/Loop shows no records

The selected record has no child records in that relationship

Test with a different record that has data in the related list

Condition always shows or always hides

Condition logic is inverted, or comparing to the wrong value

Check the field value in the actual Salesforce record. Make sure the value you typed matches exactly (including capitalization)

My preview edits disappeared

Edits made in Preview mode are not saved to the template

This is expected behavior — Preview is read-only. Make your changes in the Excel Sheet using the CREATE tab, then re-preview

360 InstantDocs — Excel Add-In User Guide • Version 1.0

© 2026 360 InstantDocs. All rights reserved.

Explore Other Articles

We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.

logo Live Chat