Has anybody figured out how to show multiple tracking numbers per shipment, so we can have that populated in an email template to notify our customers with all tracking numbers along with the URL linked.
Just looking for an example if somebody has cracked this code.
Scenario: Shipment document might have few line items which needs to be shipped and the shipper packages into multiple boxes and gets tracking number for all those boxes, the tracking number gets stored against each package.
How do we show those tracking numbers in the email template with looping so it has the tracking number and URL to click.
Appreciate the response.
Page 1 / 1
Not sure how you’re currently using your email template. Looking at the fields, this is the one you’ll need:
As well as the Tracking URL below it if you want to include that as well. Alternatively, you can include the tracking information to the shipment confirmation attached to the notifications where you can add the line number formulas.
Here’s how I’ve incorporated that into our email templates:
Dear ((Shipping_Contact.Salutation)).
This is an automatic email to notify you that Order #((OrderList.OrderNbr)) has been shipped with Shipment #((ShipmentNbr)).
You can find a copy of the shipment confirmation attached to this email.
Here is your tracking number(s):
((Packages.TrackNumber))
If you have any questions, please don’t hesitate to contact us at ((DefaultCompanyContact.EMail)).
Thanks, Jamesh for your comments.
I know it works for single package but I’m looking into bit more complex scenario which is “If the Shipment has more than 1 package and more than 1 shipment tracking” then it needs to list all tracking numbers and URL list.
@hsarjapur
So this doesn’t list the multiple lines if there’s more than one package then?
I think at this point I would stick to including the multiple tracking numbers inside the report then. Here’s an example to this showing the report and sub report to help with this although it’s a couple versions behind:
There’s another post on the AUGForums for a different email notification but you can try using a “for each” option to get multiple records to display in a new row. You might have to do it by business event and group based on “Shipment Number” so that you’ll have 1 shipment, but multiple tracking numbers.
@meganfriesen37 so you would add the HTML to look like this?
<foreach> ((Packages.TrackNumber))
</foreach>
I’m not an HTML expert. That looks like it should be correct. You’ll need to make sure that you have all the details expanded out in your underlying GI. I always have a bit of trial and error to get it to work for me :)
Yes, that’s what I was looking for to do inside of the email template, pretty simple hack that I’m surprised Acumatica hasn’t created an article or a template to use. I had to search entire Google to get a code sample and here is the code snippet if it helps others.
I didn’t connect to any carriers, just used demo data and added my own tracking numbers to test the loop condition working and it did spit out the tracking number fields per package for the same shipment.
Thanks everyone … Happy Friday !!!
I just responded with my comments I guess it's still sitting with moderator to approve my response.
For tracking URL’s, there are a few ways to do this. If you only use 1 carrier and will have 1 package per shipment, I like to grab the URL from the carrier’s tracking website, and imbed the ((SOPackageDetail_trackURL)). This way, when it gets emailed out with a Tracking Number, the URL will be accurate. This can go right into the text.
There is an easy way and a hard way to customize this email template for multiple tracking numbers. The easy way (if you only have one tracking number per shipment) is to put in the ((SOPackageDetail_trackNumber)) into the text. If you need multiple tracking numbers per shipment, then I would recommend using HTML code. It is not as scary as it looks!
To use HTML, change “Visual” to “HTML” in the template toolbar (to the left of the undo button). Then just copy this code and paste it in, and you will be all set. If you would like to change the text of the body of this template and aren’t familiar with HTML, just look for (or control+F) where the text you see in the screenshot is, and paste or type in your own text and fields.
<p class="MsoNormal" style="line-height: normal;"><font face="Arial, sans-serif">Dear Customer,<br><br>This is an automatic email to notify you that Order # <span data-field="yes">((SOOrderShipment_orderNbr))</span> has been shipped with Shipment # <span data-field="yes">((SOShipment_shipmentNbr))</span>. You can find a copy of the shipment confirmation attached to this email.<br><br></font></p><p class="MsoNormal" style="line-height: normal;"></p><p class="MsoNormal" style="line-height: normal;"><br></p>
<span style="font-family: Arial, sans-serif;"><br></span><span style="font-family: Arial, sans-serif;"><br></span><p class="MsoNormal" style="line-height: normal;"><span style="font-family: Arial, sans-serif;">If you have any questions, please don’t hesitate to reply to this email.</span></p><p class="richp"><br>Thank you for choosing COMPANY NAME</p>