Script for RITM Assignment Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 04:22 AM
Hi, I'm trying to develop a script that will assign the RITM based upon the Requested For users location.
I've tried two scripts below based upon other community posts. Could anyone advise what's incorrect? I'm not even sure if my syntax is correct
or
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 03:36 PM
SteveTurley,
You only need one rule per assignment group.
For just one Assignment Rule you could add a sys_user_group reference field to the location table...add the assignment group to the location record then you can lookup the group through the user's location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 09:05 AM - edited 01-04-2023 09:06 AM
Mmm I see, well yes, in this case it would one item per scenario. But how about this:
- Create a Decision Table in Decision Builder for your different scenarios, where the input is a Reference to the Location table
- Add this as condition
- Create a Result column that will be a Reference to the Group table
- So you will have a row each scenario like this
- Save your decision table, then open Flow Designer and create a new Flow, with Service Catalog Trigger
- In Flow Logic, select 'Make a decision' and choose your decision table. It will then ask for the input you defined there (Location), so map the requested for user's location to that field
- You will now see a branch for each row in your decision table, but don't worry about those. Continue your flow in the main path, and add an 'Update Record' action, map the Requested Item to it from the trigger, choose the Assignment Group field, and map the 'Result Record' of the 'Make a decision' step as the value (remember, this is is a Group reference as the result column in your decision table).
- Save and Activate the Flow (or maybe test first), and remember to deactivate any conflicting Assignment rules.
- Since the Flow has a Service Catalog trigger, you will have to map it the Catalog Items and/or Record producers of your choice. If they already have flows mapped that do other stuff, then you can crate all of the above in a Subflow instead of a Flow, and create an Input for the Subflow which will be "Reference.Requested Item"
This way, you will only need t maintain your decision table in the future.