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 case table, see 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_agent for 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 Table

By default, the plugin creates cases in the base case table, sn_customerservice_case. Customer Service Management also supports case types. A case type is a child table of the case table, for example a support case table. A record of a case type appears only in the list of that type. To create cases of a type, enter the name of its table in the case table setting, for example sn_customerservice_support_case. The setting is editable when a case filter is set. The table must extend sn_customerservice_case and keep its states and its role. On save, the plugin checks that the table extends sn_customerservice_case, when the integration user can read the table definitions. The plugin checks the read access to the table on save and on page load, and reads the resolution codes from it.

A change of the setting affects new cases only. OpenNMS stores only the sys_id of a record. Before an update, the plugin reads the record from the task table, the parent of incidents and cases, to find the table that holds it. A record in a child table of the case table is a case, a record in a child table of the incident table is an incident. A case in another table keeps working.

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.

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.