locked
Queue item: What sort of workflow action would release an item from the queue? RRS feed

  • Question

  • Hi there,

    I have a simple queue proof of concept that I need to develop, and I would like to hear your thoughts on how to remove an item from the queue through a workflow based on the creation of an opportunity. Here is the "functional spec":

    1. When a Client record (i.e.: Account, which has been renamed) is created;
    2. Will check the Client Type field. If client is NOT of type Prospect, it will not go any further;
    3. If of type PROSPECT, it will then create a new queue item in a specific queue, with the Client record as the queue item;

     

    • Now the workflow is waiting for an opportunity to be created for that client in order to remove it from the queue. How can I check this with a workflow? What should be the next action?
    • Also, when successful, what action should I perform to remove the record from the queue?

    Thank you in advance for your thoughts.

    Regards,
    P. 




    • Edited by pmdci Monday, October 10, 2011 11:41 AM
    Monday, October 10, 2011 11:24 AM

Answers

  • That's right. two things can happen when you "remove" the item from the queue (or the belt for your example):

    1. You place the item in another queue (in this case the queue item is edited to update the queue lookup). This is refered as "routing".
    2. You remove the item from the queue, in this case the queue item is deleted so you don't need any other actions on it.

    Gonzalo | gonzaloruizcrm.blogspot.com

    • Proposed as answer by Gonzalo Ruiz RModerator Tuesday, October 11, 2011 2:56 PM
    • Marked as answer by pmdci Tuesday, October 11, 2011 3:13 PM
    Tuesday, October 11, 2011 2:56 PM
    Moderator

All replies

  • 2 things buddy,

    I don't think You can remove the queue item in a workflow. You have to delete the queueitem to remove it from the queue and there is no delete action in the workflow.

    The only option can be remove the 4th step  and create a workflow on opportunity create and if orginating field has a value then call custom workflow

    activity. Use the leadid to check if it exist in the queue, if yes delete the queue item.

    Here is ample code to delete a queueitem in a workflow, The sample is taking about email, just make the changes accordingly.

    http://community.dynamics.com/product/crm/crmtechnical/b/crmmayankp/archive/2011/10/08/crm-2011-removing-email-from-queue.aspx

    Just remember you can't create a workflow assembly in crmonline.

     

    I would suggest the cleanest solution will be create a plugin on setState/setstatedynamic of lead or create event of the opportunity and use the logic I expalined above and delete the queueitem.

    I hope this helps.

     


    Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia [URL=http://mscrmshop.blogspot.com]http://mscrmshop.blogspot.com[/URL]
    • Proposed as answer by Amreek Singh Monday, October 10, 2011 12:10 PM
    Monday, October 10, 2011 12:09 PM
  • Hi Amreek,

    Thank you for your reply.

    Actually I managed to do a significant part of this workflow:

     

    The line highlighted in GREEN would kick off when the user creates one opportunity for the client. As soon as an opportunity is created for a client, the field "Opportunity Progress" (a boolean) will be set to YES through another simple workflow.

    The line highlighted in RED is the one I am having issues with. That is, I would like to do some action based on an item being REMOVED from a queue. However I am starting to question if this is required anyway. If an item is removed from the Queue, that means the queue item is deleted, correct?

    This is what I am wondering: If we think of the queue as a production line with items moving through a conveyor belt. When we REMOVE an item from the queue, we are getting it out of the conveyor belt, so there is no point in trying to update the status of the item in the belt since it is not there anymore. Am I correct in my assertion?

     


    MCC, MCP, MCTS
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, October 11, 2011 1:34 PM
  • That's right. two things can happen when you "remove" the item from the queue (or the belt for your example):

    1. You place the item in another queue (in this case the queue item is edited to update the queue lookup). This is refered as "routing".
    2. You remove the item from the queue, in this case the queue item is deleted so you don't need any other actions on it.

    Gonzalo | gonzaloruizcrm.blogspot.com

    • Proposed as answer by Gonzalo Ruiz RModerator Tuesday, October 11, 2011 2:56 PM
    • Marked as answer by pmdci Tuesday, October 11, 2011 3:13 PM
    Tuesday, October 11, 2011 2:56 PM
    Moderator
  • Thank you for the info.

    So I could also put a wait condition to say that if the queue lookup changes, then another action could take place)... Good stuff.

    Thanks again


    MCC, MCP, MCTS
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, October 11, 2011 3:12 PM