You can create custom templates for exported documents for selected record types. Create a DOCX file in Microsoft Word or LibreOffice, which will serve as a template for a Quote, Deal or other type of document for your clients.
For which record types can you create a custom template?
- Deal
- Quote
- Sales Order
- Project
- Account
- Contact
- Lead
- Activities (Task, Meeting, Event, Email, Phone Call, Letter)
A list of all supported fonts can be found here.
Tip: If you are interested in more advanced settings for Custom Templates, including working with images, conditions, cycles, etc., we have written a separate article for you HERE.
Important: Help with adding parameters to custom templates is not part of customer support, since this is a customized process for each client. If you are interested in help with setting up templates, we can forward your details to our external partner, who will provide a paid consultation on report creation.
How to enable new templates?
1. In the drop-down box under your name, click on Settings.
2. In Settings, select Custom Templates » Create New Template.
3. Select the record type for which you want to create a new template (Deal, Quote, Sales Order, Project, Account, Contact, Lead, etc.).
4. You can choose one of the pre-made templates or create your own completely custom template. Confirm your choice with the Select button (or the Create button if you decided to go with a completely custom template). After selecting one of the options, the template will not yet be enabled, you can only see it in Settings, you will not find it in the export menu yet. For more information on how to create a completely custom template, see the Creating a custom template section of this article.
5. You can download the selected template or upload a modified version. After you upload the modified template, a preview will be generated with filled in data. If everything is correct, the final preview will be displayed. If the template contains errors, an error message will appear, and you can find details in the downloaded .docx file. Please note that the size of the template cannot exceed 5 MB.
Tip: If you need to export documents with different headers, e.g., if you have multiple branches, create a different export template for each branch. This way, users can choose which document they currently need without having to rewrite the addresses.
6. You can also freely edit the Name or Description of a template. The name will then be visible to Raynet users in the export options. The template will only appear in the export options after it is enabled.
- The template is exported to .docx format by default so that users can edit it. If you want to avoid this and the PDF format is more suitable for you, check the Generate to PDF checkbox in Other settings.
- If you want to directly attach the exported document to a record, select Attach the generated file to a record. It will be uploaded to attachments in the format you have selected in the previous step.
- The exported file name can be modified just like the template name. You can use all the parameters of the given document. Now you just need to Save everything.
For Deal templates, it is also possible to set for which Trade Types and for which Stages the export template should be visible. In the document upload window, you will find the button Visibility settings for trade types.
After clicking this button, you can choose whether the template will be visible for all Deals or only for certain Types and Stages.
If you choose the second option, select specific Trade types (including all Stages) or use the arrow to open a list of individual Stages and select the ones you want. Finally, save everything.
Creating a completely custom template
If you have not picked any of the pre-made templates and want to create a completely customized document, choose the Custom Template option from the template selection.
Your template can be a regular Microsoft Word or LibreOffice document (.docx file), with special tags in the text that specify where and how the CRM data should be filled in. There are three types of tags you will use:
- Value
- Condition
- Cycle
Value
This is a tag that, after exporting, fills in a value in the document according to the information in the given field in the CRM system. The fields that you want to transfer to the document in this way are added to the template using a so-called parameter. So, for example, the field Quote Code has the value Q-23-004 in the CRM system and you add it to the template using the parameter {code}.
The list of usable parameters can be found in the settings of each template.
The filled in Value can then look like this:
►
Condition
A Condition allows you to handle parts of the text so that things are only added to the exported document if they are also filled in in the CRM system. For example, the Note field in a Quote will only appear in the exported document if there is any text present in that particular field.
The list of available conditions can again be found in the setting of each template. Each condition is defined by an opening and closing tag. The name of the opening tag includes a hash # and the closing tag includes a slash, e.g., {#hasDescription} ... {/hasDescription}. For each value, there exists a parameter with the prefix has, which can be used to test whether the value is filled in or not.
The filled in Condition can then look like this:
►
Cycle
A Cycle allows you to repeat parts of the text. This can be useful, for example, when listing products from a Quote. You only need to define everything once, whether there is only one product in the Quote or there are thirty, the cycle will always fill in the correct values.
Just like with the Condition tag, the text is placed between the opening and closing tags. The name of the opening tag includes a hash # and the closing tag includes a slash. For example: {#items} ... {/items}.
The filled in Cycle can then look like this:
►
Arithmetic operations
You can add, subtract, multiply and divide fields that are in a numeric format. For example, you can add up the weight of packaging and products in a Sales Order. You will then have the weight of the whole shipment recorded within the Sales Order.
In Custom Templates, select both custom fields from the Sales Order parameter list. Then add the parameter for the sum into the template: {Product_oz_be3f9AsNum + Packaging__4f854AsNum}.
In the template itself, the sum can look like this:
The sum in the exported Sales Order PDF then looks like this:
Number format
For numeric operations, you can select the number format you prefer. You can choose the European (specifically Czech) or US format. Decimal places are set up according to Number Formatting settings in Raynet, or you can modify them by adding a number after the colon {xxxAsNum | format: "en":4}.
- Parameter for European number format {xxxAsNum | format:"cs"} »
378 800,00
, - Parameter for US number format {xxxAsNum | format:"en":4} »
378,800.0000
.
- Parameter for European date format {xxxAsDate |format:"cs"} »
27. 4. 2022
or date and time27. 4. 2022 17:08
, - Parameter for US date format {xxxAsDate |format:"en"} »
Apr 27, 2022
or date and timeApr 27, 2022, 5:08 PM
.
Tips and tricks when creating templates
- Edit the document template with control characters enabled. This will make it easier to format the document layout.
- Before the final upload of the template, edit the meta information of the docx document so that the exported document is just "yours".
- If you need to add a parameter to return the number of item rows, use this format:
row numbers in the collection {#items} row: {$rowNum} {/}
- Use a font that is widely used. When using special fonts, the document may be unreadable for another user if they do not have the fonts installed.