Templates

Documents includes a template system that allows you to create reusable document templates with dynamic field mappings. Templates are particularly powerful when combined with spreadsheet quotation integration, enabling salespeople to generate sale orders directly from filled-in spreadsheet templates.

Understanding Templates

A template is a document with the is_template flag enabled. Templates differ from regular documents in several ways:

  • Templates appear in the Templates menu section

  • Templates are organized by category (sales, project, HR, finance, marketing, legal, other)

  • Templates support field mappings – dynamic placeholders that are replaced with real data when a working copy is created

  • Templates generate working copies instead of being edited directly

Template Categories

Templates are organized into categories to help users find the right starting point:

Category

Typical Templates

Sales

Quotation templates, proposals, price lists, order forms

Project

Project plans, status reports, timelines, meeting notes

HR

Employment contracts, onboarding checklists, policies, job descriptions

Finance

Invoice templates, budget worksheets, expense reports, financial statements

Marketing

Campaign briefs, content calendars, brand guidelines, press releases

Legal

Contract templates, NDA templates, compliance documents, terms of service

Other

General-purpose templates that do not fit other categories

Creating a Template

From an existing document

  1. Open an existing document that you want to use as a template

  2. Enable the Is Template toggle or flag

  3. Select the appropriate Template Category

  4. Click Save

The document is now available in the Templates section and can be used to generate working copies.

From scratch

  1. Navigate to the Templates section

  2. Click New

  3. Choose the document type (file or spreadsheet)

  4. Create the template content

  5. Set the Template Category

  6. Click Save

Tip

For spreadsheet templates intended for quotation generation, design the layout with clear sections for header information (customer, date, reference) and line items (products, quantities, prices).

Working Copies

A working copy is an independent copy of a template that can be freely edited without affecting the original template. Working copies are the primary way templates are used in daily work.

Creating a working copy

  1. Navigate to the Templates section

  2. Find the desired template

  3. Click Create Working Copy (or the equivalent action)

  4. A new document is created as a copy of the template

  5. If the template has field mappings and is linked to a CRM opportunity or sale order, the placeholders are automatically replaced with actual data

  6. Edit the working copy as needed

The working copy retains a reference to its source template, making it easy to track which documents were generated from which templates.

Note

Changes to a working copy do not propagate back to the template. Similarly, changes to a template do not affect existing working copies.

Field Mapping

Field mappings define dynamic placeholders within templates that are automatically replaced with real data when a working copy is created.

How field mapping works

  1. A template contains placeholder text (e.g., {{customer_name}})

  2. A field mapping record connects the placeholder to a source field in Progrid

  3. When a working copy is created in the context of a specific record (e.g., a CRM lead), the system looks up the mapped field value

  4. The placeholder in the working copy is replaced with the actual value

Setting up field mappings

  1. Open the template document

  2. Navigate to the field mapping configuration

  3. Click Add a line to create a new mapping

  4. Define the Placeholder text (e.g., customer_name)

  5. Select the Source Model (e.g., CRM Lead, Sale Order)

  6. Select the Source Field (e.g., Partner Name, Expected Revenue)

  7. Click Save

Common field mappings

Placeholder

Source Field

Description

{{customer_name}}

Partner / Name

The customer or contact name

{{customer_email}}

Partner / Email

The customer email address

{{customer_phone}}

Partner / Phone

The customer phone number

{{opportunity_name}}

Lead / Name

The CRM opportunity name

{{expected_revenue}}

Lead / Expected Revenue

The expected deal value

{{salesperson}}

Lead / Salesperson

The assigned salesperson name

{{company_name}}

Company / Name

Your company name

{{today_date}}

Current Date

Today’s date in the configured format

Quotation Integration

The most powerful template feature is the ability to generate Progrid sale orders from spreadsheet templates. This bridges the gap between flexible spreadsheet-based quoting and structured sale order management.

How quotation integration works

  1. A spreadsheet template is created with a layout for quotation line items

  2. Cell mappings define which cells contain product, quantity, and price data

  3. Line ranges define which rows contain the individual line items

  4. A salesperson creates a working copy, fills in the spreadsheet

  5. An action extracts the data and creates a sale order with the corresponding lines

This workflow allows sales teams to use familiar spreadsheet layouts for complex quotes while still feeding data into the Progrid sales pipeline.

Setting up spreadsheet cell mappings

Cell mappings are configured through the sale.order.template.field.mapping model. Each mapping connects a spreadsheet cell (or column) to a sale order line field.

  1. Open the sale order template configuration

  2. Navigate to the field mapping section

  3. For each data element, define:

    • Field Name – The sale order line field (e.g., product, quantity, unit price)

    • Cell Reference – The spreadsheet column or cell that contains this data (e.g., column B for product name, column D for quantity)

  4. Click Save

Typical cell mappings for a quotation template:

Sale Order Field

Spreadsheet Column

Description

Product

Column A or B

Product name or reference

Description

Column C

Line item description

Quantity

Column D

Number of units

Unit Price

Column E

Price per unit

Discount

Column F

Discount percentage (if applicable)

Defining line ranges

Line ranges are configured through the sale.order.template.line.range model. They define which rows in the spreadsheet contain line item data.

  1. Open the sale order template configuration

  2. Navigate to the line range section

  3. Define the start and end rows for each section containing line items

  4. Multiple ranges can be defined if the spreadsheet has line items in different sections (e.g., products in rows 10-20 and services in rows 25-35)

Tip

Design your spreadsheet template with clear, contiguous sections for line items. Leave header rows above and summary rows below the line item ranges.

Example: Complete quotation workflow

This example walks through creating and using a quotation spreadsheet template:

1. Design the template spreadsheet:

Row 1:  [Company Logo]    Quotation
Row 2:  Date: {{today_date}}
Row 3:  Customer: {{customer_name}}
Row 4:  Reference: {{opportunity_name}}
Row 5:  (blank)
Row 6:  Product    Description    Qty    Unit Price    Total
Row 7:  [line item 1]
Row 8:  [line item 2]
...
Row 20: [line item 14]
Row 21: (blank)
Row 22: Subtotal:          =SUM(E7:E20)
Row 23: Tax:               =E22*0.1
Row 24: Total:             =E22+E23

2. Configure field mappings:

  • {{today_date}} maps to the current date

  • {{customer_name}} maps to the partner name from the linked CRM lead

  • {{opportunity_name}} maps to the lead name

3. Configure cell mappings:

  • Column A = Product

  • Column B = Description

  • Column C = Quantity

  • Column D = Unit Price

4. Configure line range:

  • Start row: 7

  • End row: 20

5. Usage:

  1. Salesperson opens the template and creates a working copy linked to a CRM opportunity

  2. Field mappings auto-fill customer name, date, and reference

  3. Salesperson fills in line items in the spreadsheet

  4. Salesperson clicks the action to generate a sale order

  5. The system reads rows 7-20, extracts product/quantity/price data, and creates sale order lines

Sale Order Template Integration

Documents extends the standard Progrid sale order template (sale.order.template) with spreadsheet support. A sale order template can reference a spreadsheet document as its data source, enabling the quotation integration workflow described above.

The extended sale order model (sale.order) also supports creating orders from spreadsheet templates, allowing the entire flow from spreadsheet to confirmed sale order to happen within Progrid.

See also