When you create an invoice for a Shopify order in Pickware, the document is automatically saved to the order. In addition, a link to the invoice is stored in a metafield on the order in Shopify. You can add this link to your email templates so your customers can download the invoice directly from the email.
Where do I find the invoice link in Shopify?
Whenever an invoice is created, Pickware automatically writes the download link to the order metafield pickware.pickware_invoice_url. You don't need to activate anything for this. In Shopify, you can find the metafield in the order under Show all metafields among the unstructured metafields.
How do I set up my email template?
You can customize your email templates in Shopify so that your customers can access the invoice via a link. To do this, add the text snippet provided below to the email template of your choice in Shopify. Make sure the email is only sent after the invoice has already been created in Pickware. We recommend customizing the Shipping confirmation email template of your Shopify shop.
We recommend adding the text snippet in the HTML section (starting from <!DOCTYPE html>) below the Fulfillment Tracking Number area. You can find more information on customizing your email templates in the Shopify documentation.
In the Shipping confirmation template, you can recognize the end of this area by the line {% endif %} that follows the last line containing tracking_number. Scroll in the editor to this spot — it looks like this:
… tracking_number …
</a>
{% else %}
… tracking_number …
{% endif %}
← hier den Textbaustein einfügen
The lines marked with "…" contain the tracking number as Liquid output in double curly braces. The key point for orientation is the closing {% endif %} below it — the text snippet is inserted right there.
Text snippet
{% if metafields.pickware.pickware_invoice_url %}<tr><td class="actions__cell"><table class="button main-action-cell" style="width: 100%; margin-top: 12px;"><tbody><tr><td class="button__cell"><a href="{{ metafields.pickware.pickware_invoice_url }}" class="button__text">Rechnung herunterladen</a></td></tr></tbody></table></td></tr>{% endif %}You can freely customize the button text (Download invoice) and its design in the text snippet. To do so, change the label between the <a> tags or the style attributes it contains.
This is what the result looks like in the sent email — the button appears below the tracking number:
Which templates should the text snippet go into?
What matters is that the invoice has already been created in Pickware at the time the email is sent — otherwise the metafield is still empty.
Shipping confirmation — suitable and our recommendation. The email is triggered during fulfillment, and at that point the invoice usually already exists.
Order confirmation — not suitable. This email is sent immediately at checkout, and the invoice usually doesn't exist yet at that point.
The text snippet is wrapped in {% if metafields.pickware.pickware_invoice_url %}. If no invoice exists yet at the time of shipping, the button is therefore not displayed at all — no link is created that leads nowhere. If the button is missing in a test email, this is usually not an error in the text snippet, but a sign that no invoice has been created for this order yet.
How do my customers receive invoice corrections?
Pickware stores the links to invoice corrections as a list in the metafield pickware.pickware_invoice_correction_urls. If you create a structured metafield for this in Shopify, choose the type list.url, not url. To learn how to add the links to the refund email, see How can I have my invoice corrections created automatically?
Can I send the invoice as a PDF attachment?
Shopify cannot send PDF attachments. If you want to send the invoice as an attachment, send the email via Pickware and maintain the email templates in Pickware. You can learn more in Which settings can I configure for sending emails?
Can my customers see the invoice in their customer account?
Pickware does not offer a dedicated customer area for invoices. In the Shopify customer account, the invoice can only be displayed by customizing your theme or via the Customer Account API. API access must be enabled for this.

