Skip to main content

Hey there, I have a clunky process that I’d love to get thoughts on how best to improve: Shipment confirmation emails for some of our order types.

I’ve always been confused by Acumatica’s out-of-the-box “Email Shipment” Action on the Process Shipments screen. There are some major defects to it:

  • When rows are processed, they don’t drop off the queue. So you cannot schedule this screen, at the risk that the same email could be sent more than once (which is a bad customer experience).
  • Rows drop off this screen once the shipments get invoiced. So if they get invoiced prior to getting emailed, we’ve lost our window to email those out.
  • Can the email template associated with this process action capture all the necessary fields that we want to include in our email? Tracking numbers, tracking URLs, etc. I honestly don’t know.

So I guess Business Events come to the rescue...except:

  • They are notoriously frustrating to get working properly. They may just choose not to work and you don’t know why, lol.
  • Depending upon how a shipment is confirmed (via shipping software or manually) tracking numbers and tracking URLs can show up in a few different tables/fields. And since you cannot Group by anything with BE inquiries, it is a hassle to setup multiple events to account for all of these scenarios.
  • When an email does get sent properly it doesn’t show up in the Activities section of the shipment — or at least I don’t know how to accomplish that.
  • If you need to resend an email confirmation, there’s no easy way (that I know of) to do that.
  • So it’s difficult to have visibility into all the emails that need to go out, and which ones actually did and didn’t.

Does anyone have any creative ideas? We’d rather not pay an arm and a leg to our VAR to solve for something that Acumatica should solve for out-of-the-box.

Would it be cleaner to use “Trigger by Schedule” BEs rather than “Trigger by Record Change”?

Is it easy-ish to customize the Process Shipments screen to fix the defects I mentioned above?

Thanks for any ideas.

Hello Max,

I ran into a similar issue for a member, and while Business Events are certainly not east to set up, they work extremely well once they are set up. I have documented a set up below, and I hope this helps:

 

This process begins with a GI pulling in the confirmed shipments in order for the Business Event to be linked. I have included this GI below (BE-ConfirmedShipment). One thing to note: the GI output has multiple lines sometimes due to a shipment having multiple packages. 

GI Output

Once the GI is created, now it is time for a Business Event which you can see is linked to the GI in the top right corner. One thing to note, if the “Raise Event” is set to “Once for All Records”, this means the Business Event will fire once per shipment (regardless of how many packaged are on it). If this is set to “For Each Record”, then the email will send out per line on the GI (i.e. however many packages there are). 
 

Trigger Conditions Tab
Fields to Track
Email Template Link

 

Lastly, is the email template. The template is what is sent as a result of the Business Event firing. There is an easy way and a hard way to customize this template. 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.

<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>


<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" style="background: rgb(255, 255, 255); width: 100%;">
<tbody>
<tr>
<td style="direction: ltr; font-size: 0px; text-align: left; vertical-align: top;">
<table role="presentation" cellspacing="0" cellpadding="0" border="0">
<tbody><tr><td class="" style="vertical-align: top; width: 1000px;">
<div class="mj-column-per-100 outlook-group-fix" style="font-size: 13px; text-align: left; direction: ltr; display: inline-block; vertical-align: top; width: 40%;">
<table role="presentation" width="40%" cellspacing="0" cellpadding="0" border="0" style="vertical-align: top;">
<tbody><tr><td align="left" style="font-size: 0px; word-break: break-word;">
<div style="font-family: sans-serif; font-size: 14px; line-height: 23px; text-align: left; color: rgb(0, 0, 0);">
<table width="70%" cellspacing="0" cellpadding="0" style="min-width: 100%;">
<tbody><tr>
<td>
<table class="smarttable" width="100%" cellspacing="0" cellpadding="0" style="min-width: 100%;"><thead>
<tr>
<th scope="col" width="20%" style="font-family: Arial, sans-serif; font-size: 14px; border: 1px solid rgb(237, 237, 237); border-collapse: collapse; line-height: 15px; color: rgb(0, 0, 0); text-align: left; background-color: rgb(237, 237, 237);">Tracking Number<br></th>
</tr>
</thead>
</table>
<table width="100%" cellspacing="0" cellpadding="0" style="min-width: 100%;"><tbody><tr>
<td>&lt;foreach&gt;
<table class="smarttable" width="100%" cellspacing="0" cellpadding="0" style="min-width: 100%;"><tbody>
<tr>
<td data-label="Tracking Number" width="20%" valign="top" style="font-family: Arial, sans-serif; border: 1px solid rgb(237, 237, 237); border-collapse: collapse; font-size: 12px; line-height: 20px; text-align: left;">((SOPackageDetail_trackNumber))<br></td>

</tr></tbody></table>&lt;/foreach&gt;</td></tr></tbody></table>
</td></tr></tbody></table>

</div>
</td></tr></tbody></table>
</div>
</td></tr></tbody></table>
</td></tr></tbody></table>

<br>

<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>

 

 


Hi @rkenna thanks for the detailed info, I appreciate it. 

My only clarifying question is about this statement of yours:
One thing to note, if the “Raise Event” is set to “Once for All Records”, this means the Business Event will fire once per shipment (regardless of how many packaged are on it)

How does the BE know to fire once per shipment? What is telling it to do this? How does it know to fire for some rows, but not other rows with the same Shipment #?

I’ve been looking into the documentation to try to understand what “Once for All Records” actually means, but I can’t really find a straight answer. 

Thanks.


Hi @max21,

Because the trigger conditions tab is set for a record being inserted, and all the packages have the same shipment number on the GI, the Business Event can either trigger for each record (meaning per line package on the GI) or once for all records on the shipment. Does this help clarify? 

 


Hi @rkenna, still not 100% clear, but thanks for the response. 
Let’s say I also had Customer ID as a field in the GI, and there are multiple rows for the same Customer ID. How would I tell the Business Event to instead trigger once for all records of the same Customer ID? In other words how does it know that Shipment ID is what you want to “group by”? 

The way I read “Once for All Records” is that it would fire once for all the records — not sure how it knows to do “once for all records on the shipment”. 
 


Hello @max21 ,

I apologize for the confusion, and I understand your question now. The reason this business event knows to trigger “once for all records” of the shipment is the structure of the GI. The back-end of the Generic Inquiry on the Relations tab is what defines this. 


These Shipment numbers are linked/ related via the joins and links on this tab. The Generic Inquiry is built (as seen below) to relate the Shipment Number with all Tracking Numbers (found under SOPackageDetail) of the shipment.  Although they display as multiple lines on the GI, the Business Event is able to trigger “Once for all Records” as a result of the structure of the GI knowing the relations between the Shipment Numbers and the Tracking Numbers.

I hope this helps!

 


Reply