Skip to main content

addCorrelationInfo

A Workflow Engine function that adds an External ID to a Situation.

You can use this function to store external ticket references against a Situation. addCorrelationInfo acts as a wrapper around the method moogdb.addSigCorrelationInfo.

This function is available as a feature of the Add-ons v2.1 download and later. See Install Moogsoft Add-ons for information on how to upgrade.

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function addCorrelationInfo takes the following arguments:

Name

Required

Type

Description

serviceName

yes

string

Name of the external service, such as 'ServiceNow'

externalId

yes

string

Identifier that the entity has in the external service, such as 'incident reference'

Example

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

You have a ticketing integration that triggers a request to an external ticketing application to create a ticket based on the contents of a Situation. You can store the external ticket reference that the external application returns against the originating situation. To add the ticket reference with the workflowContext key myTicketID to a Situation that is using the external service myTicketApp, set the following:

  • serviceName: myTicketApp

  • externalId: workflowContext.myTicketID

The UI translates your settings to the following JSON:

{ “serviceName”:”myTicketApp”, "externalId": "workflowContext.myTicketID" }

You may receive a ticket reference from the ticketing application synchronously (at request time) or asynchronously via a callback.

If you receive the ticket reference synchronously, then a separate action initiates the requests to the external ticketing application and returns the ticketing reference to the workflowContext before the addCorrelationInfo action.

If you receive the the ticket reference asynchronously via callback, you trigger a response to a Situation Inform Workflow by adding a hook to the external application and use the sendToWorkflow Graze endpoint to trigger a response that contains the addCorrelationInfo action.