Overview of Templates
AgileCase allows you to create your own templates for documents, e-mails, and any other purposes you may have to send templated information, providing you with a massive opportunity to streamline your business processes.
Templates let you use the data stored in your AgileCase system to automatically populate documents.
Basics of AgileCase Token Syntax
All templates share the same syntax for including fields from your Work Item (Case, Contact, etc.) which is simply a fielname included within double curly braces. For example:
{{fieldname}}
The above is a Field Token which simply outputs the value of that Field from your Work Item. You can find the fieldname for every peice of data within the “View Merge Fields” option of a Work Item. (You can see an example of that here: Creating your Document Template)
There are also many advanced tokens, for example the IF token allows you to optionally include some text within your document like this:
{{ IF relationships.client.description = ACME Limited }} The content you want to see if the condition is true. {{/IF}}
There are many more advanced tokens to discover which let you output special values such as current user name, or format values in different ways such as outputting a number in words. These are described later in this guide.
Creating a Document Template in Microsoft Word
Open Microsoft Word (or other compatible Word Processor) and load the document that you are going to turn into a Template for use on AgileCase.
Alongside this, open AgileCase, locate a Case that contains the information that you’d like to populate your Template with.
Once within the context of a Case, choose the “View Merge Fields” helper tool from the Mini Details tools dropdown.
When you select the “View Merge Fields” Option you’ll see a list of Fields that contain the data of the Case you have chosen.
Locate the Field(s) that you would like to add to your Template, once you have found the correct field, click on the Copy Tool icon beside the appropriate row.
At this point, AgileCase will store the Field Token of the Field you have clicked on in your clipboard and you can go to Microsoft Word and Paste the template into the appropriate location.
Repeat the steps above, copying and pasting the appropriate Field Tokens into your template until you have the required fields within your Template.
The next step is to upload your Template into AgileCase for use.
Adding your new Template on AgileCase
Within Site Admin, choose the “Doc & Email Templates” option from the left hand navigation.
Uploading a Template
One you have your completed Template you can now upload it for use into AgileCase.
Within Site Admin, choose the “Doc & Email Templates” option from the left hand navigation, then click the “+ Add Template” button.
Complete the fields, giving the Template a meaningful Name and Description, upload the Template by clicking the “Upload” button and choose the appropriate Work Types that you want to enable this document for.
Once finished, click on the “Add Template” button and your Template will be shown in the list of Templates inside your AgileCase system.
Creating a Document using your new Template
To create a populated Template visit a case with the appropriate information completed (e.g. the case that you used above for the Merge Field Helper tool).
Click on the “Docs & Comms” option from the left hand navigation and “+ New” → “Create Document”
From the Template Selection screen, choose the Template that was uploaded in the previous step and click “Save”
This will create your document, merging the Data held within the Case with the Template you have created.
Clicking on the Document Name will download the Document to your local computer for opening in Microsoft Word.
The document is now ready to be printed, emailed, or shared within AgileCase.
View Merge Field Helper
Using the “View Merge Fields” helper tool allows you to see every piece of stored information that is held within a Case within AgileCase.
There are three options within this tool that you can use to help you with your day-to-day work.
Merge Fields. This is the most commonly used option where users can locate a field from within their system and use the Copy option to store the location of that Field for use inside document, email, SMS and other types of Template.
XML View. This view shows all of the Case Data available on the Merge Fields page but as an XML file which can be used when integrating with other systems, or exporting the data for use elsewhere.
JSON View (Coming Soon). Similar to the XML View, the JSON View gives you access to the same information except in a JSON format which many systems now use as their primary import / export mechanism.
Custom Templates
Alongside our powerful built-in Document Creation option, AgileCase v2 also offers the ability to create Custom Templates on your system.
With this service, our support team can help tailor our Template / document creation solution to meet any unique needs you may have. A Custom Template can be useful if you have advanced criteria or data manipulation requirements which may be more complex to achieve with the built-in template functionality.
Depending on the complexity of your requirement there may be an additional cost for creating a Custom Template. Please contact support@agilecase.com to discuss if you think you required a Custom Template.