Skip to main content

getIntegrationConfig

A Workflow Engine function that retrieves an integration configuration and stores it in the workflowContext for subsequent actions to use. Returns true if the specified type and key are found.

This function is available as a feature of the Workflow Engine v1.2 download and later.

This function is available for event, alert, and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function getIntegrationConfig takes the following arguments:

Name

Required

Type

Description

integrationType

Yes

String

Integration type, for example PayloadMaps.

integrationKey

No

String

Key to use within the type. Varies by type, for example map name from the PayloadMaps integration. For integration types with multiple sub-objects, such as maps or endpoints, provide this to return only the specific configuration.

Example

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

If the integration you configure is PayloadMaps, set the following:

  • integrationType: PayloadMaps

The UI translates your settings to the following JSON:

{"integrationType":"PayloadMaps"}

In this example, the PayloadMaps integration has created two payload maps: "Export" and "Datalake". The JSON equivalent of this is:

"PayloadMaps" : {
  "config" : [{
	[
	{
	"configName": "Export",
		"rules": [{
			"name": "alert_id",
  	     	"rule": "$alert_id",
			"conversion": "stringToInt"
		}, {
			"name": "description",
			"rule": "$description",
			"conversion": "none"
		}, {
			"name": "class",
			"rule": "$class",
			"conversion": "none"
		}, {
			"name": "type",
			"rule": "$type",
			"conversion": "none"
		}, {
			"name": "severity",
			"rule": "$severity",
			"conversion": "unenumerate"
		}, {
			"name": "agent",
			"rule": "$agent:$agent_location",
			"conversion": "none"
		}, {
			"name": "services",
			"rule": "$custom_info.services",
			"conversion": "none"
		}, {
			"name": "servicesList",
			"rule": "$custom_info.services",
			"conversion": "objToString"
		}, {
			"name": "manger",
			"rule": "Manager:$manager",
			"conversion": "none"
		}
	]
   }, 
   {
	"configName": "Datalake",
	"rules": [
		{
			"name": "alert",
			"rule": "$alert_id",
			"conversion": "stringToInt"
		}, {
			"name": "description",
			"rule": "$description",
			"conversion": "none"
		}
	]
  }
  ]
}

As integrationKey is not set, the function produces a workflowContext containing both maps:

{
    "workflowConfig": {
        "payloadmaps": [
            {
                "configName": "Export",
                "rules": [
                    {
                        "name": "alert_id",
                        "rule": "$alert_id",
                        "conversion": "stringToInt"
                    },
                    {
                        "name": "description",
                        "rule": "$description",
                        "conversion": "none"
                    },
                    {
                        "name": "class",
                        "rule": "$class",
                        "conversion": "none"
                    },
                    {
                        "name": "type",
                        "rule": "$type",
                        "conversion": "none"
                    },
                    {
                        "name": "severity",
                        "rule": "$severity",
                        "conversion": "unenumerate"
                    },
                    {
                        "name": "agent",
                        "rule": "$agent:$agent_location",
                        "conversion": "none"
                    },
                    {
                        "name": "services",
                        "rule": "$custom_info.services",
                        "conversion": "none"
                    },
                    {
                        "name": "servicesList",
                        "rule": "$custom_info.services",
                        "conversion": "objToString"
                    },
                    {
                        "name": "manger",
                        "rule": "Manager:$manager",
                        "conversion": "none"
                    }
                ]
            },
            {
                "configName": "Datalake",
                "rules": [
                    {
                        "name": "alert",
                        "rule": "$alert_id",
                        "conversion": "stringToInt"
                    },
                    {
                        "name": "description",
                        "rule": "$description",
                        "conversion": "none"
                    }
                ]
            }
        ]
    }
}

To only return the export map, set the following:

  • integrationType: PayloadMaps

  • integrationKey: Export

The function now produces a workflowContext that only contains the Export map:

{
  "workflowConfig": {
        "payloadmaps": {
            "configName": "Export",
            "rules": [
                {
                    "name": "alert_id",
                    "rule": "$alert_id",
                    "conversion": "stringToInt"
                },
                {
                    "name": "description",
                    "rule": "$description",
                    "conversion": "none"
                },
                {
                    "name": "class",
                    "rule": "$class",
                    "conversion": "none"
                },
                {
                    "name": "type",
                    "rule": "$type",
                    "conversion": "none"
                },
                {
                    "name": "severity",
                    "rule": "$severity",
                    "conversion": "unenumerate"
                },
                {
                    "name": "agent",
                    "rule": "$agent:$agent_location",
                    "conversion": "none"
                },
                {
                    "name": "services",
                    "rule": "$custom_info.services",
                    "conversion": "none"
                },
                {
                    "name": "servicesList",
                    "rule": "$custom_info.services",
                    "conversion": "objToString"
                },
                {
                    "name": "manger",
                    "rule": "Manager:$manager",
                    "conversion": "none"
                }
            ]
        }
    }
}