Configuring PDF Generation Templates
Generate professional-looking documents like Purchase Orders directly from Zudello using custom PDF templates. This guide explains how to prepare Microsoft Word documents to be used as templates within Zudello's automation features.
Best practices
- Use clear and descriptive names for your Word template files.
- Test your templates thoroughly with sample data before using them in live automations.
- Keep backup copies of your Word templates outside of Zudello.
- Use placeholders exactly as specified to ensure data populates correctly.
Understanding PDF Templates
Zudello uses Microsoft Word documents (.docx) as the basis for PDF templates. You create a Word document with your desired layout, branding (logos, fonts, colours), and static text. Special placeholders are inserted where you want Zudello data to appear.
When an automation (Sentence) triggers the "Generate PDF" action, Zudello takes the specified Word template, replaces the placeholders with the relevant data from the transaction, and generates a PDF file. This PDF can then be attached to emails or stored.
Note: Currently, managing (uploading, updating, deleting) PDF templates requires assistance from the Zudello team. There is no user interface for template management at this time.
Creating a Template (Word Document)
-
Open Microsoft Word: Create a new blank document or start with an existing company letterhead.
-
Design Layout: Arrange text, tables, images (like logos), headers, and footers as desired.
-
Add Static Text: Type any text that should remain the same on every generated PDF (e.g., "Purchase Order", "Terms and Conditions").
-
Insert Placeholders: Where you want data from Zudello to appear, insert placeholders using double curly braces
{{ }}
.- Syntax:
{{ object.field_name }}
- Header Fields: Use fields directly from the transaction (e.g.,
{{ document_number }}
,{{ date_issued }}
,{{ supplier.name }}
,{{ delivery_address.line_1 }}
). - Line Items: To display line items in a table, you need to loop through them. Create a table in Word with a header row and a single data row. Use special loop tags around the data row:
- Start loop:
{{#lines}}
(Place this in the first cell of the data row). - End loop:
{{/lines}}
(Place this in the last cell of the data row). - Inside the loop row, use line item placeholders:
{{ sku }}
,{{ description }}
,{{ quantity }}
,{{ unit_price_exclusive }}
,{{ total_exclusive }}
.
- Start loop:
Example Table Row:
{{#lines}} {{ sku }}
{{ description }}
{{ quantity }}
{{ unit_price_exclusive }}
{{ total_exclusive }} {{/lines}}
- Referencing Related Data: Access data from linked records using dot notation (e.g.,
{{ supplier.tax_number }}
). - Placeholders List: Contact Zudello support for a comprehensive list of available placeholders for different document types.
- Syntax:
-
Save: Save the document as a standard Word file (.docx). Use a clear, descriptive filename (e.g.,
purchase-order-template-v1.docx
).
Uploading and Managing Templates
Currently, PDF template management is handled by the Zudello team:
- Provide Template: Send your completed .docx template file to your Zudello implementation consultant or support contact.
- Specify Name: Provide a unique name for Zudello to identify this template (e.g.,
default_po_template
). This name will be used in Sentences. - Confirmation: The Zudello team will upload the template and confirm the name to use in your automations. Updates or deletions also require contacting Zudello.
Using Templates in Sentences
- Create or edit an Automation (Sentence).
- Add the Generate PDF action.
- In the Template Name field, enter the exact, unique name provided by the Zudello team for your uploaded template.
- Configure subsequent actions, like Send Email, ensuring you use the output variable from the Generate PDF step if you want to attach the generated PDF.
Need help?
Contact your organisation administrator or Zudello support for assistance with creating placeholders, uploading templates, or configuring Sentences to use them.