Skip to main content

updateServiceNowConfig

A Workflow Engine function that sends an update request to ServiceNow for the Moogsoft Properties (part of the Moogsoft update set for ServiceNow Management integration).

When the integration is first configured, these properties are set. When the properties are updated using the Integration UI, they are not updated and it is necessary to then run this function. Alternatively, the Moogsoft Properties can be:

  • Manually updated using the ServiceNow UI

  • Updated by running a cURL request against the Moogsoft integration API endpoint (https://<servicenow-server>/api/x_moogs_incident_m/v1/configure) using a body with the values to set, such as:

    {
        'mid_server' : 'yourMIDServer',    
        'oauth2_profile' : "",                                          
        "resolving_step" : true,                    
        "close_situations": true,                   
        "graze_user" : "grazeuser",                    
        "graze_password" : "grazeuserpass",                
        "graze_timeout" : 10,                       
        "graze_retry" : 3,
        "instance_name" : "yourmoogosftserver",
        "thread_name" : "Support",
        "enable_change" : true,
        "maximum_change_window" : 14400
    }

This function is available as a feature of the Add-ons v2.3 download and later.

This function is available for alert workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function updateServiceNowConfig takes the following arguments:

Name

Required

Type

Description

instance

yes

string

ServiceNow instance URL

Example

The following example demonstrates typical use of Workflow Engine function updateServiceNowConfig.

In this case, the the workflow updates the Moogsoft Property settings in ServiceNow when the Alert Client Tool, Update ServiceNow Moogsoft Properties, is run from an alert

Sample Workflow - Update ServiceNow Moogsoft Properties (Alert Integration WFE)

Action

Settings or Description

Entry filter

Empty (can be added) as initiated from Client Tool or other WFE

DELAY

0 seconds (set as needed)

Request settings update

(updateServiceNowConfig)

Build request payload and save to workflow context

instance: $(workflowContext.passedInstance)

The workflow takes input values set in the ServiceNow Management integration initiates an update request to the https://<servicenow-server>/api/x_moogs_incident_m/v1/configure endpoint in ServiceNow to set the Moogsoft Properties.