Page 1 of 1

Automating Invoice Order Process-and-Email

PostPosted: Thu Jun 24, 2010 1:18 pm
by pricerc
In my ongoing Sales Order import project, I now have orders being imported successfully from my client's web site, now I'm on to the next step, which is to automate processing the orders and emailing them out.

I'm sure the process should be simple, and I had some sample code, but it turned out to be for a previous version of JIWA, and doesn't work in 6.5.13.

I've found the examples for processing a single order, and automating bulk processing of back orders, but in my case, I have normal invoice orders which need processing, after which I'd like to email them out.

This will be scheduled to run every hour (a few minutes after the import).

The users currently go to the S/O Processing screen, click 'Go', then click 'Process', with barely a glance at what's there, followed by much the same thing for the email - go the the batch email screen, specify the first invoice (the latest is already there) click 'Go' and 'Process'.

where do I start?

I know I could probably roll one from scratch using a stored procedure to geta list of orders to process and then looping through each one and processing them using the technique described in http://www.jiwa.com.au/forums/viewtopic.php?f=14&t=50, but I'm kinda hoping there's a more efficient way?

Re: Automating Invoice Order Process-and-Email

PostPosted: Wed Jul 07, 2010 8:00 pm
by Mike.Sheen
pricerc wrote:...
I know I could probably roll one from scratch using a stored procedure to geta list of orders to process and then looping through each one and processing them using the technique described in http://www.jiwa.com.au/forums/viewtopic.php?f=14&t=50, but I'm kinda hoping there's a more efficient way?


The breakouts are great for use when the user has loaded a form and is interacting with it, but for batch type stuff you need a different approach.

Processing a bunch of sales orders is possible - given you know how to identify which orders need to be processed.

What's your criteria ? Perhaps the previous step - the import - inserts into a temp table the invoice no of all imported orders ? Are only the imported orders needing to be processed ?

If so, we just need to modify your import process to insert into a global temp table the invoiceno and a processed flag, and have another service poll the records in that table which are not processed and invoke the sales order processing COM object.

Not rocket science, but it will take a few hours of work. I can provide guidance, but at a leisurely pace (I'm a little snowed under at the moment). If you need more rapid action, log a support issue and we'll quote and action that for you.