Integration with Noggin

AaronSoto
Tera Contributor

Hi Community,

 

Does anyone have a step by step guide on how to complete the integration with Noggin? I am required to send the incidents created from ServiceNow to Noggin. 

3 REPLIES 3

danmjunqueira
Kilo Guru

 

There is no official out-of-box integration between ServiceNow and Noggin, so you will need to build a custom integration, typically using REST APIs. Below is a simple step-by-step guide for integrating ServiceNow Incidents with Noggin by sending data when a new incident is created.

Step-by-Step Guide: Sending Incidents from ServiceNow to Noggin
Step 1: Understand Noggin's API
Contact your Noggin administrator or consult Noggin documentation to get:

Base API URL (example: https://api.noggin.io/)

Required authentication (OAuth 2.0, API token, basic auth)

Endpoint for incident creation (example: POST /incidents)

Payload structure (fields and format expected)

Step 2: Create an Outbound REST Message in ServiceNow
Go to System Web Services > Outbound > REST Message

Click New

Set name: Send Incident to Noggin

Add the base URL (e.g., https://api.noggin.io/)

Add an HTTP Method:

Name: POST Incident

Endpoint: Full URL to Noggin incident creation endpoint

HTTP Method: POST

Step 3: Configure Authentication
Go to the Authentication tab

Use Basic Auth, OAuth, or API Key depending on Noggin’s requirements

Store credentials securely using Credential records in ServiceNow

Step 4: Build a Scripted Action or Business Rule
Option 1: Business Rule on Incident (after insert)

(function executeRule(current, previous) {
var r = new sn_ws.RESTMessageV2('Send Incident to Noggin', 'POST Incident');
r.setStringParameterNoEscape('short_description', current.short_description);
r.setStringParameterNoEscape('description', current.description);
r.setStringParameterNoEscape('priority', current.priority);
// Add more fields as needed

var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.info('Noggin Response: ' + httpStatus + ' - ' + responseBody);
})(current, previous);

Option 2: Flow Designer

Create a flow triggered on new Incident creation

Use the REST step to call the outbound integration

Step 5: Test the Integration
Create a test incident

Monitor logs: System Logs > Outbound HTTP Requests

Review the response and troubleshoot any failures

Step 6: Handle Errors and Logging
Log failed attempts to a custom table or incident work notes

Add retry logic if needed

Roshnee Dash
Kilo Sage

1. Gather Requirements

2. Set Up Authentication in ServiceNow

🔸 Option A: API Key Authentication

If Noggin uses an API key:

  1. Go to System Web Services > Outbound > REST Message.
  2. Create a new REST Message.
  3. Under HTTP Headers, add:
    • Name: Authorization
    • Value: Bearer YOUR_API_KEY_HERE

You can also store the API key in a ServiceNow Credential record for security.

🔸 Option B: Basic Authentication

If Noggin uses basic auth (username/password):

  1. Go to System Web Services > Outbound > REST Message.
  2. Under Authentication Type, select Basic.
  3. Create or select a Credential record with the Noggin username and password.

🔸 Option C: OAuth 2.0

If Noggin uses OAuth:

  1. Go to System OAuth > Application Registry.
  2. Register a new OAuth provider:
    • Name: Noggin OAuth
    • Client ID, Secret, Token URL: Provided by Noggin
  3. Use this OAuth profile in your REST Message.

3. Create the REST Message

  1. Navigate to System Web Services > Outbound > REST Message.
  2. Click New and fill in:
  3. Add a POST method:
    • HTTP Method: POST
    • Content-Type: application/json
    • Request Body (example)
{
  "incident_id": "${incident.sys_id}",
  "short_description": "${incident.short_description}",
  "priority": "${incident.priority}",
  "created_by": "${incident.opened_by}"
}

 

  • Trigger the REST Message

    Use a Business Rule or Flow Designer to send the incident when it’s created.

    Example Business Rule Script:

var r = new sn_ws.RESTMessageV2('Send Incident to Noggin', 'default');
r.setStringParameterNoEscape('incident_id', current.sys_id);
r.setStringParameterNoEscape('short_description', current.short_description);
r.setStringParameterNoEscape('priority', current.priority);
r.setStringParameterNoEscape('created_by', current.opened_by.name);
var response = r.execute();
​
  • Test and Monitor

    • Create a test incident in ServiceNow.
    • Check if it appears in Noggin.
    • Use REST Message Logs to debug any issues

 Syntax: RESTMessageV2 in ServiceNow

// Create a new RESTMessageV2 object
var r = new sn_ws.RESTMessageV2('Send Incident to Noggin', 'post');

// Optional: Set custom headers (e.g., for API key auth)
r.setRequestHeader("Authorization", "Bearer YOUR_API_KEY_HERE");
r.setRequestHeader("Content-Type", "application/json");

// Set the request body
var body = JSON.stringify({
  incident_id: current.sys_id,
  short_description: current.short_description,
  priority: current.priority,
  created_by: current.opened_by.name
});
r.setRequestBody(body);

// Execute the REST call
var response = r.execute();

// Handle the response
var status = response.getStatusCode();
var responseBody = response.getBody();

gs.info("Status: " + status);
gs.info("Response: " + responseBody);

Notes:

  • Replace 'Send Incident to Noggin' with the name of your REST Message.
  • Replace 'post' with the HTTP method name you defined (e.g., 'default', 'createIncident').
  • You can also use r.executeAsync() if you want the call to be non-blocking.

Hi @AaronSoto 
If you found my response helpful, please mark it as correct and close the thread so others can benefit from it too.