5 Working with Ticketing Templates

This chapter provides details on the default ticketing templates shipped along with the ServiceNow connector. The ticketing templates specify the mappings between Enterprise Manager ticket attributes and ServiceNow incident attributes.

This chapter covers the following topics:

Default Ticketing Templates

When a connector instance is created in Enterprise Manager, all associated templates are available for ticket create/update operations. This section describes the default mappings between the Enterprise Manager ticket data fields and the ServiceNow incident data fields.

The ticketing templates XML Style Sheet (XSL) files contains mappings between the two systems. These files are located in the Self Update archive. To extract the installation file, perform the steps described in the Exporting a Template File section.

There are three default ServiceNow templates, as described in Table 5-1:

Table 5-1 Default ServiceNow Templates

XSL File Name Enterprise Manager User Interface Description Required ServiceNow User Permissions (Roles)
ServiceNow_CreateAndUpdate_Default.xsl

ServiceNow Create and Update

  • Creates new incident in ServiceNow

  • Updates existing incident in ServiceNow

  • itil

  • soap_create

  • soap_update

  • soap_query

ServiceNow_CreateAndUpdate_AutoClose.xsl

ServiceNow Create, Update, and Close

  • Creates new incident in ServiceNow

  • Updates existing incident in ServiceNow

  • Closes incident in ServiceNow (if created using a rule, not manually)

  • Reopens incident in ServiceNow

  • itil

  • soap_create

  • soap_update

  • soap_query

  • admin

ServiceNow_CreateAndUpdate_AutoResolve.xsl

ServiceNow Create, Update, and Resolve

  • Creates new incident in ServiceNow

  • Updates existing incident in ServiceNow

  • Resolves incident in ServiceNow (if created using a rule, not manually)

  • Reopens incident in ServiceNow

  • itil

  • soap_create

  • soap_update

  • soap_query

Note:

For more information on ServiceNow system roles, see the Base System Roles section of the ServiceNow Product Documentation Wiki:

https://docs.servicenow.com/bundle/sandiego-platform-administration/page/administer/roles/reference/r_BaseSystemRoles.html

Standard Fields Mapping

Table 5-2 shows the standard fields provided by Enterprise Manager and how they are mapped to equivalent fields within ServiceNow:

Table 5-2 Enterprise Manager-to-ServiceNow Standard Fields Mapping

Enterprise Manager UI Field Enterprise Manager Backend Field ServiceNow Field Notes

Priority

SystemAttributes/Priority

Priority

See Table 5-3

Severity

SystemAttributes/SeverityCode

Priority

See Table 5-3

Resolution State

SystemAttributes/ResolutionState

State

See Table 5-5

Summary

SystemAttributes/Summary

Short description

Event Class

EMEvent/SystemAttributes/EventClass

Incident Details > Event Type

Displayed if defined for Enterprise Manager ticket

Category

SystemAttributes/Category

Incident Details > Category

Category of the Enterprise Manager Event

Escalation

SystemAttributes/EscalationLevel

Incident Details > Escalation Level

Owner

SystemAttributes/Owner

Incident Details > Owner

Acknowledge

SystemAttributes/Acknowledge

Incident Details > Acknowledged

Target Name

SystemAttributes/SourceInfo/TargetInfo/TargetName

Source Details > Target

Target Type

SystemAttributes/SourceInfo/TargetInfo/TargetTypeLabel

Source Details > Type

Links directly to the Enterprise Manager target

Owner

SystemAttributes/SourceInfo/SourceObjInfo/ObjOwner

Source Details > Owner

Target Host

.../TargetProperty/Name=Target_Host -> Value

Source Details > Target_Host

Displayed if defined for Enterprise Manager target

Comment

.../TargetProperty/Name=Comment -> Value

Source Details > Comment

Displayed if defined for Enterprise Manager target

Contact

.../TargetProperty/Name=Contact -> Value

Source Details > Contact

Displayed if defined for Enterprise Manager target

Cost Center

.../TargetProperty/Name=Cost Center -> Value

Source Details > Cost Center

Displayed if defined for Enterprise Manager target

Department

.../TargetProperty/Name=Department -> Value

Source Details > Department

