Use of special words and placeholders in export templates
In the article we explain how you insert special words into export templates in Fynode that the system replaces with specific order data when generating an export. We describe the format, the most used placeholders and examples for Excel and PDF templates.
What are special words (placeholders)
Special words are placeholders that you insert into the “Template” field and the system will replace with concrete data from the order when generating exports. They are used for order, customer, product, invoice or shipment data. This functionality is the same for Excel and PDF exports and simplifies creation of dynamic outputs.
Template formatting for Excel and PDF
If you create an Excel export, enter rows in CSV format into the "Template" field and separate individual rows with a semicolon. For PDF export insert HTML code, where the same placeholders work the same way. Before saving, verify that the keys used exist for the given data type.
Most commonly available placeholders
Commonly used placeholders include {order.id}, {order.number}, {order.date}, {order.amount}, {order.client.name} and {order.client.email}. For order items you can use {order.product.name}, {order.product.quantity}, {order.product.unit_price} or {order.product.ean}. The complete list of available keys can be found in the export documentation and in related invoicing or email template settings.
Insert the placeholder {order.number} into the template. When generating the export the system will replace it with the real order number for each export row.
Yes. For products use a combination of placeholders like {order.product.name}, {order.product.quantity}, {order.product.unit_price} and {order.product.ean}. When exporting multiple items the system will handle their correct insertion according to the template.
For the Excel export type you enter rows in CSV format and separate individual rows with a semicolon. In one row insert placeholders in the order of the columns; the system will generate correct CSV values for each order when generating.