Variables reference for templates and messages

Variables are key pieces that enable you to make your Quaderno templates and messages work for your business needs. They represent pieces of data that you can use in your templates and messages (without having to hardcode them in).
We provide variables for every type of document you need. Here we’ve broken them down by object. But first, a couple tips before you begin!
🤓
To use our advanced template system, Quaderno Templates, a little knowledge of HTML comes in handy. We have tried to make our guides as user-friendly as possible, including a step-by-step guide for dummies.
On this doc:

Tips for getting started

  • Be sure to wrap potentially missing variables (read: most of them) in {% if %} blocks in case they aren’t there for the document or contact in question.
  • Don’t assume a certain number of items in a document – it’s better to use the looping abilities to make your template expand to more (starting from one or even zero – see first tip!).

Account variables

Information about your account
Account variables
Code
Description
{{ account.full_name}}
{{account.trade_name}}
{{ account.formatted_address }}
{{ account.street_line_1 }}
{{ account.street_line_2 }}
{{ account.postal_code }}
{{ account.city }}
{{ account.region }}
{{ account.country }}
{{ account.phone_1 }}
{{ account.phone_2 }}
{{ account.email }}
{{ account.web }}
{{ account.logo_url }}

Contact variables

Information about your contacts:
Contact variables
Code
Description
{{ contact.first_name }}
{{ contact.last_name }}
{{ contact.full_name }}
{{ contact.tax_id }}
{{ contact.formatted_address }}
{{ contact.street_line_1 }}
{{ contact.street_line_2 }}
{{ contact.postal_code }}
{{ contact.city }}
{{ contact.region }}
{{ contact.country }}
{{ contact.phone_1 }}
{{ contact.phone_2 }}
{{ contact.email }}
{{ contact.web }}
{{ contact.currency }}
{{ contact.language }}
{{ contact.eu_member? }}

Document variables

Information about your documents (receipts, invoices, credit notes, and estimates):
Document variables
Code
Description
{{ document.number }}
{{ document.issue_date }}
{{ document.contact }}
{{ document.tax_id }}
{{ document.subject }}
{{ document.po_number }}
{{ document.subtotal }}
{{ document.currency }}
{{ document.discount }}
{{ document.gross_amount }}
{{ document.total }}
{{ document.exchange_rate }}
{{ document.exchange }} 
{{ document.payment_details }}
{{ document.amount_paid }}
{{ document.amount_due }}
{{ document.due_date }}
{{ document.valid_until }}
{{ document.notes }}
{{ document.legal }}
{{ document.tag_list }}
{{ document.paid_status}}
{{ document.processor_id }}
{{ document.secure_id }}
Documents also have the following collections:
Document collections
Code
Description
{{ document.items }}
{{ document.taxes }}
{{ document.payments }}
{{ document.tag_list }}
Collections consist of several objects which you can traverse with, for example, a for loop, as in the following example:
{% for item in document.items %}
  Your logic here.
{% end %}

Item variables

Information about an item within the document:
Item variables
Code
Description
{{ item.product_code }}
{{ item.description }}
{{ item.unit_price }}
{{ item.quantity }}
{{ item.discount_rate }}
{{ item.tax_1_rate }}
{{ item.tax_1_amount }}
{{ item.tax_2_rate }}
{{ item.tax_2_amount }}

Tax variables

Information about the taxes associated with the document.
Tax variables
Code
Description
{{ tax.label }}
{{ tax.rate }}
{{ tax.country }}
{{ tax.taxable.base }}
{{ tax.amount }}
{{ tax.local_taxable_base }}
{{ tax.currency }}

Payment variables

Information about the document payment.
Payment variables
Code
Description
{{ payment.date }}
{{ payment.amount }}
{{ payment.payment_method_text }}
📚
If you are creating or editing templates, you might also want to check out our resources on template labels, getting started with Quaderno templates or our guide how to create your very first template.