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.
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.
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?
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.
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.
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!
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.