Automatically allocate Approval basis on end user location

Hi
We have SM 9.50 and upgraded to 9.51

I want SM should automatically assign Approval to end user location basis for service catalog interaction ticket.

For example, end user 'John' having location say 'XYZ' raises service interaction by selecting service catalog item from ESS portal.
And another end user 'Rhian' having location say 'ABC' raises SD from service catalog items via ESS portal.
Now the location 'XYZ' service request managed by SPOC say 'Micheal' and location 'ABC' service request managed by SPOC say 'Ravi' so John requests should goes to to 'Micheal' approval and Rhian request should goes to 'Ravi' approval.

I have created Group 'Approval SR' under approval definition. And added approver 'Micheal' and 'Ravi' under this. Now challenges is what condition i should mention against this approvers so that all users having location 'XYZ' tickets goes for 'Micheal' for an approver and all users having location 'ABC' tickets goes for 'Ravi' for an approver

  • Hi Experts,

    Awaiting for valuable inputs.

     

  • I believe that you need to use location table and make there the field "Manager" .

    And create a script that will use the user location of user to look up in the table location his location and to choose from a field Manager approver.

  • Hi ALARMus ,

    I am looking for query which i can use under 'condition' field under approval definition against approval group/member. But thanks for your suggestion.

    Also no clue from where i can trigger/call the script (to fetch manager) if i mapped manager against each location. Pls guide

     

  • I have implemented a special way to create the list of approvers, so I don't know where they are formed for you . Could you specify a table(and form) in which you specify a condition ?

     

    If this is ApprovalDef table

    1) in field group.name - jscall("Myfunction.getmanager", location in $L.file)

    if it will not work

    2) Using example - "Subscription Approval"  - in group.name field there next record: work.manager in $L.file

    So you need put in field like this your manager by location and use it variable.

  • I have implemented a special way to create the list of approvers, so I don't know where they are formed for you . Could you specify a table(and form) in which you specify a condition ?

     

    If this is ApprovalDef table

    1) in field group.name - jscall("Myfunction.getmanager", location in $L.file)

    if it will not work

    2) Using example - "Subscription Approval"  - in group.name field there next record: work.manager in $L.file

    So you need put in field like this your manager by location and use it variable.

  • I have implemented a special way to create the list of approvers, so I don't know where they are formed for you . Could you specify a table(and form) in which you specify a condition ?

     

    If this is ApprovalDef table

    1) in field group.name - jscall("Myfunction.getmanager", location in $L.file)

    if it will not work

    2) Using example - "Subscription Approval"  - in group.name field there next record: work.manager in $L.file

    So you need put in field like this your manager by location and use it variable.

  • Similar enhancement we have before in lower version 9.x. Please check this option if it would help.

    1. We have location field, from user under Contact table. Is this the location you are referring to? If Yes.

    2. Defined a variable under FC> login.DEFAULT. This will query the location field of a user on his Contact table everytime they login. You will need to have a FC> Queries ($file1)for Contact table. Then a Calculation that will assign the location field to a defined variable (ex. $lo.userlocation=location in $file)

    3. Use this variable to the approval condition

    Approver 1 > If $lo.userlocation= Loc1

    Approver 2 > If $lo.userlocation= Loc2

     

  • Thanks  ALARMus,

    Im referring 'ApprovalDef' table. However both options which you suggested will not work...

    1) in field group.name - jscall("Myfunction.getmanager", location in $L.file)

    The locationwise approval is not manager of end user here so i guess jscall which you mentioned will fetch logged in user manager which will get from LDAP. In my case, i want to fetch logged in user 'Location' (getting from LDAP already) when he/she is raising service catalog request from ESS portal. Based on his/her location, only that location approval group should get assigned.

    2) Using example - "Subscription Approval"  - in group.name field there next record: work.manager in $L.file. So you need put in field like this your manager by location and use it variable.

    Currently im not using 'subscription' option in SM for service catalog/CI. So this will not work in my setup. 

    Kindly suggest further.

     

     

  • Hi -joven- ,

    Thanks. I followed steps suggested by you. however while adding condition under approval definition was getting below error:

    Validation failed (se.base. method,update.record)

    Please refer attached screenshots of each steps performed and let me know if condition/step mentioned need any modification.

  • Hi Joven,

    The query mentioned under condition was not working, i.e. Approval based on location is not getting set/mapped.

    $lo.userlocation=location in $L.file

    Pls suggest