We are implementing an auto-ticketing system, where UIM alarms will create tickets in Service Now.
We need the "assignment group" to depend on the alarm type so that different alarm types are assigned to different groups.
How can we achieve this? The assignment group in the probe UI only has 1 Default Group Name.
Is it possible to assign groups dynamically?
UIM 20.4.x
SDGTW 2.10 and later
Guidance
Follow the steps below to have SDGTW assign groups dynamically.
1) set up a nas pre-processing Lua script to update an alarm field to the desired service desk group ID. In this example, we will use the custom_4 alarm field.
event.custom_4 = "<name_of_group>"
return event
2) In the 'Field Mappings' section of your ServiceNow connection profile you should not be using the mapping for the assignment_group field.
3) The Group Assignment section that appears immediately below this section is to be used for group assignment mapping.
4) You must select the "Enable Group Assignment" option in the Group Assignment section, then for the Default Group Name you would enter $custom_4
5) You must also delete your current assignment_group mapping from the Field Mappings section of the ServiceNow connection profile.
6) Click Apply and restart the probe
Once you make these changes, you should start to see that the assignment_group field in the incidents created in ServiceNow will reflect the value of your custom_4 fields.
Alternative Approach:
If the above configuration is set up and working properly, as long as at the moment of the ticket creation (for example triggered by the assignment of an alarm to a defined user) the custom_4 field contains a group, the ticket will be created under the defined group.
In the below Scenario the customer does not want to set all alarms programmatically using a pre-processing rule but he wants to only pick up specific alarms and "assing a group" and then create a ticket in SNOW by assigning the alarm to the defined user as usual.
this can be achived creating a new script for a different approach that will be executed on an Auto-operator rather than the one proposed in the resolution of this case.
a) create a LUA script as follows:
--Table Dumper - Used in table diagnostics
function tdump(t)
local function dmp(t, l, k)
if type(t) == "table" then
print(string.format("%s%s:", string.rep(" ", l*2), tostring(k)))
for k, v in pairs(t) do
dmp(v, l+1, k )
end
else
print(string.format("%s%s:%s", string.rep(" ", l*2), tostring(k), tostring(t)))
end
end
dmp(t, 1, "root")
end
--End Table dumper code
a = alarm.get ()
a.custom_4 = "<group_name>"
alarm.set(a)
tdump(a)
Notes:
- Replace <group_name> with the name of the group leaving the double quotes
b) Create an Auto-Operator profile to execute that script in intervals if alarms are assigned to a specific use
c) now assign an alarm to that specific user.
c) once the field is filled with the group, then the customer can assign the alarm now to the service now user which will in turn create a ticket in SNOW with the group filled in the step before.