// 128x128 ?>
Objectives of the lesson :
Please note that improvements that have been made to the module since the production of this video are documented further down in this article.
This module was stems from the request of several clients that wished to be able to send specific document templates depending on specific conditions. Hence, after creating a new document template, you will be able to assign it to a context.

Designate a template so that it is selected by default under specific call conditions
The number inside the dark gray box (“0” in the example above) indicates the number of criteria on which the assignment is based. If it is “0”, this means that no assignment is made.
Furthermore, note that no assignment can be made to the TowSoft default template (will indicate “-“), since the it must always appear among the selectable options, regardless of the context.
Choose to include or exclude:

Designation conditions for document templates
This will ensure that if the selected criteria are met for a call, the document template in question will be selected by default when you want to send or print a document. On the other hand, if you decide to make exclusions (“Exclude” switch above), well, the template will simply not appear among the available options.
If you want to reuse the same email content and footers that you had with your documents before activating the custom documents module, here is the procedure to follow:
1- Set the option below back to “Preparation mode” in Company & Options > General options

Setting the documents module back to “Preparation Mode”
2- Go to the place where this content was originally configured, i.e. Settings > Company and options, select the main company, then click on TowSoft billing options on the right of the screen

TowSoft billing options button

Former email content
3- In a new window of your web browser, go to Settings > Text editor, then click on the “Add text” button.

Add a text button
4- For each of the contents that you wish to keep, copy and paste from the location specified in 2- to that specified in 3- above, but without retaining the style. How? Simply highlight the text in question, press CTRL-C, then press CTRL-SHIFT-V (change CTRL for CMD for Mac users).
5- Lastly, don’t forget to give this text a name and category before saving it.

Giving the new email content text a name & category
You will then have all your former email content in order to add it in the custom documents module. Once you have made the required adjustments, you can switch back to “Complete Activation” mode in General Company Options.
Linked Calls Table
As linked calls are pretty common in TowSoft, we added the ability to display a table containing the details of these, so that everything appears on the document you want to send or print. This can be configured for any document template.

Linked calls table options, in a document template
Table placement → Choose where the table containing the details of linked calls should appear on the main document when this template is used.
Line visibility condition → Choose the conditions for the lines to appears in the table.
Columns for linked calls table → Choose the columns to display in the table (max. 6).
Joining annexes to documents
Given that several clients wanted legal or contractual clauses and conditions to be systematically sent, along with their document, our team added the possibility of joining annexes to a template. Whether they are invoices, delivery notes or quotes, you can add your annexes and take note that these can use dynamic values fetched from the call (e.g. customer name, VIN, etc. ) if they are present on it.

Join annex button

You must save a new document template before you can add annexes to it

Choose from the “Letter” submenu the annexes to be added for this template
These must have been created in Settings > Text editor, a priori
Note that files from your computer can also be used and added below, by clicking on “Browser files”

When you use this template to send documents down the road, the annexes that you joined to it will be displayed
Orange checkmark → Annex, Green checkmark → Attachment
What is the difference between attachments and annexes?
Attachments cannot use dynamic values fetched from the call. Furthermore, when sending a document by email, they will be attached separately from the main document.
Annexes can use dynamic values fetched from the call. These will be joined as additional pages to the main document (ie. on the same PDF).
List of comments