Skip to content

How to create a contract template in Word ​

A Word template is an ordinary .docx file in which client, booking, and vehicle data is replaced by variables in curly braces. When a document is generated, the system fills in the values and gives you a finished file that you can edit and print.

How Word templates differ from PDF templates is explained in How to set up a document template.

Turn on Word templates ​

  1. Open the company profile, “Templates” tab.
  2. Turn on “Template system based on MS Word”.
  3. If you need more than one contract — for example, a separate contract, act, and power of attorney — also turn on “Upload additional DOCX templates”. This switch is available only when the Word template system is on.

Which templates you can upload ​

TemplateWhere it is uploadedWhen it is used
Contract with an individual“Downloading contract template with client”Booking for an individual client
Contract with a legal entity“Upload contract template with entity”Booking for a legal entity client
Invoice“Upload invoice template”Client invoices
Extension“Upload template for prolongation”The booking extension window
Additional“Additional DOCX templates” → “Add”Chosen manually in the booking
Contract for a specific vehicleVehicle card, “Files” tabBookings of this vehicle instead of the general contract

Until you upload your own template, the RentProg example is used. Links to the examples are at the top of the “Templates” tab: contract and act, contract with a legal entity, invoice, extension.

Steps ​

  1. Download an example template, or the current template with “Download current”.
  2. Open the file in Word and edit the contract text: formatting, tables, and fonts stay exactly as you make them.
  3. Place variables where data should appear — see Variables.
  4. Save the file as .docx. The old .doc format is not accepted.
  5. Upload the file to the matching field on the “Templates” tab. The new file replaces the previous one. Maximum size is 50 MB.
  6. Open a real booking and generate the document — check that all data was filled in.

Tip

To change a template later, don't rebuild it: download the current one, edit it, and upload it back.

How to generate a document ​

Contract and act. In the booking card, click the “Generate documents” icon. The file is downloaded to your computer; in the mobile app, the share sheet opens.

  • Without additional templates, the contract is picked automatically: the individual contract for an individual, the legal entity contract for a legal entity.
  • With additional templates, the icon opens a list: “Base template”, “Template for legal entities”, and all uploaded additional templates. Choose the one you need.

The invoice is generated from the list of client invoices, the extension document — in the booking extension window.

The order of additional templates in the list is set with the arrows on their cards in the profile, and the name — with the “Template name” field. The same name is used in the downloaded file name.

Template for a specific vehicle ​

If part of the fleet uses a different contract — for example, a partner's vehicles — upload a separate template for them: vehicle card → “Files” tab → “Upload the contract/act template with client (unique for a car)” or “…with entity…”.

For bookings of this vehicle, that template replaces the general contract. If there is no unique template, the general one is used. When additional templates are on, the unique contract with an individual opens from the “Base template” item.

Variables ​

A variable is written in Latin letters in single curly braces, with no spaces inside: {last_name}. The full list with explanations opens with the “Variables in template” button on the “Templates” tab. The most common ones:

What is filled inVariable
Client's last, first, and middle name{last_name}, {first_name}, {middle_name}
Passport: series, number, issued by{passport_series}, {passport_number}, {passport_issued}
Driver's license{driver_series}, {driver_number}, {driver_issued}
Phone, address{phone}, {address}
Rental start and end{start_date}, {end_date} — with time; {start_date_short}, {end_date_short} — date only
Pickup and return location{location_start}, {location_end}
Vehicle: name, plate number, VIN, color, year{car_name}, {car_number}, {car_vin}, {car_color}, {car_year}
Duration, daily price, rental cost{days}, {price}, {cost}
Deposit, total without deposit, total with deposit{deposit}, {total}, {total_with_deposit}
Already paid{prepaid}
Mileage at pickup and return{start_mileage}, {end_mileage}
Booking number, today's date{serial_number}, {date}
Signatories{client_signer} — the client: the director for a legal entity, the full name for an individual; {company_signer} — the employee processing the booking
Legal entity details{entity_name}, {ceo}, {inn}, {ogrn}, {bank}, {bik}, {acc_number}, {korr}
Custom booking and vehicle fields{custom_field_1}…{custom_field_3}, {cars_custom_field_1}…{cars_custom_field_3}

The invoice template has its own variables: {number} — invoice number, {sum} — amount, {sum_words} — amount in words. The extension template has {prolong_days}, {prolong_price}, {prolong_sum}, and {prolong_end_date}, plus all contract variables.

If a client or booking field is empty, spaces are left in place of the value — you can fill it in by hand there.

Conditions: show a line only when it is needed ​

Text between {#variable} and {/variable} goes into the document only if the condition holds. Condition variables start with has_:

{#has_delivery_start}Delivery cost: {delivery_start}{/has_delivery_start}

The delivery line appears only if delivery in the booking is paid. {#has_insurance}, {#has_add_drivers_cost}, {#has_sale}, {#has_tariff}, and the other conditions from the variable list work the same way.

Lists: additional drivers and invoice services ​

A repeating block is written like a condition, but it repeats for each item.

Additional drivers in the contract:

{#add_drivers_array}{#has_add_drivers}{#drivers}
{driver_lastname} {driver_name} {driver_middlename}, passport {driver_passport_series} {driver_passport_number}, license {driver_driver_series} {driver_driver_number}
{/drivers}{/has_add_drivers}{/add_drivers_array}

If you don't need a list, one variable is enough: {add_drivers_info} — short, {add_drivers_info_full} — with date of birth, address, and documents.

Service lines in an invoice:

{#services}{number}. {service}, {sum}{/services}

Common errors ​

What you seeCause and what to do
“Contract generation error!” or “Error generating the document from the template”The template could not be parsed: a {#…} has no matching {/…} with the same name, a brace is missing or doubled, or the file is not saved as .docx. Fix the template and upload it again
“Error loading the template”The template file was not downloaded. Try again; if the error persists, upload the template again
A variable's place is emptyThe field is empty in the client, booking, or vehicle card — or the variable name is misspelled: a typo, a space inside the braces, a Cyrillic letter instead of a similar Latin one. Check the name against the variable list and retype it in full

Important

A condition or list must open and close in the same part of the text: don't start {#…} in one table cell and end {/…} in another.

This article was prepared with AI and may contain inaccuracies. Report an error