This is a public Forum  publicRSS

Topic

    Kristine Tannert
    What's the cleanest way to write incident rules for...Answered
    Topic posted July 17, 2017 by Kristine TannertWhiz 
    57 Views, 8 Comments
    Title:
    What's the cleanest way to write incident rules for queuing based on mailbox?
    Content:

    Are there any Business Rule experts that can help?

    I have a dozen mailboxes and I need to route incidents to corresponding queues (ex: if incident comes through mailbox A, then set queue to Queue A, if B then B).

    Is the best way to do this to have a separate rule for each mailbox/queue? 

     

     

    Version:
    November 2016

    Best Answer

    Justin

    That is the correct way to do it, either by one rule per mailbox or if you are having them forwarded from 12 external mailboxes to one service one you would use 1 rules per email address and use if header contains rule to see what mailbox it was forwarded from externally. 

    Answer

     

    • Pramod V

      Well if you are originating few incidents from CP by any chance we can set the queue value using attribute default_value. But if Incidents are originated via emails then I don't see any other alternative than using rules.

      ~VIP

    • Justin

      That is the correct way to do it, either by one rule per mailbox or if you are having them forwarded from 12 external mailboxes to one service one you would use 1 rules per email address and use if header contains rule to see what mailbox it was forwarded from externally. 

    • Justin

      Actually i was thinking that creating a function and nesting all your mailbox rules in that and calling that only when source=techmail, would reduce the amount of rules that non-email incidents would be subjected to. Theoretically this would be more efficient; although, i doubt you would see any noticeable difference in actual performance speed.

    • Kristine Tannert

      Justin - I was kind of wondering about that, I just wasn't sure about how to write the syntax of the function since I have a one to one relationship of so many mailboxes to their queues. To me, it seems like it would still be an IF/THEN for each pair. Unless you have an elegant way to write all that?

       The only place I have used a function so far in my incident queuing rules is where I have 4 mailboxes that route into 2 queues. There's a secondary queue that I stuck into the function's THEN, and the rest dump into the ELSE logic as a catchall. I'll keep that pretty much intact. But with adding these new mailboxes from different business units in the org, I don't really have a catchall business unit.

    • Justin

      I actually meant to use the business rule function. Like in the images i attached (one to show functions, one to show rule to call function)

    • Justin
    • Justin

      the function used this way is essentially a grouping of rules you can call instead of having it in your main rules list

    • Simon Kilgarriff

      Hi Justine,

      You are going to need at least one rule per queue that you need to route to.    As Justin mentioned above you can use a function (basically a subroutine and a nice way of keeping things organised).

      Business rules can grow quite quickly and it is not uncommon to have many functions and many rules.  Having an easy to read flow and good naming is going to help you no end.