I am trying to create a BPM that will email, via auto-print, an individual Customer Statement report for every customer that has an open invoice. This would be automatically run at the end of every month. I would like one email with multiple PDFs of each customers Customer Statement, but it seems multiple emails for each Statement would be easier?
I am using a Standard Data Directive on Erp.InvcHead because this table has the OpenInvoice field. I figure I should use a data directive because I don’t need this BPM to be triggered by any method, just by a date/time.
I was trying to use a condition of “Time is in the specified time frame” which I was putting to today’s date and time for testing purposes. But I cannot seem to get that to actually work? The time I set it for comes and goes and I get no email? That’s besides the point.
If the time condition was true I had it going to the Auto Print box. I can get that to email the Customer Statement Report filtered by the whole month of December but that just gives me one PDF with every customer on it. I cannot figure out how I would actually get the Auto Print to print multiple times, one for each customer?
After spending some time researching, It is looking like I cannot do this with just the BPM Designer basic elements? It seems I would need some custom code, but that is something I am nowhere near experienced enough to do unfortunately.
I was wondering if anyone could tell me if it is even possible to do something like this without any crazy custom code?
We solved this a much different way that took us a long time to develop but is now so fast and easy to use our organization doesn’t know what they’d do without it.
We server all our reports (internal & external) from a webserver. We can send out links to our custom reports to our customers. We do this for the customer statement. Think Amazon… when you go to Amazon you see your order status. Amazon doesn’t mail you a PDF, you go to their website and query the database live to see order history, open orders, etc.
We create cron/scheduled tasks on that webserver to automate the sending of links with scripts. The absolute best part is we don’t have to deal with BPMs or SSRS when doing things like you described.
However it’s all custom code, so you’re not going to get around that.
Thanks for the response Scott, that is actually a very interesting way to go about it. The “don’t have to deal with BPMs or SSRS” really has me intrigued too! This is definitely an option that we could look into though. Thanks!
@ethcro - Do you have the Advance Printing (the one with Break Routing)?
What I would do is create a Break/Routing for the Statement style you want, have it break on customer number, and configure an email widget in the Break routing.
Once you’re happy with it, just go to print that style, but select a schedule for when it should run, and check the Recurring check box.
That task will now be schedule to run at the specified time, and when it does, it will generate the report, and add it as an attachment to the mail message. You can even customize the body of the mail message, using info from the dataset used to create the report.
When first testing it, set the To: field of the email to just you, so you can see what is happening.
We do not have the Advanced Print Routing. I was doing research into that actually and then it got a little confusing because it seems like there are quite a few different aftermarket solutions for emailing reports. The Advanced Printing module, Document Sender, DocStar, Advanced Print Routing? I was seeing all of these mentioned but nothing that really clarified if some of those are the same thing and really which one was for the Break/Routing. It was oddly confusing to me at least.
So when researching, it was looking like I could almost get this done via a BPM. I figured I would give that a go before spending money on one of those aftermarket solutions. I was actually following a post about an Auto Print BPM where you replied with an example of something you were able to get working. Auto Print BPM
I tried to go off of that and other posts but eventually ran into the issues I mentioned above. So it is looking like my best bet would be to get the Advanced Print Routing then? I saw a few posts where you had gone into detail about the breaking/routing feature and I figured that would do what we needed but I got a little ambitious and though maybe I could do it with a BPM…
Going with a BPM route, you can create an email, but it won’t let you actually attach a pdf created by a report.
We do this for our daily “Shipping notices” These are emails (one per packer), that have the packer info in the email, but don’t include the actual packer. These go out to a list of people - which is built dynamically for each email. Here’s an example:
The BPM builds the email entirely within a Execute Custom Code widget. I actually use a DD to trigger this. The table the DD is on has nothing to do with shipments - It is the UD05 table. When UD05.Checkbox20 changes from False -> True, it executes the code to build and send the email.
We use Break/Routing styles for other things, like Order Acknowledgment. We added a style (that uses the same RDD and RDL, but has Break Routing enabled. Then in the break routing, I can use the meial widget to make the email - which will include the PDF that the report style would generate if Routing was not turned on.
One thing to keep in mind where Break routing helps, is that it will act like multiple print jobs, instead of one. For example, if you print all the invoices for an AR group, it prints as one job. As far as the print processing is concerned, it is a single report. And not several reports separated by invoice number.
If your invoice form showed the page number, the first page of each invoice would be the next page number after the previous invoice. When break routing is used, you could break on a field like InvoiceNum, so that way each Invoice is its own print job. Otherwise you’d be sending copies of all the invoices to each customer.
We’re a small company (actaually a small division of a giant company), with only about 10 users. If I had to rank the best “extras” for companies to buy, they would be
DMT
Advanced Print Routing - It shows as “Advanced Printing” in the list of licensed modules in EAC. I’m talking about the one that provides break routing.