ServiceNow Extended Connector

Oomnitza's ServiceNow Mobile Extended Connector allows organizations to pull device information from ServiceNow and populate it in Oomnitza. More info in ServiceNow can be found here: https://www.servicenow.com/ 

ServiceNow

Contents

  1. ServiceNow Extended Connector
  2. ServiceNow API Presets
    1. Get Asset Details Workflow
    2. Post Asset Workflow
    3. Patch Asset Workflow

ServiceNow Extended Connector

Setup

Details on setting up Oomnitza Extended Connectors can be found in Oomnitza's Articles on Connector Setup.

Note: In addition to the standard fields entered during setup, you'll also need your ServiceNow Instance name. This can be found in your ServiceNow URL: <instance>.servicenow.com

mceclip0.png

Authentication

ServiceNow's REST API uses OAuth2.0 authentication. Credentials for ServiceNow should be added to The Oomnitza Vault.

Details on Creating an OAuth2.0 Credential for ServiceNow can be found here: https://oomnitza.zendesk.com/hc/en-us/articles/360058447533#h_01ER003SADV6HXM79SQVP9EP89 

Note: If asked during OAuth2 Setup in Service now, you can use the following as the Redirect URI: https://generic-oauth2-proxy.oomnitza.com/oauth2/redirect_url

Standard Mappings

The following fields can be mapped from ServiceNow using Oomnitza's User Interface. For more information on creating Extended Connector Mappings, please see our article on Mapping Extended Connectors.

  • Asset Tag
  • Assigned Date
  • Assigned To
  • CMDB CI ID
  • Comments
  • Company
  • Cost
  • Cost Center
  • Created
  • Delivery Date
  • Department
  • Depreciated Amount
  • Depreciation
  • Depreciation Date
  • Display Name
  • Disposal Reason
  • Install Status
  • Internal Sys ID
  • Invoice Number
  • Location
  • Managed By
  • Model
  • Model Category
  • Owned By
  • PO Number
  • Purchase Date
  • Resale Price
  • Residual
  • Residual Date
  • Serial Number
  • Stockroom
  • Substatus
  • Support Group
  • Supported By
  • Sys Class Name
  • Vendor
  • Warranty Expiration
  • Work Notes

Custom Mappings

Additional fields may be available through ServiceNow Devices. For details on how to retrieve them, please reach out to support@oomnitza.com or see our article on Mapping Extended Connectors.

ServiceNow API Presets

Oomnitza also offers the ability to retrieve additional Asset Details from ServiceNow using a two API Presets. These allow Oomnitza administrators to set up workflows that retrieve vital asset details in real time, based on updates to assets and other workflow triggers. 

Get Asset Details Workflow

The ServiceNow Get Asset Details Workflow is an Asset workflow that runs on a schedule and captures additional information about assets from ServiceNow's API to help fill out your asset details. 

To utilize this workflow, you must first retrieve Device ID from ServiceNow using the Connector.  

mceclip0.png

Begin Block

For the begin block, the Workflow should be set to run on a schedule, and to run when the ServiceNow Device ID should now be empty. 

API Block

  1. Add an API Block to the Workflow Sandbox.
  2. Edit the API Block, and Apply the ServiceNow CMDB or ServiceNow Custom Hardware preset:
    mceclip3.png
  3. In the URL field, fill your ServiceNow Subdomain in place of the "{{GlobalSetting['ServiceNow.Subdomain']}}" field, and specify the External ID of your ServiceNow Device ID field in the "[[DeviceID:Shorttext]]" field, enclosed in double curly brackets.
    mceclip4.png
    Note: The ServiceNow Subdomain can also be stored in the Global Settings table as ServiceNow.Subdomain. If this is done, then no change needs to be made to the URL.

  4. Navigate to the Authorization Tab, select "OAuth 2.0" as the Type, and select the ServiceNow OAuth 2.0 App that you're using for the connector:
    mceclip5.png
  5. Now, Navigate to the Params Tab. Here, you'll need to specify the location of the ServiceNow CMDB CI ID, enclosed in double brackets.
    mceclip6.png
    Note: The ServiceNow CMDB CI ID can be retrieved from the Customization Page by clicking on the CMDB CI ID field:
    mceclip7.png
  6. Finally, navigate to the Response Tab, and add the fields that you wish to map from ServiceNow:
    {% set rr = response['result'] %}{% if rr %}{% set cc = rr[0] %}{% if cc.get('os') %}{% if cc['os'] is mapping %}{{ cc['os'].get('display_value') }}{% else %}{{ cc['os'] }}{% endif %}{% else %}{{ '' }}{% endif %}{% else %}{{ '' }}{% endif %} 
    Once that's been entered, the response field should correspond to the Operating System.
    mceclip8.png
  7. Once your API Block has been configured, you can connect your splines to the end block, then validate and Save the workflows