Displayed if defined for Enterprise Manager target

Lifecycle Status

.../TargetProperty/Name=Lifecycle Status -> Value

Source Details > Lifecycle Status

Displayed if defined for Enterprise Manager target

Line of Business

.../TargetProperty/Name=Line of Business -> Value

Source Details > Line of Business

Displayed if defined for Enterprise Manager target

Location

.../TargetProperty/Name=Location -> Value

Source Details > Target Location

Displayed if defined for Enterprise Manager target

Operating System

.../TargetProperty/Name=Operating System -> Value

Source Details > Operating System

Displayed if defined for Enterprise Manager target

Platform

.../TargetProperty/Name=Platform -> Value

Source Details > Platform

Displayed if defined for Enterprise Manager target

Target Version

.../TargetProperty/Name=Target Version -> Value

Source Details > Target Version

Displayed if defined for Enterprise Manager target

Rule Name

NotificationRuleName

Source Details > Rule Name

Displayed if Incident was created by a Rule

Rule Owner

NotificationRuleOwner

Source Details > Rule Owner

Displayed if Incident was created by a Rule

Priority and Severity Mapping

Table 5-3 and Table 5-4 show the mapping between the Enterprise Manager ticket priority/severity values and how the corresponding values are set in ServiceNow based on those incidents.

Note:

ServiceNow Incident Priority is calculated from Impact and Priority as described in the Incident Management section of the ServiceNow Product Documentation Wiki:

https://docs.servicenow.com/en-US/bundle/sandiego-it-service-management/page/product/incident-management/task/def-prio-lookup-rules.html

Table 5-3 Enterprise Manager-to-ServiceNow Priority Mapping

Enterprise Manager Priority ServiceNow Impact ServiceNow Urgency ServiceNow Priority

Urgent

1

1

1

Very High

1

2

2

High

2

2

3

Medium

2

3

4

Low

3

3

5

Note:

The Enterprise Manager priority is used whenever it is set (that is, overrides severity code setting). Otherwise, the Enterprise Manager severity code is used.

Table 5-4 Enterprise Manager-to-ServiceNow Severity Mapping

Enterprise Manager Severity Code ServiceNow Impact ServiceNow Urgency ServiceNow Priority

FATAL

1

1

1

CRITICAL

1

2

2

WARNING

2

2

3

ADVISORY

2

3

4

Anything else but CLEAR

3

3

5

Note:

ServiceNow Incident is Closed/Resolved when the Enterprise Manager severity code becomes CLEAR.

State Mapping

As shown in Table 5-5, the mapping between states within Oracle Enterprise Manager and ServiceNow are quite similar:

Table 5-5 Enterprise Manager-to-ServiceNow State Mapping

Enterprise Manager Resolution State ServiceNow State

New

New

Resolved

Resolved

Closed

Closed

Any Other State

Active

Customizable Fields

Table 5-6 shows fields that exist in ServiceNow that are not provided by Enterprise Manager, but can be customized as needed:

Table 5-6 Customizable ServiceNow Fields

ServiceNow Field Default Value Notes

Caller

sample.user

Requires ServiceNow configuration

Location

Sample Location

Requires ServiceNow configuration

Category

EM Incident

Requires ServiceNow configuration

Assignment group

EMSampleGroup

Requires ServiceNow configuration

Assigned to

sample.user

Requires ServiceNow configuration

Close code

Solved (Work Around)

Closed by

sample.user

Requires ServiceNow configuration

Close notes

Enterprise Manager Resolution

Customizing an Existing Template

Although default mappings are sufficient for most implementations, if the out-of-box ticketing templates do not satisfy your requirements, you can modify them.

Oracle recommends that only users with advanced knowledge of XSLT make complex changes. If necessary, you can revert the templates to the original.

To edit an existing ticketing template:

  1. Select the connector instance and go to the Configure Management Connector page.
  2. Select the Template tab.
  3. Select the desired template and click Edit.
  4. Edit the Description and Template Contents fields as needed, then click Save.

The ticket template is automatically registered. Saving the registered template updates it in the repository.

Creating a New Custom Template

If you want to create a custom template, you need to install a new template before it is recognized in Enterprise Manager.

