In this article, we'll show you how to adjust email templates in Pickware so that customers receive the matching tracking link with the shipping confirmation. We primarily assume that you use a separate shipping method for each shipping carrier. If you only have one shipping method with multiple carriers, you'll find a dedicated section on that further below.
Tracking in Shopify
By default, emails to customers are sent directly from Shopify Admin, not from Pickware. This also passes the tracking code to Shopify. Based on the tracking code, Shopify automatically detects the shipping carrier and provides the corresponding link in the email.
This requires that shipping label creation and shipping happen through the same channel — meaning either both take place in Pickware Admin, or both take place in the WMS App. For example, if the label was created in Pickware Admin but the order was shipped via the WMS App (or vice versa), the tracking code won't be transmitted to Shopify.
Tracking in Pickware
However, if you use Pickware to process, for example, your B2B orders independently of Shopify directly in Pickware Admin, follow the steps described below to adjust your email template.
Adding tracking links
First, add the respective tracking URL to your shipping methods under Settings → Shipping. Use %s as a placeholder for the actual tracking code.
Here's an overview of the URLs for each shipping carrier:
Shipping carrier | Tracking link with placeholder |
Deutsche Post | |
DHL | |
DHL Express | |
DPD | |
GLS | |
Austrian Post | |
Swiss Post | |
UPS | |
DSV (*) | If you want to add a tracking link for DSV, please note the details on this further below. |
Adjusting the email template
Next, we'll add the tracking URL to the email template. Go to Settings → Shop → E-Mail-Templates and search for the template Eintritt Lieferstatus: Versandt (Shipping status: Shipped). Click Bearbeiten (Edit).
Now scroll to the Mail-Text section and enter the following code in both the Text and HTML fields at the point where the tracking link should appear. When you create a shipping label, the generated tracking number is automatically saved in the order details under Details → Versand → Sendungsnummer(n) (Details → Shipping → Tracking number(s)). The value of the trackingCode variable will later be inserted into the email.
In the Text field:
{% for delivery in order.deliveries %}
{% for trackingCode in delivery.trackingCodes %}
{% set trackingLink = delivery.shippingMethod.trackingUrl|replace({'%s': trackingCode}) %}
Sendung verfolgen ({{ trackingCode }}): {{ trackingLink }}
{% endfor %}
{% endfor %}In the HTML field:
{% for delivery in order.deliveries %}
{% for trackingCode in delivery.trackingCodes %}
{% set trackingLink = delivery.shippingMethod.trackingUrl|replace({'%s': trackingCode}) %}
<p><a href="{{ trackingLink }}">Sendung verfolgen ({{ trackingCode }})</a></p>
{% endfor %}
{% endfor %}
Checking flows
If you add another shipping carrier and use custom shipping flows, check whether it needs to be added there too.
Special case: Multiple shipping carriers but only one shipping method
Use this method if you only offer one shipping method (e.g. "Standard shipping"), but decide flexibly in the warehouse which shipping carrier to ship with. In this case, the tracking URL is not stored in the shipping method but directly in the email template. The same URLs as above generally apply here as well:
Shipping carrier | Tracking link with placeholder |
Deutsche Post | |
DHL | |
DHL Express | |
DPD | |
GLS | |
Austrian Post | |
Swiss Post | |
UPS | |
DSV (*) | If you want to add a tracking link for DSV, please note the details on this further below. |
In our example, we ship either with DHL or DPD. The email then decides which link to display based on the length of the stored tracking code. The basic assumption here is that DHL tracking codes are usually longer than 14 characters and DPD tracking codes are shorter.
Go to Settings → Shop → E-Mail-Templates and open the template Eintritt Lieferstatus: Versandt (Shipping status: Shipped). In the Mail-Text section, enter the following code at the point where the tracking link should appear.
In the Text field:
{% for delivery in order.deliveries %}
{% for trackingCode in delivery.trackingCodes %}
{% if trackingCode|length > 14 %}
{% set trackingLink = 'https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode=' ~ trackingCode %}
DHL Sendungsverfolgung: {{ trackingLink }}
{% else %}
{% set trackingLink = 'https://tracking.dpd.de/status/de_DE/parcel/' ~ trackingCode %}
DPD Sendungsverfolgung: {{ trackingLink }}
{% endif %}
{% endfor %}
{% endfor %}In the HTML field:
{% for delivery in order.deliveries %}
{% for trackingCode in delivery.trackingCodes %}
<p>
{% if trackingCode|length > 14 %}
{% set trackingLink = 'https://www.dhl.de/de/privatkunden/pakete-empfangen/verfolgen.html?piececode=' ~ trackingCode %}
DHL Sendungsverfolgung: <a href="{{ trackingLink }}">{{ trackingCode }}</a>
{% else %}
{% set trackingLink = 'https://tracking.dpd.de/status/de_DE/parcel/' ~ trackingCode %}
DPD Sendungsverfolgung: <a href="{{ trackingLink }}">{{ trackingCode }}</a>
{% endif %}
</p>
{% endfor %}
{% endfor %}
Special case: DSV
With DSV, there's a special aspect: the tracking number isn't transferred 1:1 into the tracking URL but is converted into an ID via API instead. As an alternative, you could therefore link directly to the tracking website (https://mydsv.com/new/tracking/track-shipment), where the tracking number then has to be entered manually.
Here's an example where the variable delivery.shippingMethod.translated.name is first checked to see whether the shipping method's name contains 'DSV'. If so, the link to DSV's general tracking page is inserted; otherwise, the tracking link stored for the respective shipping method is used.
In the Text field:
{% for delivery in order.deliveries %}
{% for trackingCode in delivery.trackingCodes %}
{% if "DSV" in delivery.shippingMethod.translated.name %}
Dein Paket wurde per DSV versendet.
Deine Sendungsnummer lautet: {{ trackingCode }}
Du kannst den Status deiner Sendung hier abrufen:
https://mydsv.com/new/tracking/track-shipment
{% else %}
{% set trackingLink = delivery.shippingMethod.trackingUrl|replace({'%s': trackingCode}) %}
Du kannst den Status deiner Sendung hier abrufen: {{ trackingLink }}
{% endif %}
{% endfor %}
{% endfor %}In the HTML field:
{% for delivery in order.deliveries %}
{% for trackingCode in delivery.trackingCodes %}
{% if "DSV" in delivery.shippingMethod.translated.name %}
<p>Dein Paket wurde per <strong>DSV</strong> versendet.</p>
<p>Deine Sendungsnummer lautet: <strong>{{ trackingCode }}</strong></p>
<p>Du kannst den Status deiner Sendung hier abrufen:<br>
<a href="https://mydsv.com/new/tracking/track-shipment">DSV Sendungsverfolgung öffnen</a>
</p>
{% else %}
{% set trackingLink = delivery.shippingMethod.trackingUrl|replace({'%s': trackingCode}) %}
<p>Du kannst den Status deiner Sendung hier abrufen: <a href="{{ trackingLink }}">{{ trackingCode }}</a></p>
{% endif %}
{% endfor %}
{% endfor %}