Admin
Instruction
Difficulty level: Advanced
Configuration - Templates
This section only applies if the module CRM is active.

The document you create from an order, such as a quotation, contract, agreement or SEPA mandate, is based on an order template. You create the template once, in your own house style, and then use it for every order.

Where do you create an order template?

  1. Go to Configuration > Templates. You need the right menu_config_templates for this.
  2. Create a new template of type pdf with the context order. Templates with the context general can also be chosen at an order.
  3. Give the template a clear name, such as Quotation, Contract or SEPA mandate. You can use that name in the file name with {TEMPLATE}, see Order settings.
  4. Create a version per language if you have customers in several languages. At an order you see the templates in the language of the customer.

More about templates in general: What are templates? and How do I create a new template?.

Which data can you use?

DataExamplesAll variables
Order{ORDER_NUMBER}, {ORDER_DATE}, {ORDER_DESC}, {ORDER_MEMO}, {ORDER_PRICE}, {ORD_CUSTOM01}Order variables
Blocks and lines{orderblocks.BLOCK_DESCRIPTION}, {orderblocks.detail.DESCRIPTION}, {orderblocks.TOTAL_TOTAL}Order line variables
Customer{INITIALS}, {LASTNAME}, {ADDRESS1}, {EMAIL}Customer variables
Company{COMP_NAME}Company variables

Blocks and lines are two loops, one inside the other: <!-- BEGIN orderblocks --> repeats per block, and inside it <!-- BEGIN detail --> per line. You use the total line of a block outside the detail loop, with {orderblocks.TOTAL_…}.

Need data from a linked booking on your document? Copy it into an order field and use {ORD_CUSTOM..}. See Order fields.

Example: quotation

A simple quotation with a table of lines per block and a total. Add your own logo, colours and terms.

<h1>Quotation {ORDER_NUMBER}</h1>
<p>{COMP_NAME}<br>
Attn. {INITIALS} {PREFIX} {LASTNAME}<br>
{ADDRESS1} {HOUSENUM}{HOUSENUMEXT}<br>
{POSTAL} {CITY}</p>

<p>Date: {ORDER_DATE}<br>
Subject: {ORDER_DESC}</p>

<p>{ORDER_MEMO}</p>

<!-- BEGIN orderblocks -->
<h2>{orderblocks.BLOCK_DESCRIPTION}</h2>
<p>{orderblocks.BLOCK_MEMO}</p>
<table style="width:100%">
  <tr><th>Description</th><th>Quantity</th><th>Price</th><th>Amount</th></tr>
  <!-- BEGIN detail -->
  <tr>
    <td>{orderblocks.detail.DESCRIPTION}<br><small>{orderblocks.detail.MEMO}</small></td>
    <td>{orderblocks.detail.NUMBER_OF_PLACES} {orderblocks.detail.UNIT}</td>
    <td>{orderblocks.detail.PRICE}</td>
    <td>{orderblocks.detail.SUBTOTAL}</td>
  </tr>
  <!-- END detail -->
  <tr><td colspan="3"><strong>{orderblocks.TOTAL_DESCRIPTION}</strong></td><td><strong>{orderblocks.TOTAL_TOTAL}</strong></td></tr>
</table>
<!-- END orderblocks -->

<p><strong>Total: {ORDER_CURRENCY} {ORDER_PRICE}</strong></p>
<p>This quotation is valid for 30 days.</p>

Example: SEPA mandate

A mandate is mostly fixed text, completed with the data of the customer. Here the IBAN is in order field 1 ({ORD_CUSTOM01}). Replace the text between [ ] with your own data. If you have the mandate signed digitally, see Having documents signed with Box Sign.

<h1>SEPA Direct Debit Mandate (recurrent)</h1>
<table style="width:100%">
  <tr><td>Creditor name</td><td>[name of your organisation]</td></tr>
  <tr><td>Creditor identifier</td><td>[your creditor ID, for example NL00ZZZ000000000000]</td></tr>
  <tr><td>Mandate reference</td><td>{ORDER_NUMBER}</td></tr>
</table>

<p>By signing this mandate form, you authorise (A) [name of your organisation] to send
instructions to your bank to debit your account and (B) your bank to debit your account
in accordance with the instructions from [name of your organisation].</p>

<table style="width:100%">
  <tr><td>Name</td><td>{INITIALS} {PREFIX} {LASTNAME}</td></tr>
  <tr><td>Company</td><td>{COMP_NAME}</td></tr>
  <tr><td>Address</td><td>{ADDRESS1} {HOUSENUM}{HOUSENUMEXT}, {POSTAL} {CITY}</td></tr>
  <tr><td>IBAN</td><td>{ORD_CUSTOM01}</td></tr>
  <tr><td>Place and date</td><td>{CITY}, {ORDER_DATE}</td></tr>
  <tr><td>Signature</td><td>&nbsp;</td></tr>
</table>

Contract or agreement

You build a contract or agreement in the same way: fixed articles as text in the template, the arrangements with this customer from the order (blocks, lines, memos and order fields), and space for the signatures at the bottom. A contract and a SEPA mandate can be used as two separate templates side by side for the same order.

Testing

Create a test order with a few blocks, lines with a memo and a customer with a complete address. Add your template in the Order output block and choose Generate and preview. Repeat until the document is right. See Creating a good-looking quotation.

Would you like us to create your template in your house style? Please contact our support team.

The following rights may be necessary in order to use this functionality.