🤖 This article was translated by AI.
The DocTemplates app allows you to generate your Boond documents (technical files, contracts, invoices, quotations, etc.) in Word (.docx) or PDF format, in your branding, from your own Word templates. This article is intended for administrators who install the app and create the templates.
Prerequisites
DocTemplates is available for all our offers.
To install DocTemplates and upload templates, you must have access rights to Boond Administration, Marketplace section.
Your templates must be Word documents in .docx format.
⠀
1 - Install the DocTemplates App
Administration > Apps/Marketplace > Marketplace tab > DocTemplates
To install the DocTemplates app, go to the Boond Administration Marketplace.
Open Administration, then Apps/Marketplace.
In the Marketplace tab, search for DocTemplates.
Click Install.
Once DocTemplates is installed, the app appears in your apps and you can upload your templates (see section 4).
2 - Create Your Word Template with DocTemplates Variables
To create your DocTemplates template, write a standard Word document in which you insert variables. At generation time, DocTemplates replaces each variable with the corresponding data from the Boond record.
Which documents can you create with DocTemplates?
DocTemplates lets you create templates for the following documents:
Technical files (TD) for candidates and resources
HR contracts and subcontracting contracts
Administrative documents (equipment loan, various authorizations, etc.)
Invoices and credit notes
Quotations
Services and mission orders
Purchase orders and delivery notes
Opportunities (commercial offer)
Purchases
Start from a DocTemplates Example Template
To save time, you can start from the DocTemplates example templates provided by Boond and adapt them to your branding.
The full list of variables, sorted by document type, is available in the DocTemplates variables documentation. For each variable, it shows the label, a sample result, the record and tab where the data is entered in Boond, and the variable type (simple, list, or table).
Writing a DocTemplates Variable
A DocTemplates variable is written between two dollar signs, with no space: $variableName$. You can format it (bold, underline, color) like any Word text: formatting is preserved in the generated document.
Example: for a resource Mr. Nicolas LEFRANC whose email is [email protected], the sentence "The email address of $civility$ $firstName$ $lastName$ is $email1$." becomes "The email address of Mr. Nicolas LEFRANC is [email protected]."
Be careful with the $ symbol
Warning: DocTemplates uses the $ symbol to identify variables. Never type the $ symbol manually in your template (for example "1,000 $"): it would be read as the start of a variable and block the template upload. To display a currency, use the dedicated variable, for example $currencySymbol$ (currency symbol) or $currency$ (currency code, e.g. EUR) on an invoice or quotation.
The Three Types of DocTemplates Variables: Simple, List, and Table
Each DocTemplates variable has a type, indicated in the "Variable Type" column of the documentation. The type determines where to place the variable in your Word document.
Simple variable: contains a single value (text or number), like a resource's name. Insert it directly into the text. Example:
$lastName$.List variable: contains several values, such as the activity areas of a technical file. Place it in a bullet (or numbered) list with a single item: DocTemplates creates one bullet per value. Example: a bullet containing
$activityAreas$becomes "• Web Developer" and "• Certification 1".Table variable: contains several rows, such as languages and their level. Place it in a Word table row: DocTemplates creates one table row per item, with the columns defined in your template. Example: a table row containing
$languages.language$and$languages.level$becomes "English | Fluent" then "German | Native".
DocTemplates Variable Modifiers: count, col, join, and literal
DocTemplates modifiers transform the value of a variable at generation time. They are written after the variable, separated by a vertical bar: $variable|modifier$. You can chain several: $variable|modifier1|modifier2$.
count (list or table variables): displays the number of items. Example:
$activityAreas|count$displays "3" if the resource has 3 activity areas.join (list variables): turns the list into text, values separated by a comma. Example:
$activityAreas|join$displays "Training, Technology Consulting, Internet & Multimedia".col (table variables): extracts a column from the table as a list; often followed by join. Example:
$languages|col('language')|join$displays "English, German".literal (simple variables containing a number): writes the number in words. Example: for a monthly salary of 2800,
$monthlySalary|literal$displays "two thousand eight hundred".
Display Today’s Date in a DocTemplates Template
To display the generation date in your DocTemplates template, use one of the following variables (examples for Monday, January 11, 2016):
$TODAY$: 01/11/2016$TODAY_MEDIUM$: Jan 11, 2016$TODAY_LONG$: January 11, 2016$TODAY_FULL$: Monday, January 11, 2016
Each Template Type Has Its Own Variables
Warning: The available DocTemplates variables depend on the document type. For example, an HR contract template cannot use variables specific to a service. Use only the variables from the documentation tab that matches your template type.
Invoices and Quotations: Separate the Totals Table
Warning: In a DocTemplates invoice or quotation template, place the totals in a table separate from the one containing the invoice or quotation lines. If the totals are in the same table, the document will not generate correctly.
3 - Name Your DocTemplates Template for Automatic Selection
The file name of your DocTemplates template allows you to enforce PDF format and automatically select the correct template based on the record (pole, legal agency) and the user’s language. These naming rules are also displayed in each DocTemplates configuration section.
You must rename your file before uploading it as a template.
In each section, we display the naming instructions for templates to follow.
How to Write Fields in the docx File Name
Fields are written in brackets, as [FIELD], and each field is preceded by an underscore (_).
Example: filename_[FIELD1]_[FIELD2].docx.
The available fields in a DocTemplates template file name are as follows:
Generation format – [PDF]: the document is generated as a PDF. Without this field, the document is generated as Word (.docx).
Record pole – [POLEX]: X is the internal reference of the pole. Example: [POLE3].
Company of the record: [CSOCX], CSOCX being the internal reference of the company
Contract type: [TYPEX], TYPEX being the ID, from the global parameters, of the contract type
Legal agency of the record – [AJUX]: X is the internal reference of the legal agency. Example: [AJU1].
User language generating the document – [FR] or [EN].
Examples of valid names: filename_[POLE3]_[FR].docx · filename_[AJU1]_[FR].docx · filename_[EN].docx · filename_[PDF].docx
How DocTemplates Chooses the Template to Use
When several DocTemplates templates are available, automatic selection is based on a score: the more the template name contains fields matching the record and the user, the higher its score. The template with the highest score is selected. If scores are equal, the template containing a format (e.g. [PDF]) is prioritized.
Example 1: The user’s interface is in French and the record belongs to the legal agency with internal reference AJU4. Available templates: filename_[AJU4]_[EN].docx, filename_[AJU1].docx, filename_[FR].docx, filename_[FR]_[PDF].docx, filename_[EN].docx, and filename.docx. The selected template is filename_[FR]_[PDF].docx: the [EN] and [AJU1] templates do not match, and between [FR] and [FR]_[PDF], the one with a format wins.
Example 2: In the same context, available templates are: filename_[AJU4]_[FR].docx, filename_[AJU4].docx, filename_[EN].docx, and filename.docx. The selected template is filename_[AJU4]_[FR].docx, because it matches both the legal agency and the language.
4 - Upload Your Template to DocTemplates
Administration > Apps/Marketplace > DocTemplates > Configuration
To upload your template to DocTemplates, drop your Word file in the section that matches the document type.
Open the DocTemplates app configuration.
Find the section that matches your document type (e.g. Invoices or Contracts).
Upload your .docx file in this section.
If the template is accepted, it appears in the section. If DocTemplates rejects the template, it displays the list of variables it does not recognize: see the FAQ at the end of the article to correct your template.
5 - Generate a Document from Your DocTemplates Template
To generate a document from your DocTemplates template, open the relevant record (resource, invoice, opportunity, quotation, etc.). Then click the "Generate a document" button at the top right.
You can then choose the template from the dropdown menu that appears:
FAQ
Is it possible to have multiple quotation templates?
Yes, you can have multiple quotation templates in DocTemplate. You can choose the template you want when generating the quotation in PDF.
Which DocTemplates variables should be used for electronic invoicing?
Since the introduction of Factur-X and CII formats on Boond (December 2023), new DocTemplates variables are available for electronic invoicing.
Invoice side: $billingDetailVatNumber$ (VAT number), $billingDetailSiren$ (SIREN), $billingDetailNic$ (NIC), $billingDetailRegistrationNumber$ (SIRET), $billingDetailNumber$ (provider number), $billingDetailSendingMode$ (sending mode).
Order side: $billingDetail.vatNumber$ (VAT number), $billingDetail.siren$ (SIREN), $billingDetail.nic$ (NIC), $billingDetail.registrationNumber$ (SIRET), $billingDetail.number$ (provider number), $billingDetail.sendingMode$ (sending mode).
My DocTemplates template is rejected on upload: what should I do?
When your DocTemplates template is rejected on upload, DocTemplates displays the list of variables it does not recognize. The number of errors guides you:
Only one variable reported: check its spelling, its full syntax (
$variableName$), that it exists for this template type, and that no special character or extra$surrounds it.Many variables reported: look for a global cause, such as an isolated
$in the document, an unclosed variable, or variables from another template type (e.g. service variables in an HR contract).
How do I display the $ (dollar) symbol or a currency in my DocTemplates template?
To display a currency in your DocTemplates template, do not type the $ symbol manually (e.g. "1,000 $"): DocTemplates uses the $ character to identify variables and reads it as the start of an incomplete variable, blocking the template upload.
Instead, use the dedicated currency variable, for example $currencySymbol$ (currency symbol) or $currency$ (currency code, e.g. EUR) on an invoice or quotation. The exact variable name depends on the template type: see the relevant tab in the variables documentation.
My DocTemplates template is uploaded but I don't see it when generating my document: why?
If your DocTemplates template is uploaded but not offered when generating the document, check the file name. The template name determines in which context it is selected (legal agency, pole, user language, PDF format). A valid template whose name does not match the record context will not be offered. Naming rules are displayed in each DocTemplates configuration section.
Some information is empty in the document generated by DocTemplates: why?
When information is empty in the document generated by DocTemplates while the variable is correct, it is usually because the data is not filled in Boond or is not linked to the correct record. For example, the provider information for an external resource remains empty if no provider is associated with this resource. The variables documentation indicates, for each variable, on which record and in which tab the data must be entered.
My DocTemplates variable works in text but not in a table (or vice versa): why?
A DocTemplates variable that works in text but not in a table (or vice versa) is probably not used according to its type. A simple variable goes in the text, a list variable in a bullet list with a single item (or with the join modifier to display as text), and a table variable in a Word table row. The type of each variable is indicated in the variables documentation; the three types are detailed in section 2 of this article.
My DocTemplates invoice or quotation does not generate correctly: what should I check?
If your DocTemplates invoice or quotation template does not generate correctly, check the table structure: totals must be placed in a table separate from the one containing the invoice or quotation lines.
How do I know if the problem comes from my Word document or the DocTemplates variable?
To find out if the problem comes from your Word document or the DocTemplates variable, test with a minimal document:
Create a new Word document containing a single line of text and the variable to test.
Upload this document in the same DocTemplates template type.
Generate a document from this template.
If the minimal document works, the problem comes from your original Word document: hidden characters, content copied from Excel or a PDF, text boxes, nested tables, or variables placed in the header or footer. Then simplify your document gradually to identify the problematic part.
Is it possible to have multiple quotation templates in DocTemplates?
Yes, it is possible to have multiple quotation templates in DocTemplates. You choose the template you want when generating the quotation in PDF.



