Automatically generate incidents in ServiceNow when a backup job or data collection fails
Bocada Cloud has integrated with ServiceNow using their published REST API to automatically generate incidents when a backup job and/or data collection monitored by Bocada Cloud fails.
To configure a connection to ServiceNow, follow the steps below.
1. Set up a ServiceNow User
Create a user account within your ServiceNow instance with the following characteristics and credentials*. This account should not be used to manually generate tickets; instead, it should be used exclusively by the Bocada Cloud application.
- Itil – The Itil role allows the user to get full read access to the incidents table and populate certain fields within it.
- SOAP – The SOAP role enables the user to query the sys_users table which is required for the integration to function.
- Personalize – The Personalize role allows the user to get full read access to the sys_choice table to get the catalogs for: states and resolution codes, both values and labels.
- csm_ws_integration – You need this role only if you are planning to use sn_customerservice_case instead of incident. Here is the link with the ServiceNow documentation related to it.
- User time zone to GMT – In the user profile in ServiceNow, set the time zone to GMT.
* Note: It is possible that some ServiceNow environments will have different security settings for which additional roles or permissions may be required. Also, the Personalize role will automatically inherit the Delete permission which can be removed after the role is added if desired.
After adding the Itil, SOAP and Personalize roles, you will see some inherited or dependent roles added by ServiceNow. Your user roles in ServiceNow should look similar to this screenshot:
2. If your organization requires oAuth 2.0 authentication for ServiceNow integration, create a Client ID and Client Secret.
Refer to this ServiceNow document to create the Client ID and Client Secret.
Here is an example configuration:
After you click Submit, you will be taken to a list of Application Registries in ServiceNow. Click on your new Bocada Cloud registry to go back to the previous screen with the Client Secret. Copy your Client ID, and then click on the lock icon to view and copy your new Client Secret.
3. In Bocada Cloud, Add a connection to ServiceNow
- In the Bocada Cloud left navigation menu, select Administration > Ticketing Integrations > Add
- Click the ServiceNow Service Desk tile
- Display Name field: enter a name for the connection to ServiceNow which will be displayed in Bocada Cloud. You can name it whatever you like; we recommend it references the “friendly name” you use to refer to the ServiceNow instance.
- Instance Name field: enter the name of your ServiceNow instance from the ServiceNow Service Desk application.
- Next, select the authentication method for Bocada Cloud to access your ServiceNow instance, either Basic Auth or oAuth 2.0.
- Basic Auth: enter the credentials (username and password) for the ServiceNow user account you created in Step 1 of this article above.
- oAuth 2.0:
- If you completed Step 2 of this article above because your ServiceNow instance requires an OAuth application endpoint, click the oAuth 2.0 toggle to "on." Otherwise, leave it off to use Basic Auth.
- Enter the ServiceNow Client ID
- Enter the ServiceNow Client Secret key
4. Verify Connection
Click the Verify connection and create a sample ticket button to verify that the communication is working between Bocada Cloud and your ServiceNow instance. If successful, you will see a confirmation message and test ticket number. Look in ServiceNow to verify the incident has been created, which will look similar to this screenshot:
If you receive an error message after trying to verify the connection, review the data you entered on the connection details page to make sure it is correct. If you are still experiencing issues, create a support ticket in Bocada Cloud to get additional help.
5. Set up and Save a Ticket Trigger
After you verified that the connection between Bocada Cloud and ServiceNow is working, create a trigger to automatically generate an incident when a backup job or data collection fails.
- Click the Set up a Ticket Trigger button on the confirmation page. Or, on the left navigation menu, select Administration > Ticketing Integrations > List and click the Add Ticket Trigger icon for the ServiceNow integration you just set up.
- Trigger Name - create a name for this ticket trigger which will display in Bocada Cloud associated with the connection to your ServiceNow instance. You can create multiple triggers for the same ServiceNow connection; therefore, enter a name that will describe the type of trigger you are setting up (e.g. Backup job failure incidents).
- Parameters: Organizations - select the Organization(s) this ticket trigger will be set up for which identifies the list of connections to backup applications to choose from.
- Parameters: Connections - choose whether the ticket trigger will apply to all or only specific connections to your backup applications.
- Trigger: Type - select whether this ticket trigger will be generated based on a Data Collection Failure or a Backup Job failure. Note: you can set up multiple ticket triggers for each connection to ServiceNow. Once you create a trigger for one type of failure, you can add another trigger for a different type of failure.
- Trigger: # - select how many consecutive attempts before the incident is generated (e.g. a backup job fails 3 consecutive times and then an incident is generated in ServiceNow).
- Status Fields Assignments - optionally, when the incident is created in ServiceNow, you can choose to auto-populate other static data fields in the incident with specific values. For example, you can select the Assigned To field and auto-populate a person's name so the incident is automatically assigned to them.
- Note: the static data field value you enter in Bocada Cloud must match exactly what is in your ServiceNow incident screen. If you choose to automatically assign an incident to a person, their name needs to be an exact match (Jane Doe -- not Jane or Doe or J Doe) in order for the static field to be populated correctly.
- Ticket Creation Failure Notification - optionally, you can choose to receive an email notification if the creation of a ServiceNow incident fails. If you select this option, enter email address(es) of the recipients of the notification.
- Save the trigger - click the Save button to save the ticket trigger. You will need to save it before you can create a test ticket. Once saved, the trigger will appear on the Administration > Ticketing Integrations > List page, under the ServiceNow connection. Click the down arrow to display the list of ticket triggers as in the screen shot below.
- Create Test Ticket - once you have saved the ticket trigger, you can test it to make sure it's functioning correctly. Edit the trigger by clicking the pencil icon (as seen in the first screen shot below). Then click the Create Test Ticket button near the bottom of the panel to check that the connection and incident creation process is working as intended (second screen shot below).