Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

ServiceNow/K15APIDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServiceNow K15 API Demo

This project contains source code for the ServiceNow K15 breakout session titled Enabling Web API Integrations with ServiceNow.

Speakers

Special thanks to Grant Hulbert (@VoiceOfSoftware) for assisting in the demo preparation.

Architecture

Here is an overview of the demo architecture. Demo architecture diagram

Components

The demo consists of:


ServiceNow instance

ServiceNow logo

The ServiceNow instance is configured with one table to store participant phone numbers, and two Import Set web services to handle registering participants and triggering the bridge.

Component Table Description
Session Participants u_session_attendees Stores the registered phone numbers
Session Participants Import Set Web Service u_attendee_phone_number_imp_ws Registers a phone number
Urgent Incident Conf Trigger Import Set Web Service u_urgent_incident_conf_trigger Triggers opening a bridge from a transform script

The update set with these components can be found here.

Additionally, Notify API properties are configured as: NotifyNow configuration


Twilio configuration

Twilio logo

Twilio is configured to forward SMS messages received at the register phone number (312-313-1772) to the registration endpoint served by the Node.js app.

Twilio registration configuration

Additionally a separate Twilio number (312-488-1677) is configured to act as the bridge line -- this is the line from which calls and texts about the bridge are sent to participants.

Twilio bridge configuration


Node.js web application

Node.js logo

The Node.js application source code can be found here.

This app can be hosted on any server capable of running Node.js applications (for this demo we used a VM provided by Digital Ocean).

The app consists of a /register endpoint which proxies the incoming message from Twilio to ServiceNow using the Import Set API.

It also contains an index page to display the registration info and current count of participants, which uses the ServiceNow Aggregate API to retrieve the count from the u_session_attendees table.

Registration page


iOS applications

iOS logo

The iOS apps consist of an iPhone app and a Watch app which retrieve the most recent P1 incidents, and can trigger a bridge for the incidents.

They use the ServiceNow Table API to retrieve the P1 incidents, and the Import Set API to trigger opening a bridge for an incident. The Import Set Transform Map is configured with a transform script that uses ServiceNow's Notify API to open a bridge through Twilio.

The source code for the apps can be found here.