Integrating ServiceNow and Visual Studio Team Services using Stamplay
Creating Bugs in Visual Studio Team Services based on incidents getting reported in ServiceNow using Stamplay as the integration platform.
In this article, I will walk you through how I managed to setup a timer job in Stamplay which periodically check for incidents which haven’t been “seen” before and “emits” an event to Stamplay in the form of inserting an object, which in turns triggers a flow that creates a bug in Visual Studio Team Services, post to a channel in Microsoft Teams, and depended on the severity of the incident text relevant stakeholders.
My company use ServiceNow for incidents management, and a lot of contractors who haven’t got my company’s desktop computers as their primary tool. So they struggle with knowing when to look into ServiceNow. Beside that, many of the contractors do not have access to ServiceNow as licenses are costly, so they need to have a internal guy mail them details.
Solution — VSTS Bug creation and text notifications
It was far from a trivial job, but I think that I have managed to come up with a solution which balances the components used between what requires programming skills and what doesn’t.
Find all active incidents in ServiceNow which are related to XXXX and ensure that a corresponding bug is created in Visual Studio Team Services, and it the bug of a high severity, then send a text message to relevant stakeholders.
Reacting to a new incidents
I prefer to create an object in Stamplay to define the properties require in a given scenario, in this case the object “Incidents for 3N_CB” was created.
Triggering the trigger
By creating a new object in Stamplay
As this is an automated process, we need something to trigger it. This is where the code block “React to new incidents in ServiceNow (Code)” comes in.
A flow triggered every minute is supporting this.
Check out the code-blocks
2 code blocks was created to support this, one for finding new Incidents and one for creating the workitem in VSTS with the original Business Consequence included. See separate stories with the details of that.