Attach order acknowledgement to email in BPM

Another … “better” approach might be to use Auto Print, or Run the Report using the Breaking and Routing Capabilities of the system to do the emailing for you.

So instead of doing the email in the BPM, you run the report and let the report do the emailing for you automaticaly.

2 Likes

New plan:
finish my BPM by sending the acknowledgment to the system agent.
Setup a new async BPM that fires when SysTask.TaskStatus changes to COMPLETE.
If it’s a report I sent (aka it has some signature in the TaskNote), then I’ll build the email and add the attachment.

The only reason I don’t want to go this route is it does not support HTML (at least not in my version).

1 Like

side note: is there a way to enable a standard directive and pass some info with it? Like a variable or something?

Pass information in CallContext

1 Like

Thanks. You might not know it, but I am slowly leveling up haha. And I try to pay it forward as much as I can.

2 Likes

What are you a Dr of ?

Those are just my initials. The nickname stuck from when I was a teenager.

1 Like

Hi dr_dan,

Were you able to get a working BPM that sends the Order Acknowledgement form? I am trying to automate that process, and I’m having an issue getting the report as a pdf attachment.

Yes and no.
I thought I had it working OK (I got it to work seemingly reliably) but at some point I realized it was not working every time. So I ended up disabling it and haven’t gotten back to it to figure out why it wouldn’t work reliably.

I don’t know if either of you are still looking for this, but since I was referencing @dr_dan 's post to refresh my memory I thought I would pop this in.

Your answer lies in using RunDirect, instead of SubmitToAgent. If you want it to run asynchronously, run it via a scheduled function, which you can schedule on the fly to run “Now”.

Here is the run direct example, which just so happens to be the same report :tada:

1 Like

I’ll have to circle back. I don’t know why I needed to have HTML formatting. I mean, just getting a plain text email with a file attachment would be much better than getting a pretty email with no email attachment. Why wouldn’t I want to use AutoPrint I guess now that I’m thinking about it?

I don’t question peoples motives,(I lie too.) I just provide answers :rofl: