Skip to Content
Technical Articles

OpenConnectors-ServiceNow Integration – Part 2

Introduction:

This is the second part of Open Connector Service-now Integration. In the  First Part we discussed on :

  1. How to create a Service-now instance.
  2. How to configure  Service Now OAuth Open Connector.

In this part, we will see, how to utilize the Connector that we created in the first part in Cloud platform Integration to create Incident whenever there is a failure in the Integration Process. Lets Begin !!

Creation of IFlow:

Step 1: Create an IFlow in your package with sender as HTTP Connector and receiver as SFTP

Note: I’m using HTTP and SFTP for the convenience of testing

Step 2: Insert a XML Validator in between Start and End to validate the incoming payload.

Step 3: If the validation is successful, then it will be passed to the SFTP Server. But if there is a failure in validation, then we need to raise an incident in Service-now. Add an exception Sub-process to the Integration Process.

Step 4: In the content Modifier (Creation Of Incident), Navigate to the Message Body Tab, keep the Type as Expression. Maintain the below code as Body (Values maintained are for testing purpose)

{
"active": true,
"activity_due": "2019-04-11T10:42:45.943Z",
"assigned_to": "Beth Anglin",
"assignment_group": "Database",
"business_duration": "2019-04-11T10:42:45.943Z",
"business_service": "Blackberry",
"calendar_duration": "2019-04-11T10:42:45.943Z",
"caller_id": "Allyson Gillispie",
"category": "Database",
"contact_type": "Phone",
"description": "Invalid Structure in the payload",
"due_date": "2019-04-11T10:42:45.943Z",
"escalation": 0,
"expected_start": "2019-04-11T10:42:45.943Z",
"impact": "3-Low",
"knowledge": true,
"made_sla": true,
"opened_at": "2019-04-11T10:42:45.943Z",
"opened_by": "john snow",
"priority": "5-Planning",
"severity": "High",
"short_description": "Validation Failed",
"state": "In Progress",
"sys_mod_count": 0,
"time_worked": "2019-04-11T10:42:45.943Z",
"urgency": "3-Low",
"work_end": "2019-04-11T10:42:45.943Z",
"work_start": "2019-04-11T10:42:45.943Z"
}

Step 5: Place another receiver (ServiceNow) and connect the End1 and ServiceNow Receiver with Open Connector Adapter.

Step 6: In Connection Tab of OpenConnector adapter, do the configuration as shown below.

The Important query arises is how to configure the Credential Name for OpenConnectors.

Step 7: Open Monitor tab in CPI. Monitor—-> Manage Security Material —-> Add —–> User Credentials. and configure as shown below. Finally deploy the Credentials.

How do we get the User Organization and Element details?

we can get these details from Open Connectors. Log on to Open connectors portal, go to your API docs, and you can get the details. The authorization token contains, User Organization and Element. (Exclude the comma and space while entering the values in user credentials)

Step 8: Now deploy the Entire iflow and trigger the message. For test purpose, I’m using Post man tool. Utilize the End Point URL IFlow.

Step 9: Open Postman tool, Choose the Method as Post (9A), Enter the End Point URL from IFlow(9B), Format as XML (9C) and Payload (9D).

Step 10: Once triggered, the message will fail in the XML Validation step in IFlow and exception sub process will trigger the message to OpenConnectors.

Step 11: A new Incident can be seen in Service-now.

 

Conclusion:

With this approach, now we can automate the incident creation based on failures. I just made a simple blog to sparkle the idea of creating Incidents in service now. We can extend this IFlow, by introducing message mappings, groovy scripts etc., to make the incidents looks more precise and accurate in the Service Now. For example, we can use a Value Mappings to assign the Incident to a particular team. Any new Ideas to leverage the concept is most welcome 🙂

Happy Learning.

Regards,

Sidharth VR

 

2 Comments
You must be Logged on to comment or reply to a post.
  • Hi Sidharth,

    I need to understand few things as below

    1. Can we integrate ServiceNow with Successfactors to sync to-do lists in both systems using Open Connectors.
    2. Is api available in ServiceNow for it for To-do list.How we can get the list of apis supported in ServiceNow for integration for query and post methods.
    3. Is open Connector is available for free in all CPI-cockpit edition or only on enterprise edition.Do we need to purchase it separately to use it with SAP CPI.

    Regards

    DJ