How to Create PDF Files for Receipts and Invoices

IN THIS GUIDE

Create PDF Files
Order Metadata
Send Packing Slip with Order
Attach to an Email

Order Desk allows you to create PDF files from a receipt template and then either attach the PDF as a packing slip on an order or attach the file to an outgoing email.

For more information on working with receipt templates, review this guide.

Create PDF Files

PDFs can be create with a rule.

In the Rule Builder, select the Order Rule rule type:

Select the event that needs to happen for PDFs to be created. This will most likely be Order is Imported, but this will be your preference:

Under the Filters & Actions tab, set any filters if you need to determine which orders will get a PDF. For the action, select Create PDF and choose the receipt template that should be used for this PDF:

This rule will run a PDF Created action, which means you can now use the PDF Created From Order event to set up more rules after the PDF is created. 

Please do not add any additional actions to this Create PDF rule. Sometimes additional actions will run before the PDF is finished being created, which will have unintended consequences. Instead, create a second rule with the PDF Created From Order event to add any additional actions that need to take place after the PDF is created.

Order Metadata

After your rule starts running on orders, you can find the PDF in the order metadata.

Scroll to the bottom of an order page and you'll see pdf_ followed by the receipt template ID:

Send Packing Slip with Order

Some Print on Demand and fulfillment integrations can receive a packing slip when an order is submitted to them. Check the specific integration guide to find out if the ones you use accept the PackingSlip field. If they do, follow these instructions.

To set this up, after creating the PDF with a rule, create a new rule using the PDF Created From Order event:

Select Set Checkout Data Receipt URL as the action and in the input box add PackingSlip|xxx, where xxx is replaced with the receipt template ID:

The template ID can be found in the order metadata when looking at the packing slip, for example: pdf_9016, or when looking directly at the receipt template URL for the PDF, or by hovering your cursor over the receipt template:

In this example, the ID is 9016:

When this rule runs, the link to the PDF will be added as a PackingSlip to the checkout data field on the order and will be sent to the printer when the order is submitted:

Attach to an Email

To add the PDF as an email attachment, get the PDF value from the order metadata:

Add this to the Attachment Field Names field in the email template where you want it added:

Multiple field names can be entered, separated by comma. Order Desk will first look in the checkout data, then in the order metadata for the information to be attached to an email.

For more information on working with email templates, please see this guide.

Still need help? Contact Us Contact Us