Cases
By default, every OpenNMS ticket creates an incident. Some instances track customer work in Customer Service Management (CSM) cases. There, the plugin can create a case for some tickets and an incident for the others.
The case filter is a JEXL condition with the same context as the ticket filter.
A ticket whose alarm matches creates a case in the sn_customerservice_case table.
All other tickets create an incident.
The requisition of the node is the usual selector:
alarm.node.foreignSource == 'customer-a'
To create a case for every ticket, set the filter to true.
The ServiceNow instance needs:
-
The Customer Service Management application, plugin
com.sn_customerservice. See ServiceNow Instance Setup. -
The role
sn_customerservice_agentfor the integration user. The plugin checks the read access to the case table when you save with a case filter and on page load. If the access is denied, the save keeps the filter and shows a warning. Give the user the role in ServiceNow, no new save is necessary.
Case Fields
A case gets the same fields as an incident, except caller_id, which the case table does not have.
The case field mappings have the same format as the incident field mappings and apply to cases only.
The default mapping is one rule that sets contact_type to proactive.
That is the stock CSM choice with the label Alert, for a case that monitoring opens.
The category keeps the table default, Issue.
Use the mappings to set account, contact, product, asset or custom columns:
[{"fields": {"account": "ACME Corp", "u_requisition": "${alarm.node.foreignSource}"}}]
A default CSM instance creates a case with a short description only. Account, contact and product are optional.
An incident gets its priority from impact and urgency. A case does not, so the plugin sets the priority of a case from the alarm severity:
| Alarm severity | Case priority |
|---|---|
CRITICAL |
1 (Critical) |
MAJOR |
2 (High) |
MINOR |
3 (Moderate) |
WARNING |
4 (Low) |
Other |
4 (Low) |
A rule in the case field mappings can replace priority.
Case States
| Case state | Ticket state |
|---|---|
1 (New), 10 (Open), 18 (Awaiting Info) |
OPEN |
6 (Resolved), 3 (Closed) |
CLOSED |
7 (Cancelled) |
CANCELLED |
When the plugin resolves a case, it sends the state Resolved and close notes.
The case resolution code is optional. A default instance resolves a case without one.
The default is Solved by Customer, a stock CSM resolution code. Select another one from the list in the case resolution code setting, or none. The list shows the resolution codes of the connected instance.
ServiceNow drops a resolution code that is not a choice of the instance without an error. The plugin reports such a code on save and on page load.
Links and Existing Tickets
OpenNMS stores only the sys_id of a ServiceNow record.
The alarm ticket link uses task.do, so it opens an incident or a case in the form of its own table.
This also holds after you clear the case filter.
For a read, an update or a close, the plugin reads the table of the record once from the task table and keeps it.
Tickets created before cases were enabled continue to work as incidents.