To create a new a template, Oracle recommends that you use one of the existing templates as the baseline. Copy this ticket template to a file, modify, test and then register the file as a new ticketing template.

For each new custom template, run the following emctl register_template connector command as a user with execute privilege on emctl and the ability to read the template:

$ORACLE_HOME/bin/emctl register_template connector -t <template.xsl> -repos_pwd <reposPassword> -cname <connectorName> -iname <internalName> -tname <templateName> -ttype 2 [-d <description>]

Where:

  • <template.xsl> is the full path name of the template file.

  • <reposPassword> is the Enterprise Manager root (SYSMAN) password.

  • <connectorName> is the name of the connector instance installed in Configuring a Connector Instance.

  • <internalName> is the internal name to use for the template.

  • <templateName> is the name to display for the template.

  • <description> is the description of the template.

For example, the following command adds a new outbound template (newTemplate.xsl) for the connector instance:

ctl register_template connector -t /home/oracle/custom_templates/newTemplate.xsl -repos_pwd sysmanpass -cname "ServiceNow Connector Instance" -iname "newTemplate" -tname "New Template" -ttype 2 -d "Demo template"

Exporting a Template File

Out-of-the-box ServiceNow customized template files are included in the Self Update archive that was installed in Installing the ServiceNow Ticketing Connector.

To extract a template file to use as a base for customization:

  1. Export the installation files to a managed host machine or to your workstation:

  2. Open a command window on the host where the export file was copied and navigate to the directory where the file was copied.

  3. Extract the ServiceNow template file from the .zip file using the following command:

    unzip *.zip archives/service_now_connector.jar
  4. Extract the templates from the jar file using the following command:

    $JAVA_HOME/bin/jar xf archives/*.jar templates

Exporting Installation Files to a Managed Host

To export to a managed host machine, perform the following steps::
  1. From the Setup menu, select Extensibility, then select Self Update.
  2. On the Self Update page, select Management Connector to display a list of all available connectors.
  3. Click the appropriate ServiceNow connector name, then select Export to->Managed Host from the Actions list. A pop-up window similar to Figure 5-1 will be displayed:

    Figure 5-1 Export Update to a Managed Host


    Export Update to a Managed Host
  4. Enter the name of the export file or accept the default name.
  5. Click on the search icon for the Host field. A pop-up window similar to Figure 5-2 is displayed.

    Figure 5-2 Search Hosts


    Search Hosts
  6. Select a host and click Select. You might need to enter a search string to narrow the results.
  7. On the Export Update to a Managed Host window, click the search icon for the Location field. A pop-up similar to Figure 5-3 is displayed:

    Figure 5-3 Search Location


    Search Location
  8. Click Log In. A popup similar to Figure 5-4 is displayed:

    Figure 5-4 Host Credentials


    Host Credentials

    Select existing Preferred or Named credentials or enter a New set of named credentials and click OK.

  9. A pop-up window similar to Figure 5-5 is displayed:

    Figure 5-5 Select Path


    Select Path
  10. Select the path where you want to place the export file and click OK.
  11. The Export Update to a Managed Host window will be displayed with the selections listed. Click Export.

Exporting Installation Files to Your Workstation

To export the installation files to your workstation, perform the following steps:
  1. From the Setup menu, select Extensibility, then select Self Update.
  2. On the Self Update page, select Management Connector and select the appropriate ServiceNow connector name from the list, then select Export to->Your Workstation from the Actions list.
  3. A pop-up window will be displayed that prompts whether to open or save the file. Select Save File and click OK.
  4. A pop-up window may be displayed that allows you to select the location where the file will be saved. Select the location and click Save.

Restoring Templates

After you edit or customize a template, you can restore it to its previous default contents if needed by performing the following steps.

WARNING:

You can restore out-of-box templates that you have may edited or customized to their default values. You cannot restore new templates that you have created (using the emctl register_template command).

  1. From the Setup menu, select Extensibility, and then select Management Connectors.
  2. On the Management Connectors page, select the connector instance and go to the Configure Management Connector page.
  3. Select the Template tab.
  4. Select the template and click Restore.
  5. Click Yes in the confirmation page that appears to restore.