1 2 Previous Next 20 Replies Latest reply on Jul 18, 2013 2:01 PM by Brian.Dailey

    Advice on setting up a custom service request

    Apprentice

      I  have a service request setup for 'Enable internet access', this service catalogue item has a box for line manager approval whic is ticked, and also two other boxes, one for 'IT authorisation' and one for 'Service authorisation', which are both left blank. So the process goes like this, user need internet access, fills in the request, the line manager approves, the request is sent to the helpdesk team, they add the user to the internet access enabled group.

       

      Leadership today asked 'what if a line manager wants to request internet access for one of their staff ?', this process would not work. If they made this request currently then the line managers manager would have to approve it, and that wont fly.

       

      Whats the best way to proceed with this to enable line managers to request and auto approve internet access for a staff member ? Should i simply add another service catalogue item for that type of request ? that just seems like an untidy work around. Can i modify this service request structure somehow to take into account those two scenarios ? Is there another way that im not seeing ?

       

      Thanks in advance,

       

      Russ.

        • 1. Re: Advice on setting up a custom service request
          Expert

          I assume at the moment you are sending the approval request to the manager of the person entering the request.  What if you sent the approval to the manager of the person that the request has been entered for.  Then also add in a check that if that person is the same as the person making the request then it is auto-approved.

           

          I have similar functionality in our request system where if the request is being entered by a Branch Head, then it is auto-approved no matter who the request is being entered for.

          • 2. Re: Advice on setting up a custom service request
            Apprentice

            Thats kind of what i was thinking while i was driving in this morning, to where if the request is being entered by a Manager, then it is auto-approved. Im just not sure how i would implement this in the service request section. Do you have any info that might help me in setting that up ?

            • 3. Re: Advice on setting up a custom service request
              ITSMMVPGroup

              Hi Russ,

               

              You should:

               

              1. Create another process condition (either standard or calc) that will check the current user's organizational status (i.e., are they a line manager?  I'm not sure how you have this stipulated in your setup, but check against whatever that attribute may be), and return true if they match.
              2. Use this new condition in a Decision and simply route the "Yes" result to an automatic action for the Approval.  The "No" result simply continues on into your standard process the way it has been.

               

               

              If you need help with the calc, just let us know the attributes and values you're working with, and I'll try to give you an example.

               

              -Brian

              • 4. Re: Advice on setting up a custom service request
                Expert

                I have done exactly has Brian mentions.  In my case I just set up a boolean attribute on the User object to flag who is a Branch Head, and the condition in the workflow checks against this.

                 

                When the request is submitted, the condition is checking that the LastUpdateUser/BranchHead boolean is true.

                • 5. Re: Advice on setting up a custom service request
                  Apprentice

                  I  have 3 attributes on my user object that could contain managerial data. I have Line Manager, manager and _manager. Landesk pulls information about the users from AD, but AD only has fields for who a users manager is, not a boolean value of is this user a manager yes/no. So how does landesk know if a user is a manager or not ?

                   

                  For other, non related processes, we currently know if someone is a manager based on whether or not they are a member of a particular AD group called 'Leadership', can i create a condition whereby servicedesk can check this group membership ?

                  • 6. Re: Advice on setting up a custom service request
                    ITSMMVPGroup

                    Russ,

                     

                    I was looking at your specs and trying to figure out an elegant solution, the simplest would be to add a boolean attribute to User like Paul mentioned, something like CanSelfApprove or IsManager, and just check that flag in your condition.  The only hard part there is populating the values for that flag... you could do it manually if there aren't 1000 managers, or you could shoehorn a calculation into your SQL for the AD import every night that sets it.  Neither sounds all that glamourous.

                     

                    Then it just hit me... why try to clean up after-the-fact? Head it off at the pass!!!

                     

                    If you're selecting the user for whom access is getting installed, and this ticket is being put in by his/her manager... then just :

                     

                    1. Add an automatic action near the start of your process that includes a calculation for the "Line Manager Approval" tick box.
                    2. In the calculation have it compare your request's attributes {RaiseUser/LineManager} to {CreatedBy} to verify the requestor is this person's manager, and if so return FALSE (no approval needed)

                     

                    If you have multiple attributes that might contain a person's manager that's valid for this comparison, it should be easy to add into the same calculation.  Just set your "Value=true" to begin with, followed by three if-statements (one for each manager-attribute) that sets "Value=false" if the comparison is true.

                     

                    Par example:

                    import System
                    static def GetAttributeValue(Request):
                                    Value = true
                                    if Request.RaiseUser._LineManager == Request.CreationUser:
                                                    Value = false
                                    if Request.RaiseUser.Manager == Request.CreationUser:
                                                    Value = false
                                    if Request.RaiseUser._Manager == Request.CreationUser:
                                                    Value = false
                                    return Value

                     

                     

                     

                     

                    That'll do, pig.. That'll do. 

                     

                     

                    -Brian

                    • 7. Re: Advice on setting up a custom service request
                      Apprentice

                      Yeah, that all makes sense principally, its just taking me a little bit to actually get my head around it. Ill work with this info and see what i can come up with over the next day or two and i appreciate your help. Ill update this thread as i go on:)

                      • 8. Re: Advice on setting up a custom service request
                        ITSMMVPGroup

                        Think of it this way... it would either take some manual interaction or a whole lot of processing to go out and check if each person is a manager of someone else in order to set the flag, because the direction of the data relationship is setup the other way around.

                         

                        So instead we use the constraints of your original problem:

                        • You are looking for instances where a manager ({Request/CreatedBy}) is generating a request for someone ({RaiseUser}) who works underneath them.
                        • You can verify this by comparing the attributes {RaiseUser/LineManager}  (etc.)  to {Request/CreatedBy} during the beginning of your process.

                         

                         

                         

                        -Brian

                        • 9. Re: Advice on setting up a custom service request
                          Apprentice

                          Im not dismissing your advice here, i just dont think im technically capable of understanding service desk enough to be able to implement your way of attacking this problem, so please dont take offense at my inability.

                           

                          A simpler way, for me at least, to attack this problem is that i can create a new request template (i know how to do that much ) and name it 'supervisor request', using the same process as 'generic request', at the top of this process i can add a decision, this decision will check

                           

                          'is createdby a supervisor' (because all of our managers are automatically assigned a supervisor role in servicedesk when the AD import runs), if the answer to this decision is yes, then my process skips the approval steps of the process. If the answer is no it simply continues as normal. The advantage to this for me is that in the future when leadership comes up with other catalogue items that managers no longer want to have to have approve, i can simply change the service catalogue template.

                           

                          My question is, should the decision be a standard or a calculation, and im having trouble finding the attribute i need which stores the users supervisor role status.

                          • 10. Re: Advice on setting up a custom service request
                            ITSMMVPGroup

                              no offense taken... the best part is, you've taken us full-circle (almost).  That "Supervisor" role you mention serves the same purpose as the boolean flag we talked about adding earlier (i.e., 'IsManager'), it's a way to identify them.  So the hard work is already done.

                             

                            I don't know if a template is the way to go though, I would just add the decision into your generic request process.  I believe that More Options == More Confusion, especially as one advances up the chain of command.  I think that higher-ups would rather have one request option to use than be presented with many to choose from.

                             

                            For the condition, you would need to use a calculation.  A standard condition won't let you drill down far enough to check the Roles of the CreatedBy user... you can check an attribute of a collection (Tasks[]/Status), but you can't check an attribute of a collection ON an attribute (CreatedBy/Roles[]/Title).

                             

                            Here's the condition:

                            Ex_IsSupervisor.png

                             

                             

                            For the calculation itself:

                             

                            import System

                            static def GetAttributeValue(Request):

                                 Value = false

                                 for item in Request.CreationUser.UserRoles:

                                      if item.title == "Supervisor":

                                           Value = true

                            return Value

                             

                             

                             

                             

                            -Brian (don't include me in your calculation)

                            1 of 1 people found this helpful
                            • 11. Re: Advice on setting up a custom service request
                              Apprentice

                              Im sorry i had my terminology mixed up request template and request lifecycle.

                               

                               

                              "Thanks for all your help ! Im certainly learning little by little. The only problem i forsee if i make the change to the generic service request is that wont it then auto approve any and all service requests put in by a supervisor ? I dont want them to be able to auto approve a new laptop for example, or a new version of Acrobat. This auto approval step so far only pertains to auto approving Internet Access, which is why i have to have some seperation and the ability to pick and choose what can be auto approved by changing the LIFECYCLE that the catalogue item uses. It doesnt increase the number of catalogue items, it just changes that LIFECYCLE for a particular item."

                              • 12. Re: Advice on setting up a custom service request
                                ITSMMVPGroup

                                No problem, and the separate lifecycles should work too.  As an alternative method, you could also add a boolean flag to your Request object "AllowSelfApproval", and just add a check for it into the condition calc for Supervisor.  Then you could use a generic process again and just set that value (AllowSelfApproval) within your Template for each request type.

                                 

                                One other question, do you want them to (1) be able to self-approve requests they put in for themselves as well, or (2) only self-approve those they put in for their subordinates?  If (2) then the earlier calc with the three "if" statements might be more appropriate, as a Supervisor wouldn't be listed as his/her own manager and it would prevent self-approving his own request.

                                 

                                 

                                 

                                -Brian

                                • 13. Re: Advice on setting up a custom service request
                                  Apprentice

                                  Brian,

                                   

                                  I just got around to testing and im getting an XML error. I had opened a ticket here not knowing it was related.

                                   

                                  http://community.landesk.com/support/message/91973#91973

                                   

                                  I typed the calculation as you had put. What did i do wrong ?

                                   

                                  Thanks,

                                   

                                  Russ.

                                  • 14. Re: Advice on setting up a custom service request
                                    ITSMMVPGroup

                                    Hi Russ,

                                     

                                    Sorry for the frustration, I had written that in the calc editor but never actually used it, well... just because.  It turns out in the "for" loop to need to drill-down one more layer to get to the actual role object to reference its title.  THIS one has been tested, verified, and approved by 4 out of 5 dentists:

                                     

                                    import System

                                    static def GetAttributeValue(Request):

                                         Value = false

                                         for item in Request.CreationUser.UserRoles:

                                              if item.Role.Title == "Supervisor":

                                                   Value = true

                                         return Value

                                     

                                     

                                     

                                    Also, here is a version that you can stick into a calculated string attribute to test on an object that uses Try/Except to catch and display the errors for you... just for testing to see what is getting returned by your calculations:

                                     

                                    import System

                                    static def GetAttributeValue(Request):

                                         try:

                                              Value = "false"

                                              for item in Request.CreationUser.UserRoles:

                                                   if item.Role.Title == "Supervisor":

                                                        Value = "true"

                                              return Value

                                         except e as Exception:

                                              return e.Message

                                     

                                     

                                     

                                     

                                    -Brian

                                    1 2 Previous Next