cancel
Showing results for 
Search instead for 
Did you mean: 

Outlook VBO Strange thing noticed

Neel1
MVP
Hello- I observed strange thing in using MS Outlook VBO that once unread mails are received in Collection and added to queue. Mails are getting replied in alphabetically manner not time wise manner. This is leading to late replying of mails specially person having name starting from V,W.

Please share suggestion to counter this.

------------------------------
Neeraj Kumar
Software Engineer
------------------------------
1 BEST ANSWER

Helpful Answers

MattPalmer
Level 5
I have an email bot and I'm getting emails as a collection and looping and adding the emails into the queue one at a time.  I sort the collection by time received and insert the oldest emails first into the queue.  I do this one at a time so that I can check prior to adding to queue, that the email doesn't already exist in the queue so that the bot doesn't attempt to handle the same email twice.  This does take longer than inserting the entire collection into the queue, however, we are talking like less than 2-3 seconds longer when running unattended.  

Matt

------------------------------
Matt Palmer
Business Process Specialist
Chesapeake Energy
America/Chicago
------------------------------

View answer in original post

6 REPLIES 6

david.l.morris
Level 15
The best way to ensure that items are retrieved from the queue in the order you want them retrieved is to add them individually rather than as an entire collection at once. Though, as far as I have seen, when you add a collection to a queue, it generally should treat the top row as the one that would be retrieved first. But I can't really say I've tested that a lot specifically. So, I'd get emails from Outlook into a collection, sort the collection based on a datetime field, and then loop through the collection adding to the queue one by one.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Hello Dave,

I am processing unread mail, so suppose there are 20 mail which are coming to collection and then i am adding that collection to Queue. If i am going to add each item one by one into collection then it will take time. is this by design that mails are getting replying in this manner or something else

------------------------------
Neeraj Kumar
Software Engineer
Ericsson
Asia/Kolkata
------------------------------

The order that items are retrieved from the queue is separate from replying to emails. The queue is designed with First In First Out. Without seeing the collection you're adding to the queue or the design of the process that is retrieving from the queue, I can't really guess why it would be happening in the wrong order.

I'm not sure what you mean by 'add each item one by one into collection then it will take time'. It would be slower, but unless you're adding thousands of items at once, you are unlikely to notice the performance difference from Control Room.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company

Hi Neeraj,

If you read all the emails in collection, then you can directly put that collection to the queue without any looping.
Regards
Sutirtha Gupta
TCS


------Original Message------

Hello Dave,

I am processing unread mail, so suppose there are 20 mail which are coming to collection and then i am adding that collection to Queue. If i am going to add each item one by one into collection then it will take time. is this by design that mails are getting replying in this manner or something else

------------------------------
Neeraj Kumar
Software Engineer
Ericsson
Asia/Kolkata
------------------------------

MattPalmer
Level 5
I have an email bot and I'm getting emails as a collection and looping and adding the emails into the queue one at a time.  I sort the collection by time received and insert the oldest emails first into the queue.  I do this one at a time so that I can check prior to adding to queue, that the email doesn't already exist in the queue so that the bot doesn't attempt to handle the same email twice.  This does take longer than inserting the entire collection into the queue, however, we are talking like less than 2-3 seconds longer when running unattended.  

Matt

------------------------------
Matt Palmer
Business Process Specialist
Chesapeake Energy
America/Chicago
------------------------------

Sorting the collection by "received on" column help in resolving the issue. Thanks guys for your advice and support.