Post Asset Workflow

Oomnitza's ServiceNow POST API preset allows for the creation of new devices in ServiceNow using their API. 

mceclip0.png

Begin Block

For the begin block, the Workflow should typically be set to run based on new asset creation from a system other than service now (with other parameters as needed) to create those devices in ServiceNow from Oomnitza. 

API Block

  1. Add an API Block to the Workflow Sandbox.
  2. Edit the API Block, switch to Advanced mode, and Apply the "ServiceNow Table API - POST" preset:
    mceclip1.png
  3. In the URL field, fill your ServiceNow Subdomain in place of the "{{GlobalSetting['ServiceNow.Subdomain']}}" field, and specify the table you wish to update in the "[[TableName:Shorttext]]" field (on the far right of the URL)
    mceclip3.png
    Note: The ServiceNow Subdomain can also be stored in the Global Settings table as ServiceNow.Subdomain. If this is done, then no change needs to be made to the URL.
  4. In the Authorization tab, select the appropriate ServiceNow credentials:
    mceclip7.png
  5. In the Body Tab, enter the fields that you wish to update in proper JSON format, as so:
    mceclip4.png
    The following can also be pasted into the Body field:
    {
    "asset_tag": "{{barcode}}",
    "po_number": "{{po_number}}",
    "owned_by": "{{assigned_to}}",
    "cost_center": "{{department}}",
    "serial_number": "{{serial_number}}",
    "purchase_date": "{{purchase_date}}",
    "comments": "{{notes}}",
    "cost": {{purchase_price}}
    }

5. Finally, map any response values you wish to store back into Oomnitza, the below, for example, captures the display value from the newly created asset. 
mceclip6.png

Patch Asset Workflow

Oomnitza's ServiceNow PATCH API preset allows you to update existing devices in ServiceNow using their API. 

Note: To utilize this workflow, you must first retrieve Device ID from ServiceNow using the Connector.  

mceclip0.png

Begin Block

For the begin block, the Workflow should typically be set to run based on new asset creation from a system other than service now (with other parameters as needed) to create those devices in ServiceNow from Oomnitza. 

API Block

  1. Add an API Block to the Workflow Sandbox.
  2. Edit the API Block, switch to Advanced mode, and Apply the "ServiceNow Table API - PATCH" preset.
  3. In the URL field, fill your ServiceNow Subdomain in place of the "[[GlobalSetting:'ServiceNow.Subdomain']]" field, and specify the table you wish to update in the "[[TableName:Shorttext]]" field (on the far right of the URL), and the "[[SysId:Shorttext]]" 
    mceclip8.png
    Note: The ServiceNow Subdomain can also be stored in the Global Settings table as ServiceNow.Subdomain. If this is done, then no change needs to be made to the URL.
  4. In the Authorization tab, select the appropriate ServiceNow credentials:
    mceclip7.png
  5. In the Body Tab, enter the fields that you wish to update in proper JSON format, referencing the External IDs of the Oomnitza fields you wish to transmit to Service Now in double curly brackets, as so:
    mceclip4.png
    The following can also be pasted into the Body field:
    {
    "asset_tag": "{{barcode}}",
    "po_number": "{{po_number}}",
    "owned_by": "{{assigned_to}}",
    "cost_center": "{{department}}",
    "serial_number": "{{serial_number}}",
    "purchase_date": "{{purchase_date}}",
    "comments": "{{notes}}",
    "cost": {{purchase_price}}
    }
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk