☰ Menu

Document Templates (Docmosis)

Last update: May 29, 2026


You can automatically generate documents such as quotes or proposals right from within servis.ai using Document Templates. You can personalize the format and style of these templates to fit your brand.  

User Permissions: Only Administrators and App Admins can create new Document Templates

FAQs

What is a Document Template?

A document template is a preformatted document used to generate various types of documents in servis.ai such as quotes and orders. 

What is an App field?

An App field is a specific piece of information or data that is collected, stored, and managed in a servis.ai App record.

What is a Line?

A line contains the details of individual products or services, including specific attributes related to those items such as price and quantity.

Can I use information from a line in a Document Template?

Yes. See Pulling Information from a Line.

Can I use dot.walking in a Document Template?

Yes, but the format is slightly different.

Instead of writing it as Account.Contact, you should write it as:

AccountContact

Docmosis Documentation

If you haven’t used Docmosis before, we would recommend reviewing the Docmosis Cloud Template Guide. Cloud (DWS3) – Template Guide and here.

Creating a DOCX Template

The first step in creating a Document Template for servis.ai is creating a DOCX version in Microsoft Word or LibreOffice Writer. This version should include all the style and brand elements you want in the Document Template as well as all the information you want the document to contain.

DOCX Template Example: Sales Quote- Header

Let’s take a look at an example. We will make a Sales Quote DOCX template, starting with the Header. 

As you can see, we have added our logo and address to the top left corner of the template Header. We have also chosen our preferred fonts and colors. 

On the right-hand side, we have named the template (Sales Quote) and designated a place to display the Sales Quote ID# and Issued Date.

Next, we need to identify our placeholder elements.

Placeholder Elements

While some of the information in a Document Template will remain consistent from document to document, most of the information will need to be updated based on the specific details of each individual document.

For example, in our Sales Quote template Header, the Koda Company logo, address elements, and the document name will all remain the same from quote to quote. 

The Sales Quote ID# and the Issued Date elements, however, will need to be updated each time a new Sales Quote is created. Elements that need to be updated like this are called placeholder elements. 

Here we have outlined the placeholder elements in green.

Next, we need to replace those placeholder elements with Tags.

Tags

Tags designate an existing field within a servis.ai App. Information from the designated field will be used to populate the placeholder element that contains the Tag

Copy in CamelCase

The Copy in CamelCase feature lets you easily copy a field name in the correct format to your clipboard. This ensures it’s ready to be used in document tags without any manual formatting.

copy in camelcase feature.png

Tags are formatted as follows: <<fieldname>>. For example, a Tag for the Account field in the Quotes App would look like this: <<account>>. 

For fields that have multiple words, the first word is spelled out in lowercase letters, and the next word begins with a capital. There are no spaces between the words. For example, a Tag for the Contact Name field in the Quotes App would look like this: <<contactName>>.

Here’s what our Sales Quote template example looks like with the Tags entered. You can see we replaced the placeholder elements we identified with Tags that correspond to the fields in our servis.ai Quotes App that contain the information we want to populate those placeholder elements with.

Note: The name of available fields will vary based on your servis.ai configuration.

Adding your Logo 

DOCX Template Example: Sales Quote- Body

Let’s move on to the body of our Sales Quote template. First, when designing the body of a Document Template, it is best to create separate tables that contain similar types of information.

For example, all of the account-specific information for our Sales Quote template could be contained in a single table that includes the account name, address, primary contact, and the primary contact’s phone number and email. 

In this example we have included a “Prepared By” section as well. Deciding what information you want in a template, as well as how to organize it, is not a science and will require you to play around a little bit to find the right fit for you and your brand. 

Next, we identify our placeholder items and then replace them with Tags.

Pulling Information from a Line

If you need a Document Template to pull information from a Line, rather than a field, you can do so. 

First, we recommend that each Line have its own table. This allows you to create rows in the table with commands that tell servis.ai to pull the information from a Line in the App and not a field in the App. Those commands are:

  1. <<rr_appLines>> This command tells servis.ai that the information that comes after this row is to be pulled from a Line in an App, not a field. 
  2. <<er_appLines>> This command tells servis.ai to stop pulling information from that Line.

These rows act as a closed loop that allows you to select several elements from a Line to be displayed together. 

