Need to fire BPM when new RMARcpt is saved

,

I’m trying to have an email sent when an RMA line is received. I’m struggling with whether this should be a Data or Method Directive, and what the Condition should be.

Basically, our Customer Service rep would enter a new RMA and add the line(s) being returned. The RMA is then dormant until the returned item(s) are received, at which point someone in our Receiving department goes into the RMA and creates a new Receipt for the line(s) that came in. At that point, the CSR needs to be notified of the received item(s).

I’ve been asked to automate the sending of an email when a line is received. I don’t want this to happen right away on the GetNewRMARcpt, but rather after the receiving clerk finishes filling out the Received qty and Bin location, then saves the RMA.

How would I go about firing the email off when there is a new RMARcpt created and saved? A Method Directive on RMAProc.Update seems logical, but I don’t know how to make the condition dependent on the fact that a new Receipt was created, but the Line is still open.

I’m sure this is an obvious one for most of you, but ChatGPT and Co-Pilot sure struck out! Thank you in advance for any guidance you can provide.

I would approach this as a post-processing method directive because you want them to save it and have it written into the database. A data directive should work equally well. The question becomes do you want to reference any data outside of the particular data table with your email. If so, you only have access to the single table in a data directive. A method directive would allow you to reference related tt tables to pull in more information into your email.

Either way should work. It comes down to personal preference and what additional information, if any, you want included.

We do an alert on the creation of a non-conformance record and that’s a data directive because it’s just an alert that the record was created and the number.

Thank you for the reply. I already have some custom LINQ code written that will allow me to access everything I need for the email no matter which type of directive is used.

My main question is what is the Condition that executes the code and then sends the email?

That’s up to you how you want to approach it. I typically use a conditional block with the criteria. Alternatively, you can write custom code to do so, it’s C# format.

I would look for where RMA <> blank and received = true.

What I find helpful for figuring these out is to run a trace on change only for the process portion that I want to see the email trigger from. So I would create an RMA in RMA processing and then turn on tracing just for doing the receipt.