Shipment emails bridge the gap between order confirmation and the moment when tracking number is assigned to the order and its status updated to Shipped. The shipment notification can include information about the carrier and a tracking number allowing your customers tracking their order journey.
In this guide, we explain how configure and customize shipment emails in Magento 2.
Why Shipment Emails Matter
- Enhance Customer Confidence: Let customers know their order has been fulfilled and is about to be or already is on the move.
- Keep Everyone Informed: Inform internal teams, like sales managers, by sending copies.
- Simplify Tracking: Include tracking numbers so customers can follow their shipments easily.
Configuring Shipment Emails in Magento 2
Follow these simple steps:
- Log in to Your Admin Panel
Sign in to your Magento 2 Admin Panel. - Access the Configuration
Navigate to Stores > Settings > Configuration. - Find the Sales Emails Section
Under Sales, click Sales Emails. Then, expand the Shipment section. - Enable Shipment Emails
Ensure the setting is enabled. This sends an email as soon as a shipment is created. - Select Your Email Sender
Pick the sender from a list of five default email addresses. This is the face of your communication. - Choose Your Email Templates
- For Registered Customers: Select a template tailored for those with accounts.
- For Guests: Choose a template for customers who shop without an account.
- Add Additional Recipients
In the Send Shipment Email Copy To field, add extra email addresses. Separate them with a comma. This helps notify team members like your sales manager. - Select the Copy Method
Choose between BCC or sending separate copies. - Save Your Changes
Click Save Config to lock in your settings.
![configure magento 2 shipment email](https://wismolabs.com/wp-content/uploads/configure-magento-2-shipment-email.png)
Customizing Your Shipment Emails
Customizations can elevate your customer experience. You can change default or add additional copy helping your customers utilize the information available in Magento 2 shipping notification emails.
Customization require accessing and editing email template. Basic knowledge and understanding of HTML is needed.
Below is a step-by-step guide to add the tracking link code to your shipment email template:
- Log in to Magento Admin:
Open your Magento 2 Admin Panel. - Go to Email Templates:
Navigate to Marketing > Email Templates. - Create a New Template:
Click Add New Template. - Load the Default Shipment Template:
In the Load Default Template section, select the default shipment email template.
Click Load Template. - Customize if Needed:
Edit the text or link style to match your brand, add additional text. - Save the Template:
Click Save Template. - Apply Your Custom Template:
Go to Stores > Settings > Configuration.
Under Sales > Sales Emails, expand the Shipment section.
In the Shipment Email Template dropdown, select your newly saved template. - Save Configuration:
Click Save Config to apply changes.
![customize magento 2 shipment email template](https://wismolabs.com/wp-content/uploads/customize-magento-2-shipment-email-template.png)
Now your shipment email can better match your needs. Feel free to test by creating a shipment and verifying that the link appears correctly.
Standard Magento 2 snippets to enhance your Shipping notification email
Below are several built-in snippets you can add directly in your email template. They work without any extra backend coding. Just add them in your email template as you see fit.
Customer Details:
This displays the customer’s name.
{{var order.getCustomerName()}}
Order Number:
Shows the unique order number.
{{var order.increment_id}}
Formatted Order Date:
Displays the order creation date in a readable format.
{{var order.getCreatedAtFormated('long')}}
Billing Address:
Renders the billing address as HTML.
{{var order.getBillingAddress().format('html')}}
Shipping Address:
Renders the shipping address as HTML.
{{var order.getShippingAddress().format('html')}}
Order Items Block:
Inserts the list of ordered items. (This is automatically generated by Magento.)
{{var items_html}}
Conditional Display:
Use a conditional block to display content only if a variable exists. This shows the tracking number if it is available.
{{depend shipment.getTracksCollection()}} <p>Your tracking number: {{var shipment.getTracksCollection().getFirstItem().getTrackNumber()}}</p> {{/depend}}
Translation Directive:
Ensures the text is translatable based on the store’s locale.
{{trans "Thank you for your order!"}}
These snippets rely on variables already provided by Magento’s email sender. They let you display order and shipment details without any coding outside the email template. Enjoy customizing your emails!
Advanced Customization for Developers
Developers can extend Magento’s functionality with a custom module or observer. For example, override the shipment email sender class to pass custom data:
$templateVars['tracking_url'] = $shipment->getTrackingUrl();
$templateVars['items_html'] = $this->getItemsHtml($shipment->getAllItems())
This ensures your custom variables display correctly in the email.
Stay Ahead with Proactive Shipping Notifications
Now imagine keeping customers informed throughout the shipping process. Instead of a one-time email, you could update them with real-time messages like “out for delivery”, “delivered”, or even late shipment notification or messages like “We tried to deliver but you were not home”. This is where WISMOlabs steps in. See the guide on how WISMOlabs extension enriches customer post-purchase experience and how to install it into your Magento 2 store.
If you want to go beyond the basic shipment notification, try the WISMOlabs Magento 2 Extension. Our solution sends ongoing shipping updates so your customers stay in the loop until the package is in their hands.
![magento 2 order tracking and shipping tracking extension](https://wismolabs.com/wp-content/uploads/magento-extension-icon.png)
All shipment notifications can be sent via email, SMS and are fully branded, personalized and can include upsells and cross-sells.