Convergence Document Templates
Introduction
A key part of Convergence's document management features is the ability to generate new documents using a document template and the data from your database to fill out forms, letters, or reports with your latest case data. Templates can produce output in HTML, plain text, PDF, or Word compatible formats. Templates may be used for forms, letters, reports, invoices, envelope printing, intake or referral forms, or macros. Macros are templates to use inside multiple other templates, such as letterhead, return address, or any other piece that you'll use over and over. Even portions of the Convergence interface are generated with templates. Interface templates may only be edited by the admin user.
Users who are granted the privilege to edit templates may create of modify templates. A user may be granted the privilege to only modify templates the user has created, and no others. The admin user can, of course, modify any template, and there are special admin only templates.
Editing Templates
To access the template editor, click 'Create Template' in the popup menu or navigation page. This will take you to a screen that can start a new template if you wish, or pick a template to view or edit.
The template editor first appears with an empty new template. You may start entering a new template, or use 'Go to Template:' button and menus to go to an existing template. Because the list of templates can become rather long, the templates are split up by category. The first menu after the button picks the template category, and the second picks the template in the category.
Once a category is picked, the second menu fills with names of templates from that category.
When you choose a template from the right hand menu, the template editor goes right to that template. By default, HTML and Word compatible templates appear in the embedded CKEditor, free downloadable online web page editor. See their documentation for more about CKEditor.
This is what the standard Case Information Report looks like in CKEditor, with its tabular layout. The text with {$ and $} around it are data substitution tags where data from your cases gets merged with the template. For example {$CLIENT.EMAIL$}
is where your client's email will be filled into the template when you generate a Case Information Report for a case.
Since the Case Information Report is intended for Word compatible output, extra fields appear below the CKEditor to control your page size and margins. Numbers may be entered in inches (in) or centimeters (cm). The default is inches. When you generate a .doc file, Convergence embeds directives into the output that set up the page size and margins.
The button 'Source' at the top left of the CKEditor allows you to view or edit HTML source directly if you wish. Knowledge of HTML is strongly advised if you make any changes in this mode.
Templates may also be edited as plain text, except for PDF templates, which are not in a text format. To edit a template as plain text, first check the 'Edit as Plain Text' checkbox to the right of the template selector before selecting your template.
This is what the Appointment Reschedule Letter looks like in the plain text editor:
If your template is a text type template, this editor is the default.
PDF templates have a special editor for drawing data fields on a PDF document. See PDF Templates for details.
Automatic Billing for Document Generation
The field 'Default Hours:' in the template editor may be used to set an amount of billable time to automatically charge for the creation of a document using this template. When a document is generated from a template that has default hours set, a new case note is also generated for that number of hours. The 'Default Hours:' field must contain a number of hours to be valid. This field will be saved with the template adn will fill back in when the template is edited or viewed.
The Data Tag Palette
The Data Tag palette appears in the upper right hand corner of the edit template page. It is a floating menu of available data tags that you may insert into a template. This means you can pick something like 'Inventory Value' from case data tags, and Convergence will type a tag like {$Case.value$}
into the template editor wherever your cursor is positioned. You do not have to memorize data tags to use template markup in your templates. The palette may be dragged by its blue bar to be near the text you are editing.
The 'Category:' menu at the top of the palette selects which data table you will be looking for tags for, whether that's case data, or invoice data, or contact data. The contact types in the menu are populated from the contact type settings of your database.
Once you pick a category, then you want to pick out the tag you are looking for.
When you choose a menu item or click 'Insert Data:', the corresponding tag for the data is typed into the cursor position in your template. For more information about data tags, see Template Markup Notation.
The third menu 'Insert Macro:' is for adding subtemplates, chunks of template text that get used in different templates. This useful for repeated segments like letterhead, return address, CC addresses, etc.
Tags for macros are marked with double dollar signs like {$$Letterhead$$}
, and that means that the macro template named 'Letterhead' will be substituted into that spot when a document is generated. If you use this for every template with a letterhead, then if the letterhead changes, it only needs to be changed in the Letterhead macro, and it will change for every template that uses it. For more information about macros, see Macro Templates below.
The Template Type Menu
The 'Template Type:' menu in the template editor selects what sort of output you want your template to produce, HTML, plain text, PDF, or Word compatible.
These choices affect what sort of editor you see when you edit the template, and what happens when you click on a directory file generated by this template.
HTML Templates
Pure HTML templates are useful for creating reports to view in Convergence, and for interface templates. These can also be used to generate documents for import as html files, or display as web pages.
Text Templates
Plain text templates are simple, but have few capabilities for formatting. They may be useful if all you want is to generate text to paste into some other program, and for creating export files, such as CSV format data exports.
Word Export Templates
Word compatible template based documents download a .doc file when you click on their link in the case file directory. These will print out with a reliable format and layout, but entail some complications. The template itself is still in HTML. The output document is actually in a format called MHTML which is built from the HTML in your template, and other information from the template editor. When you download a template based .doc file, and open it, Word will open the file and read in the contents generated by Convergence. See Word technical notes below to make sure your version of Word is set up to open Convergence files.
Images in template files have to be formatted a particular way to have Word resize them correctly on import. In addition to height and width style settings in inches or centimeters, the image tag will need to have a width and height attribute in unmarked 1/100th's of inches. For example this HTML image tag:
<IMG SRC="http://www.convergencedatabase.com/myimage.png" STYLE="width:7.2in;height:1.6in;" WIDTH=720 HEIGHT=160>
This will reliably work in both Word and Convergence viewers with the correct size (7.2 x 1.6 inches in this case). You may need to modify templates in Source view or as plain text to assure that this tag format is in place.
Tables with no border in Word show up with dotted line boundaries which won't print, but may look strange while editing. Convergence provides a built in CSS style that will supply the Word specific style definitions to hide these table boundaries. Just use class="nogrid
for tables you don't want showing up in Word, as in <table class="nogrid">
.
To start a new Word compatible template, one method is create a Word document with Word, and get it as close as you can to what you want the template to look like. Then use File, Save as... to save it as File Type .htm. Open the .htm file with a text editor, select all, and copy all text. Start a new template of type DOC, click 'Source' in the CKEditor, and paste in the text from Word. This will give you a good starting point, and will make sure that Word specific style directives and XML tags are included in your template. If you typed your data tags into Word, you may not need to modify the template any further.
MS Word Export Technical Notes
Different versions of Word have different ways of protecting your system from files generated from other sources, and will consider Convergence downloaded files to be from an outside source. Below are notes for several versions of Word. Importantly, Word 2013 requires that you change some settings, or you will get an error opening Convergence generated Word documents. (See below.)
Word 2013: If you get an error 'Word experienced an error trying to open the file' opening a Convergence generated .doc file, you need to create a 'Trusted Location' in a folder where you can download Convergence files. Microsoft has a very good description of how to do this at https://support.microsoft.com/en-us/kb/2749199. It is strongly recommended that you check the box 'Subfolders of this location are also trusted' so you can organize files within your Trusted Location. You may also want to set your browser to prompt you for where to download files so you can be sure they go to a trusted location.
Word 2010: When Word 2010 opens an externally generated file, it puts up a warning message at the top of the screen that this is a web generated file. Clicking 'Enable Editing' will open the document in with full editing. Any images used in a Convergence document will not show up until 'Enable Editing' is clicked.
Word 2007 and Later: In order to view HTML source of a Word document, you will need to add an extra control to the Quick Access Toolbar, a button called Web Page Preview. Microsoft support shows how to do this at https://support.office.com/en-gb/article/Add-commands-to-the-Quick-Access-Toolbar-f733e1a6-53b1-4388-a609-173d03895ab7?ui=en-US.
Word 2003 and Earlier: Convergence Word export downloads will open in Word 2003, but much formatting information may be lost. Floating DIV's in HTML are not supported, and only table or paragraph based layouts will work.
PDF Templates
PDF templates allow you to overlay data on top of uploaded PDF forms, or to create layouts on blank pages if you have no base PDF file uploaded. PDF templates use a special editor in the edit template page that lets you drag and draw data fields onto the PDF, and put data tags in these fields. For these features to work, your hosting must include GhostScript and Image Magick. Many web hosting providers have these installed and available to use.
To start a new PDF template, start a new template, type a name for the template, then choose PDF from the 'Template Type:' menu.
As soon as you select PDF, you will be taken to the PDF template editor with a new blank template to start out with.
The template starts out blank with no data fields. The warning 'No Data Fields Found' just lets you know that this template does not have any data fields yet. The controls to the right contain features for adding a PDF starter document, viewing or editing data field settings, and adding new data fields.
If you wish for your template to fill in a PDF document you have, there are two ways to do this. One is that if another template already uses this PDF (say you're reusing a letterhead page), you can choose the PDF from the menu 'Use PDF File:', and click the button to set that PDF as the basis for your template.
You may also upload a new PDF file using the file upload element 'Upload PDF File:'. If you are using a PDF from the web, you must first save a copy to your hard drive so you can upload it.
First use the button 'Choose File' to navigate your hard drive and pick out the file to upload, then click the button to start the upload. There may be some delay if your PDF file is a large one. Once your PDF uploads, you should see the PDF template editor with your document image filled in to draw fields on top of.
To determine what kind of field appears when you drag the mouse across the document, use the field type selector.
For a one line text field, drag the mouse sideways to define the width of the field. For mulitline text areas, the field will size sideways and down. If Checkbox is selected, a checkbox will appear where you click on the document image. You can pre-select a text font and size to go with your new field when you draw it.
Swiping the mouse across a blank on the form with 'Text Input' selected will draw a text field. The exact position and size of the field can be edited if you don't get it exactly right the first time. When you let go of the mouse, you will be prompted for a name for your new field. For this example 'WCB Case Number' is entered as the field name. When you click 'OK' for the name, the settings for the new field will show up in the data field properties area.
The field 'Text Content:' is the data that will appear in the field when a new PDF document is generated from case data. This field accepts template markup notation so you can put in data tags from your custom field settings. If you use the Data Tag Palette in the PDF template editor, the tag you choose will be typed into this field. Usually 'Text Content:' is a tag that corresponds to the blank in the form, but all template markup features, such as conditionals, and formatting are in effect. You may also just type plain text here if no changable data is needed, such as when you might add a disclaimer on top of an existing PDF form.
This manual is published by Convergence Case Management Data Retrieval Software, LLC, whose software products are provided for use by parties who have paid for and have a current license to operate the software described herein.
Information in this manual is subject to change without notice, and does not represent any commitment on the part of Convergence Case Management Data Retrieval Software, LLC. The software described in this manual is furnished under a license agreement and may be used only in accordance with its terms and conditions.
© Copyright 2025 Convergence Case Management Data Retrieval Software, LLC
This manual contains propietary information which is protected by Copyright. No part of this document may be reproduced, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of Convergence Case Management Data Retrieval Software, LLC.