Conditional tracking link in Shipping notification email based off carrier or country?

markfenske84
Shopify Partner
1 0 0

I've had a hard time finding an answer to this.  One of our companies ships using two different shipping carriers, USPS and FedEx, depending on if the customer is international or domestic.  Is there any way in the tracking email to conditionally set the Track My Package link to display the proper tracking link based off either what carrier is being used or what country the shipment is going to?

I've been looking through this doc: https://help.shopify.com/en/manual/sell-online/notifications/email-variables, but I wasn't seeing anything particularly useful in terms of shipping country.  However I did see 'fulfillment.tracking_company' here, would something like this work (general example)?

{% if {{ fulfillment.tracking_company }} == 'FedEx' %}

  <a href="//fedex.com/tracking/{{ fulfillment.tracking_numbers }}">Track Package</a>

{% else %}

  <a href="//usps.com/tracking/{{ fulfillment.tracking_numbers }}">Track Package</a>

 {% endif %}

*Note, we don't ever ship with multiple tracking numbers, so am I correct in assuming this would populate the url with only one tracking number if only one is provided?

Am I at all on the right track here with this haha?

 

EDIT:  Nevermind, digging more into it I see that how its currently set up will work for our needs.

0 Likes
Anindo
Shopify Partner
553 1 21

This can be fulfilled with the Multi carrier Shipping label app. Basically, you are looking to select a specific service for label generation based on country and send the tracking link back into the order. This can be achieved with the app.

Product Owner @ PluginHive
Shipping Automation | FedEx shipping | Multi-carrier shipping | Shipment Tracking | Australia Post shipping
0 Likes
saivismitha
Shopify Partner
137 7 29

Hello @markfenske84,

 Obviously, there is a way where you can add the track my package link while sending an email notification to the customer to track their order based on the carrier that is shipping the order.

To send email notifications without much physical effort, I would suggest the shipment tracking and notify app which automates the tracking of the order packages by notifying the customer with emails every time, when there is a change in the order status of the package. The app provides a special feature to the Shopify merchant to add a Tracking look-up page on the Homepage of the Shopify dashboard, where merchants can track multiple orders on a single page.

Customer Success @ PluginHive
Shipping Automation | FedEx shipping | Multi-carrier shipping | Shipment Tracking | Australia Post shipping
0 Likes