I am trying to set up a round robin distribution for cases for the support team. I found a great app on the exchange it is free that will do everything I want but the issue is we are using service cloud and the app requires a pick-list field be a specific value to trigger the round robin. I am trying to make a trigger that would fire on creation hopefully there is a way to tell it to do it before the round robin apex. that would updated the pick-list based on the record type of the case. Is this possible? I tried to use a workflow to update it but the apex from the round robin triggered before the workflow did and didn't distribute the case.

  • Is there anything preventing you from simply setting a default value for said picklist? That way it will always be the desired value for new Cases.
    – Charles T
    Mar 7, 2017 at 18:45
  • I did consider that, but we have more than one group of support and would need to apply the value dynamically so the round robin would only distribute the needed cases not the ones that should go to another group
    – Ethan.V
    Mar 8, 2017 at 18:52
  • Are support cases entered in manually or do they originate from some sort of integration? If entered manually, perhaps you could have these cases be created by a Quick Action instead of the standard New Case page. You can put predefined values on a Quick Action and you can have it derive additional predefined values before it even creates the record. You could also set up a Visual Flow for case creation as well, which can assign the necessary value before the case is even created.
    – Charles T
    Mar 9, 2017 at 4:35
  • My life would be much easier if it was created manually, but it is not. we are using service cloud which is very limited on what can be pre set on creation and automatically makes the case when an email is received.
    – Ethan.V
    Mar 10, 2017 at 15:44
  • OK well, do you have any information as to whether the package trigger checks the picklist field before or after create? If it's after, then you should be able to implement a before create trigger that assigns the picklist value prior to the package. Even though you can't see the package's code, you may be able to investigate through Developer Console when it fires. You may also just want to contact the package's dev and see if they can propose something to you that will definitely work.
    – Charles T
    Mar 10, 2017 at 16:22

1 Answer 1


See Order of execution: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

You will need to tackle this by ensuring the data you insert has the right values or contact the vendor to see how the app can be utilized in this situation. If it only works on insert the only way is to insert the right data Depending on when the trigger runs (before or after) a WFR may stop it from processing.

Instead, if you can, set the WFR to fire on owner Change (excluding the default owner or whatever logic works in your case to indicate assignment). That would allow the app to do its things and then the WFR would set the value as needed Misread question.

  • Thanks for the response, the app is managed so I am not able to see the code but in all my testing the assignment is not triggered off a change on the case only on creation. so using a WFR does not seem to do anything. I am not able to tell if it is a before or after action that the app is using. I was hoping to answer if there is a way to tell salesforce to execute one trigger before another or if it just does all the triggers at the same time. thanks
    – Ethan.V
    Mar 7, 2017 at 16:52
  • What I am saying is if the app changes the assignment from says Default User/Que A to User B then have the workflow rule trigger when the owner changes from Default to said user. That will happen after the assignment app runs
    – Eric
    Mar 7, 2017 at 16:56
  • service cloud will not allow me to assign the picklist value on creation and the app only does its thing when the case is created. so it does not assign to a user at all through the app. so i need to modify the picklist as it is created to trigger the app. but i am not sure it there is a way to prioritize the triggers.
    – Ethan.V
    Mar 7, 2017 at 17:11
  • You said the "round robin triggered" and I misread it that it tiggered and you wanted to update the pick list after. Yea, you cannot prioritize triggers either. You will need to tackle this by ensuring the data you insert has the right values or contact the vendor to see how the app can be utilized in this situation. If it only works on insert the only way is to insert the right data
    – Eric
    Mar 7, 2017 at 17:18
  • Sorry I was not clear in my original post. thanks for your help
    – Ethan.V
    Mar 7, 2017 at 17:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .