Creating a template for document generation

Before getting started

As part of document generation, you'll need to create document templates.

A document template will provide the basis for your generation. This is the formatted document, which however doesn’t contain any personal information. The generation process will let you customize this document with the information for the selected employee.

New: Discover tags with a test template in the Lucca colors (downloadable at the end of this article).

How to create a document

First, create a text document in Microsoft Word (DOCX/DOTX). The OpenOffice format (ODF) is supported. This document can be formatted however you like.

To ensure the layout of your document is fully preserved in Core HR, there must be no unexpected spaces in the document.

When creating your document, you'll need to use tags to establish the information that will be automatically populated in the document with the corresponding information for each employee. 

A tag is always composed of an attribute name surrounded by two curly brackets. Here's an example: {{firstName}}. There are several types of tag:

  • HR file data tags: {{firstName}}, {{civilTitle}}, {{e_Codepostal}}, etc.
  • Contract details tags: {{workContract.trialPeriodEndDate}}, {{workContract.typeName}}, etc.
  • Customized tags: {{custom_Field name}}
  • A tag for automatically entering today's date: {{currentDate}}
  • Tags for defining signature positions: SIGNATURE1, SIGNATURE2, SIGNATURE3, etc.
  • Tags to enable signatories to add notes: MENTION1, etc.

Customized tags don’t reference information from the HR file, including data that you have created with the code generally starting with "e_XXX." They’re used to add information that isn’t managed in Core HR into the document.

Please note, the tags contained in page headers and footers are not recognized. They need to be in the body text of the document.

HR file data tags

You can integrate the following into a document template:

  • Contract details
  • Simple and compound data from the HR file, as long as it isn't multi-occurrence data (e.g.: "e_echelon"). Please note that when using compound data, you’ll need to select the child data code and not the compound data code. Otherwise it will not work (error: "An item with the same key has already been added").

Please note: Multi-occurrence data are not used in generating documents.

Attachment and image file data cannot be integrated into templates.

Employee data

Name of the data item Tag Example
First name {{firstName}} Valentin
Last name {{lastName}} Bresnier
Title {{civilTitle}} Mr.
Contract start date

{{workContract.startsOn}}

April 17, 2013
Contract end date

{{workContract.endsOn}}

December 12, 2023

Establishment {{legalEntity}} Lucca

Occupation category

{{csp}} Technician
Address {{address}} 24 rue du Champ de l'alouette
BIC {{bic}} BOUSFRPPXXX

IBAN

{{iban}} FR7640618802760004015133137

Name of the bank

{{bankName}} BNP
Personal email {{personalEmail}} perso-16@example.org

Professional email

{{mail}} vbresnier@example.org

End of trial period

{{workContract.trialPeriodEndDate}} July 14, 2022

Duration of the first trial period (in days)

{{workContract.trialPeriodDays}} 120

End of second trial period

{{workContract.trialPeriodEndDate2}} November 14, 2022

Duration of trial period renewal

{{RenewedTrialPeriodDays}} 90

Seniority date

{{seniorityDate}} April 17, 2014

Date of birth

{{birthDate}} July 20, 1980

Department

{{department}} Consulting

Job title

{{jobTitle}} R&D engineer

Manager (full name)

{{manager}} Marie Bragoulet

Employee number

{{employeeNumber}} 3015

Contract template

{{workContract.typeName}} CDI (permanent contract)

Contract start reason

{{workContract.hiringTypeName}} New hire

Contract end reason

{{workContract.terminationReasonName}} Redundancy for economic reasons

Reason for using the fixed-term contract

{{workContract.temporaryContractGroundName}} Temporary increase in workload

Nationality

{{nationality}} France

Social security number

{{insuranceNumber}} 189053706302035

Personal mobile number

{{personalMobile}} 06 23 90 12 67

Professional mobile number

{{professionalMobile}} 06 23 69 87 41

Name of a specific data item from the HR file

{{e_datacode}}
Data value

Contract reference

{{workContract.externalId}} 12

Internship mentor

{{workContract.internshipSupervisorName}} Daniel Hernandez
Annual theoretical pay (from Lucca Compensation)

 

{{theoreticalRemuneration.amount}} €46,281
Name of employee’s legal unit {{establishment.legalUnitName}} Lucca FR
SIREN {{establishment.legalUnitIdentificationNumber}} 362 521 879
Legal unit’s NAF code {{establishment.legalUnitActivityCode}} 29.10Z
SIRET {{establishment.IdentificationNumber}} 123 568 941 00056
Establishment’s NAF code {{establishment.ActivityCode}} 29.10Z
Establishment’s address {{establishment.addressStreet}} 25 boulevard des capucines
Establishment’s zip code {{establishment.addressZipCode}} 75009
Establishment’s city {{establishment.addressCity}} Paris

In this table, you’ll find the most common data.

As for the data that you’ve manually added into the HR file, you’ll find the list with the corresponding codes in the data management interface. This can be accessed via the HR file settings.

mceclip0.png

Customized tags

Customized tags allow you to insert fields that will need to be manually completed when generating a document. These are therefore data that are not recorded in Core HR. There is no limit to the number of customized tags per document.

The title after the "custom_" prefix will be defined as the field title. 

A customized tag will need to use the following format: {{custom_Title of the customized data item}}.

Example: {{custom_Specific clauses}}, {{custom_Reason for travel}} 

Unlike tags referencing HR file data, their completion will not be compulsory for document generation.

"Current date" tags

The {{currentDate}} tag lets you automatically insert the date on which you're generating the document. The format of this date will depend on the language configured for the template.

Selecting the date format

You can add the codes ":short," ":long" or ":full" to "date" tags to select the date format used.

For example, for dates of birth:

  • {{birthDate:short}} will set the format to "02/12/1996"
  • {{birthDate:long}} will set the format to "February 12, 1996"
  • {{birthDate:full}} will set the format to "Monday, February 12, 1996"

Please note: If no format is indicated, the date will be displayed in full format by default ("Monday, February 12, 1996").

Signature location tags

If you send your documents for signature from Core HR, you have the option of defining the position of all signatures on your documents.

In your text document, at the points where the various signatures need to be added, you’ll need to write out the SIGNATURE1 character sequence. The number 1 will go up incrementally for each additional signatory whose signature position you wish to define.

When the document is being signed, the yellow text box indicating "Click to sign" will appear just below and to the right of this character sequence.

To hide "SIGNATURE1" in your document, you can use a white font color.

To find out more, see the help page explaining how to manage the position of signatures in a document.

Tags for adding notes

If you send your documents for signature from Core HR, you can enable signatories to add a note when they sign the document. For example: "Read and approved" or "Good for agreement".

In the places where a note should be inserted in your text document, you should include the following character strings: MENTION1. The number  1 will go up incrementally for each additional signatory who must include a note.

At the time of signing, a yellow box that says "Click to sign" will appear just below and to the right of this character string.

To conceal these tags in your document, you can use a white font color.

To find out more, see the help page explaining how to add a note when signing.

Conditional tags

You can now add or exclude sections to/from a document based on the entry (or lack thereof) of a HR file data item.

To find out more, see the help page explaining how to manage conditional tags.

Gender tags

Tags allow you to tailor documents to the employee's gender. This reduces the number of templates needed.

The tag allows for three options:

  • {|ManOption|WomanOption|UndefinedOption|}

It selects one of the first two options depending on the gender entered in the HR file (“Male” or “Female”). If no gender has been entered, the document is generated with the third option by default.

To find out more, see the help page explaining how to use gender tags.

New: Discover tags with a test template in the Lucca colors (downloadable below).

Page content

Was this article helpful?
10 out of 11 found this helpful