Copy in CamelCase

The Copy in CamelCase feature lets you easily copy a Line name in the correct format to your clipboard. This ensures it’s ready to be used in the corresponding table without any manual formatting.

Note: Replace “app” in the command with the name of the App you are using for your Document Template. 

Let’s take a look at an example from our Sales Quote template.

As you can see, we have created a new table in our DOCX document for the Line. We started by creating a header row that indicates what information from the Line each column will hold (product info, List Price, Discount, etc.). 

Next, we created a row for our first command and replaced the word “app” with “quote” because we want to pull information from a Line in the Quotes App. The command now looks like this: <<rr_quoteLines>>.

After that, we created a row for the placeholder elements in each column that we will replace with Tags and outlined those placeholder elements in green.

Lastly, we created a row for our second command (<<er_quoteLines>>). 

Now we can replace our placeholder elements with Tags.

Upload a DOCX Template to servis.ai

From the Navigation Menu, go to Settings > Advanced > Document Templates and click the Add Document Template button.

This will pull up the Add Document Template window. From here, you can name the template, select what App to associate the template with, and upload the DOCX template file.

Special Formats

Dates/Time/Numbers

Date Formats Result

<<yourDateFieldFormatted>>

Changes according to your date field configuration (if masks are applied)

<<{dateFormat(effectiveDate, ‘MMM dd, yyyy’, ‘yyyy-MM-dd’)}>>

25 May 2020

 

Date Time Formats Result

<<{dateTimeFormat(yourDateTimeFieldName,‘MMM dd, yyyy hh:mm’)}>>

Apr 06, 2020 12:40

<<{dateTimeFormat(yourDateTimeFieldName,‘MMM dd, yyyy hh:mm:ss’)}>>

May 27, 2020 11:37:12

 <<{dateFormat(yourDateTimeFieldName,‘MM/dd/yyyy HH:mm:aa’, ‘yyyy-MM-dd’T’HH:mm:ss’)}>>

12/25/2021 – 12:00PM

You can specify a different format in the bold section to print your preferred date and time.

Format Description
dd for a two-digit day
yyyy for a four-digit year
MM is the Month in numeric format
MMM is the Month abbreviated to the first three letters
MMMM is the Month as a full word
mm is for minutes
EEEE the day expressed as a word
EEE the day is abbreviated to the first three letters
hh is for hours in 12-hour notation
HH is for hours in 24-hour notation
aa  is for AM/PM

 

Number Formats Result
<<{numFormat(yourField,‘0.0’)}>> 12.3
<<{numFormat(yourField,‘$0.00’)}>>

$12.34

