# PostProcessing Method Directive on Customer Shipment Entry

**URL:** <https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836>\
**Category:** Epicor ERP 10\
**Tags:** e10, bpm\
**Created:** [February 16, 2024, 3:48pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836 "2024-02-16T15:48:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerobertson](https://www.epiusers.help/letter_avatar_proxy/v4/letter/z/919ad9/32.png) [@Zerobertson](https://www.epiusers.help/u/Zerobertson)\
**Post date:** [February 16, 2024, 3:48pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/1 "2024-02-16T15:48:03Z")

</div>

I am wanting to create a BPM that would send an email once an order has been shipped that would send the Tracking Number (ShipHead.TrackingNumber) to the Sold to Contact’s email address.

What I was trying to do was link to a condition based of a query that verify’s that the Shipped Checkbox was true and then send the email.

When trying to create the email template I am stuck on how to bring in the Sold To customers email.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [February 16, 2024, 3:56pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/2 "2024-02-16T15:56:46Z")

</div>

I’ve done exactly what you’re trying to do… I can’t say the “best” way but what we did was create a UD field on the OrderHed for that email address and we populate it using a different BPM on the SalesOrder side anytime the that customer contact is updated. I don’t remember why we opted to go that route (as opposed to figuring out the email in the BPM).

Also, I would highly recommend you add some way to show that the email has already been sent like a UD field on the ShipHead table… because what I found is that it’s not uncommon for a pack to get marked Shipped, then unshipped, and then re-shipped… and it would generate repeat emails and confuse our customers. I don’t recall if I looked for a field that was available in the ShipHead table… but we just created a UD field there and then our BPM that sends the email also marks that checkbox as true. And then that UD field is a condition on the beginning of that email BPM to ensure we don’t send repeat emails.

---

<div class="post-metadata">

**Author:** ![Zerobertson](https://www.epiusers.help/letter_avatar_proxy/v4/letter/z/919ad9/32.png) [@Zerobertson](https://www.epiusers.help/u/Zerobertson)\
**Post date:** [February 16, 2024, 3:59pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/3 "2024-02-16T15:59:11Z")

</div>

I am newer to BPM’s so when you say use a BPM to populate the UD field on the OrderHed how do you then transfer that to ShipHead? What would that BPM look like for me?

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [February 16, 2024, 4:07pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/4 "2024-02-16T16:07:35Z")

</div>

I hope to not lead you astray… but…  
I got the order number from the shipment details using a LINQ statement where I use the first detail’s order number to then look up the order and then return my email address from the UD field.

A word of caution: Epicor allows you to ship multiple orders in the same shipment. This method of sending an email would not work well if your company combines orders into a single shipment. Our company does not combine multiple orders into a single shipment.

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [February 16, 2024, 4:10pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/5 "2024-02-16T16:10:43Z")

</div>

Another word of advice. We had some customers who wanted to send to a specific email address regardless of the person who was the contact on the sales order. So we also built out a way to control the customer preference and we check their preference in our BPM when deciding which email to send it to. This was definitely the exception and not the rule… but I wanted you to be aware of what might happen when you start sending these emails.

---

<div class="post-metadata">

**Author:** ![Zerobertson](https://www.epiusers.help/letter_avatar_proxy/v4/letter/z/919ad9/32.png) [@Zerobertson](https://www.epiusers.help/u/Zerobertson)\
**Post date:** [February 16, 2024, 4:11pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/6 "2024-02-16T16:11:55Z")

</div>

Thank you.

We are slowly trying to automate some of the manual things we have been doing so knowing these ahead of time and asking the questions to the right people will certainly be helpful!

---

<div class="post-metadata">

**Author:** ![Zerobertson](https://www.epiusers.help/letter_avatar_proxy/v4/letter/z/919ad9/32.png) [@Zerobertson](https://www.epiusers.help/u/Zerobertson)\
**Post date:** [February 16, 2024, 7:35pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/7 "2024-02-16T19:35:18Z")

</div>

When using the LINQ statement would I then treat it like a baq? TTShipHead to OrderHed to grab the UD field?

And if thats the case could I then skip the UD field and simply Link ShipHead to Orderhed to Customer To CustCnt?

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [February 16, 2024, 7:58pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/8 "2024-02-16T19:58:55Z")

</div>

Yes - as I kind of alluded to - I don’t remember why we decided to store the email address on the order rather than pull it from CustCnt table through the joins.

That should work also.

---

<div class="post-metadata">

**Author:** ![Zerobertson](https://www.epiusers.help/letter_avatar_proxy/v4/letter/z/919ad9/32.png) [@Zerobertson](https://www.epiusers.help/u/Zerobertson)\
**Post date:** [February 16, 2024, 8:04pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/9 "2024-02-16T20:04:06Z")

</div>

Sorry for all the questions but this is new to me…

When using the LINQ statement do I need to store the email in a UD field on ShipHead then? Or is it completely bypassed?

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [February 16, 2024, 8:35pm UTC](https://www.epiusers.help/t/postprocessing-method-directive-on-customer-shipment-entry/111836/10 "2024-02-16T20:35:31Z")

</div>

No you just need to store it to a local variable so you can reference that variable to stick in the Recipient or To field of the Email.