<<{numFormat(yourField,‘###.##’)}>>

12.34

<<{numFormat(yourField, ‘¤#,###.00’, ‘USA’)}>>

$1,234.50

<<{numFormat(yourField, ‘¤#,###.00’, ‘GBR’)}>> £1,234.50
<<{numFormat(yourField, ‘ #.###,00¤’, ‘DE’)}>> 1.234,50€

Referencing Different Field Types

Some Field types in servis.ai require different tags to produce results in your template.

Field Type Tag

Multi-Select Choice List

 <<fieldNameFormatted>>

Configure Custom Code for Document Generation

Servis.ai supports document generation in the following formats: PDF, DOC, HTML, RTF, TXT, and ODT.  These formats are controlled by API parameters and will require some simple coding to set up generation within your App Action.  

To learn more about API, click here.  For more information on setting up App Actions, click here.  The following is a sample of the custom code required to configure your document generation preferences.  

(async function(record, context){
try{
const entity = await context.clientAPI.getEntityIdFromName({entity_name:'leads'}); 
const response = await context.clientAPI.getPdfByTemplate({
fa_entity_id: entity.data.getEntityIdFromName.fa_entity_id, 
instance_id: record.id, 
template_id: 'DOC100001',
output_format: 'pdf',
show_activity: true,
output_file_name: 'Output File Name'
})
if (response.error) {
await context.clientAPI.showErrorMessage(response.error);
} else {
const url = response.data.getPdfByTemplate.attachment_url; 
window.open(url, '_blank');
await context.clientAPI.showSuccessMessage("Generate Document Successfully!"); 
}
} catch(e){
await context.clientAPI.showErrorMessage(e);
}
}(record, context));

Refer to the table below to customize the code to your desired result.  There are five parameters you will need to configure manually.

Code Segment User Modification
const entity = await context.clientAPI.getEntityIdFromName({entity_name:’leads‘}); leads‘ will be the name of the App you are configuring
template_id: ‘DOC100001‘, This line is not included in the custom code by default. If you have multiple document templates, add ‘template_id:’ where ‘DOC100001‘ will specify your chosen template
output_format: ‘pdf‘, This parameter dictates the output format.  The available formats are ‘pdf‘ ‘doc‘ ‘html‘ ‘rtf‘ ‘txt‘ ‘odt

const url = response.data.getPdfByTemplate.attachment_url;

window.open(url, '_blank');

This code generates the automatic download within a pop-up window once the App Action button is clicked. Omit this code to stop automatic download, will still generate a document in the Activity timeline by default. See below
show_activity: true This will dictate whether your download will show in the Activity timeline.  Change to false to hide
output_file_name: 'Output File Name' Name the file directly within the code, where ‘Output File Name‘ will dictate this.

Using Related Lists

While standard templates pull data from a single record, the Related Lists feature goes further – it lets you include data from other Apps that are connected to your record through relationships.
For example, if you have a Quote record with line items stored in a separate “Quote Lines” App, a Related List lets you pull all those line items directly into your generated document. Or if you have a Project record with associated Issues, you can automatically include every issue in a report – no copy-pasting needed.

What Are Related Lists?

In servis.ai, Apps can be linked to one another through reference fields. When App A has a field that points to App B, a Related List is created automatically – you’ll see this differently on the UI depending on your configuration. You can learn everything about Related Lists right here.
When you add a Related List to a Document template, the system fetches every record from that related App and makes the data available in your template. This means you can:
  • Print a table of all line items on a quote or invoice
  • List every issue or task associated with a project
  • Include all notes, emails, or activities tied to a contact
  • Display product details from a connected inventory App
Note: Related Lists require that a relationship (reference field) already exists between the two Apps. If you don’t see the Related List you need, check that the correct reference field has been set up first.

How to Set Up a Related List in Your Template

Setting up a Related List involves two parts: configuring it in servis.ai and adding the correct placeholders in your Word template file. Here’s how to do it step by step.

Step 1 – Open Your Document Template

  1. Go to Settings > Advanced > Document Templates.
  2. Click on the template you want ot edit, or click “Add New” to create one.
  3. In the template form, you’ll see fields for Name, App (the App this template is associated with), Template File (your .docx file), and a field called IncludeRelated List.
Note: The “App” field determines which record is the “parent” and must be selected beforehand. The Related List you select determines which connected child records will be pulled into the document.

Step 2 – Select the Related List

In the template configuration form, locate the Related List field. This field shows you all the Related Lists that are available for the App you selected. Pick the one that contains the records you want to include in your document.
For example, if your template is for a “Quotes” App and you want to include quote line items, select the “Quote Lines” Related List from the dropdown.

Note: You can select multiple Related lists if your document needs data from more than one connected App.

Step 3 – Design Your Word Template

This is where you create the actual .docx file that servis.ai will use to generate your document. Open Word (or a compatible editor) and build your template using Docmosis placeholders.
For regular record fields, you use simple placeholders:
<<fieldName>>
For example, if your record has a field labeled “Quote Number” with a field name of “ID”, you would write:
Quotation #: <<id>>
For Related List data, you need a repeating section – a table row that repeats once for every related record. This is done using three special tags:
Tag
What It Does
Example
<<rr_listName>>
Row Repeat Start — marks the beginning of the repeating section. Everything between this tag and the matching end tag is repeated for each related record.
<<rr_quoteLines>>or<<rr_issues_Related>>
<<fieldName>>
Field Placeholders — placed inside the repeating section. Each one is replaced with the corresponding field value from the current related record.
<<product>><<quantity>><<price>>
<<er_listName>>
End Repeat — marks the end of the repeating section.
<<er_quoteLines>>or<<er_issues_Related>>
Note: The list name (the part after rr_ or er_) must match the Related List’s plural label in camelCase with “_Related” appended. For example, if the Related List’s plural label is “Issues”, the tag name becomes “quoteLines_Related”. The system uses the plural label of the related list, converted to camelCase, plus “_Related”.

Step 4 – Build the Repeating Table

In practice, the repeating section is usually set up as a table in your Word document. Here’s how to structure it:
  1. Create a table in Word with a header row and one data row.
  2. In the first cell of the data row, place the <<rr_listName>> tag.
  3. In the last cell of the data row (or in a final row below), place the <<er_listName>> tag,

Example – A Quote with Line Items:

Here is what your Word template table might look like for a quote template that pulls in line items from a “Quote Lines” Related List:
Description
Quantity
Unit Price
Amount
<<rr_quoteLines>>
<<product>>
<<product>>
<<quantity>>
<<price>>
<<netAmount>>
<<sectionHeader>>
<<er_quoteLines>>
When the document is generated, the data row repeats for each line item. So if your quote has 3 line items, you’ll see 3 rows of data in the final document.

Step 5 – Upload and Test

  1. Save your .docx file and upload it to the Document Template record in servis.ai.
  2. Make sure the “App” field and the “Related List” field are correctly set.
  3. Open a record in the associated App and use the template to generate a document (typically through an App Action button).
  4. Check the generated PDF or Word file to confirm that the related records appear correctly.
Note: If related records are missing, verify that (1) the Related List is correctly selected on the template, (2) your placeholder names match the field labels exactly (in camelCase), and (3) the related records actually exist and are linked to the parent record.

How to Find the Correct Placeholder Names

The placeholder names you use in your template must match the field labels from the related App, converted to camelCase. Here’s how to find them:
  1. Open the related App (for example, “Quote Lines”) and look at the field labels visible in the record form or list view.
  2. Convert each label to camelCase. This means:
    • Capitalize the first letter of each word except the first word.
    • Remove all spaces and special characters.
    • Example: “Unit Price” → “unitPrice”, “Net Amount” → “netAmount”.
Each field from the related record provides three variants you can use in your template:
Variant
Syntax
What It Contains
Display Value
<<fieldName>>
The value as displayed in the servis.ai UI (e.g., “$1,250.00”)
Formatted Value
<<fieldNameFormatted>>
A rich-text formatted version of the value
Raw Value Object
<<fieldNameValue>>
The underlying data object with all properties
For most use cases, the plain display value (<<fieldName>>) is what you’ll need. The formatted and value variants are useful for more advanced template designs.

Example: Project Report with Issues

Let’s walk through a complete example. Imagine you have a “Projects” App and an “Issues” App. Each Issue record has a reference field pointing to the Project it belongs to. You want to generate a report that lists all issues for a given project.

Template Configuration

  • App: Projects
  • Related List: Issues (selected from the dropdown)
  • Template File: your .docx file

Parent Record Fields (Projects)

Field Label
Placeholder
Project Name
<<projectName>>
Client Name
<<client>>
Project Manager
<<projectManager>>
Report Completion Date
<<reportCompletionDate>>

Related Record Fields (Issues) – used inside the repeating section:

Field Label
Placeholder
Description
<<description>>
Issue Status
<<issueStatus>>
Severity
<<severity>>
Rating
<<rating>>
Category
<<category>>

Your Word Template Table

Description
Issue Status
Severity
Rating
TC IN
TC OUT
Category
Sub-Category
<<rr_issues_Related>>
<<cr_{relevant != false}>>
<<description>>
<<issueStatus>>
<<severity>>
<<rating>>
<<timecodeIn>>
<<timecodeOut>>
<<category>>
<<subCategory>>
<<er_issues_Related>>
In this example, the tags use “issues_Related” as the list name — this is the plural label “Issues” converted to camelCase (“issues”) with “_Related” appended.

Filtering Records with Conditional Tags

Sometimes you don’t want to show every related record — you only want to include records that meet certain conditions. servis.ai supports conditional display tags that let you show or hide content based on field values.

Conditional Start Tag

<<cr_{condition}>> 

Conditional End Tag

<<er_>> 

Examples of Conditions

Condition
What It Does
<<cr_{relevant != false}>>
Only show records where “relevant” is not false
<<cr_{totalQuoteDiscount != 0}>>
Only show the Discount row when the discount is not zero
<<cr_{issueStatus=’Open’ }>>
Only show records where Issue Status equals “Open”
Conditional tags are placed in their own table row, right after the <<rr_>> row and before the field placeholders row. When the condition is not met, that entire row is hidden in the generated document.
Note: When comparing text values, use single quotes around the value, like: <<cr_{status=’Active’}>>. For numeric comparisons, no quotes are needed: <<cr_{amount > 0}>>.

Related Lists Naming Convention

When you add a Related List to your template, the system needs to know how to connect your Docmosis placeholders to the correct data. It does this through a naming convention based on the Related List’s plural label.

The Rule

Take the plural label of the Related List (as shown in servis.ai), convert it to camelCase, and append “_Related”.
Related List Plural Label
camelCase Conversion
Tag Name
Issues
issues
issues_Related
Quote Lines
quoteLines
quoteLines_Related
Notes
notes
notes_Related
Activities
activities
activities_Related
Phone Calls
phoneCalls
phoneCalls_Related
So your repeating section tags would be:
<<rr_issues_Related>>  ...  <<er_issues_Related>> 

<<rr_quoteLines_Related>>  ...  <<er_quoteLines_Related>> 

Tag Reference for Related Lists

Tag Type
Syntax
Description
Row Repeat Start
<<rr_listName>>
Begins a repeating section for the related list. Place in the first cell of a table row.
Row Repeat End
<<er_listName>>
Ends the repeating section. Place after the last field row.
Conditional Start
<<cr_{condition}>>
Shows the following row only when the condition is true.
Conditional End
<<er_>>
Ends a conditional section (short form).
Field (display)
<<fieldName>>
Shows the display value of a field from the related record.
Field (formatted)
<<fieldNameFormatted>>
Shows the rich-formatted value.
Number Format
<<{numFormat(field, format, locale)}>>
Formats a number or currency field.
Date Format
<<{dateFormat(field, pattern)}>>
Formats a date field.

Supported Fonts

When creating document templates in servis.ai, the fonts available in your templates depend on the fonts installed on the Docmosis Cloud (DWS3) rendering server. If you use a font in your .docx template that is not available on the server, Docmosis will substitute it with a fallback font, which may change the appearance of your generated document.
To ensure your documents look exactly as designed, only use fonts from the list below. This list represents all fonts currently available on Docmosis Cloud DWS3.

Available Fonts on Docmosis Cloud (DWS3)

Below is the complete list of fonts available on the Docmosis Cloud DWS3 rendering server. Fonts are grouped by category for easier reference. Where a font family has multiple weight or style variants (e.g., Light, SemiBold, Black), the variants are listed beneath the primary font name.
Note: This list applies to documents rendered on Docmosis Cloud DWS3. If you are using a different rendering engine or an on-premise Docmosis installation, the available fonts may differ.

Sans-Serif Fonts

Font Family
Available Variants
Arial
Arial Black
Asap
Calibri
Candara
Carlito
DejaVu Sans
DejaVu Sans Condensed, DejaVu Sans Light
Droid Sans
Impact
Josefin Sans
Josefin Sans Light, Josefin Sans SemiBold, Josefin Sans Thin
Lato
Lato Black, Lato Hairline, Lato Heavy, Lato Light, Lato Medium, Lato Semibold, Lato Thin
Liberation Sans
Montserrat
Montserrat Black, Montserrat ExtraBold, Montserrat ExtraLight, Montserrat Light, Montserrat Medium, Montserrat SemiBold, Montserrat Thin
Montserrat Alternates
Montserrat Alternates Black, Montserrat Alternates ExLight, Montserrat Alternates ExtraBold, Montserrat Alternates Light, Montserrat Alternates Medium, Montserrat Alternates SemiBold, Montserrat Alternates Thin
Nixie One
Open Sans
Open Sans ExtraBold, Open Sans Light, Open Sans SemiBold
Open Sans Condensed
Open Sans Condensed Light
Oswald
Oswald Regular
Oswald Stencil
PT Sans
PT Sans Caption
PT Sans Narrow
Quicksand
Quicksand Dash
Raleway
Raleway Black, Raleway ExtraBold, Raleway ExtraLight, Raleway Light, Raleway Medium, Raleway SemiBold, Raleway Thin
Roboto
Roboto Black, Roboto Light, Roboto Medium, Roboto Thin
Roboto Condensed
Roboto Condensed Light
Sansation
Sansation Light
Source Sans Pro
Source Sans Pro Black, Source Sans Pro ExtraLight, Source Sans Pro Light, Source Sans Pro Semibold
Tahoma
Titillium
Titillium Bd, Titillium Lt, Titillium Up
Titillium Web
Titillium Web Black
Titillium Web ExtraLight
Titillium Web Light
Titillium Web SemiBold
Trebuchet MS
Verdana
Antonio
Bebas
Bebas Kai
Bebas Neue
Bebas Neue Book, Bebas Neue Light, Bebas Neue Thin
Caviar Dreams
Colaborate-Bold
ColaborateLight
Colaborate-Medium
Colaborate-Regular
Colaborate-Thin
Comic Sans MS
Corbel
FFF Tusj
Gravity
Gravity Book, Gravity Italic, Gravity Light, Gravity UltraLight
League Gothic
League Gothic Condensed, League Gothic Condensed Italic, League Gothic Italic
Lemon Tuesday
Ostrich Sans
Ostrich Sans Black, Ostrich Sans Bold, Ostrich Sans Heavy, Ostrich Sans Light, Ostrich Sans Medium
Ostrich Sans Dashed
Ostrich Sans Dashed Medium
Ostrich Sans Rounded
Ostrich Sans Rounded Medium
Alegre Sans
ChunkFive
ChunkFive Roman

Serif Fonts

Font Family
Available Variants
Bitstream Charter
Caladea
Cambria
Constantia
DejaVu Serif
DejaVu Serif Condensed
Georgia
Linux Libertine
Linux Libertine Capitals
Linux Libertine Display
Linux Libertine Display Capitals
Linux Libertine Initials
Linux Libertine Slanted
Liberation Serif
Playfair Display
Playfair Display Black
Playfair Display SC
Playfair Display SC Black
STIX
Times New Roman
Utopia
TeX Gyre Adventor

Monospace Fonts

Font Family
Available Variants
Andale Mono
Consolas
Courier 10 Pitch
Courier New
Cursor
Liberation Mono
spinwerad
spinweradC

Script & Handwriting Fonts

Font Family
Available Variants
Alex Brush
Allura
Amatic
Amatic SC
Arizonia
Black Jack
CAC Champagne
Dancing Script OT
Grand Hotel
Great Vibes
Kaushan Script
Lobster 1.3
Lobster 1.4
Lobster Two
Pacifico
Sofia
Tangerine
Windsong

Decorative & Dispplay Fonts

Font Family
Available Variants
Chalk Line
Chalk Line Outline
Walkway Black
Walkway Bold
Walkway Oblique
Walkway Oblique Black
Walkway Oblique Bold
Walkway Oblique SemiBold
Walkway Oblique UltraBold
Walkway SemiBold
Walkway UltraBold
Webdings

CJK Fonts

Font Family
Available Variants
AR PL UKai CN
AR PL UKai HK
AR PL UKai TW
AR PL UKai TW MBE
AR PL UMing CN
AR PL UMing HK
AR PL UMing TW
AR PL UMing TW MBE
SimSun
Znikomit
ZnikomitSC

Other Fonts

Font Family
Available Variants
odstemplik

Troubleshooting

If you have followed this tutorial, but nothing happens when you click on the PDF icon to download, then most likely there is something missing in your template. Some of the most common mistakes are:

  1. The file is missing some characters; it could be an initial < or a closing > or other characters like apostrophes (‘ or ‘) or curly brackets ({ or }).
  2. There is a tag <<field>> that either doesn’t exist in your App or in the lines of your App or is not following the naming convention fieldName.

If you have reviewed your template but are still having issues downloading your PDF, email the template to support@servis.ai or share it through the Support Portal! 


Picture of Manuel Saucedo
Manuel Saucedo

Technical Writer

🙄

😐

😊

😍

0

In this article:

Select a meeting date

Powered by servis.ai

Welcome to servis.ai Free Edition

Link your email to begin

Continue with Google

Continue with Microsoft

By continuing, you agree to servis.ai Terms of Use. Read our Privacy Policy.

Get Started with servis.ai

30-minute demo where you see servis.ai in action.

Unlock the essential servis.ai features at no cost.

servis-logo

How can I be of servis?

How can I be of servis?