Configure other integration options
Configure the Other integration type to create work items in any external system using a custom payload script and basic authentication.
Before you begin
Confirm the API endpoint URL and request body format required by your external system. The payload script must produce a request body in the format your system expects.
Role required: Scan Engine admin (sn_se.scan_engine_admin)
Procedure
Other integration leading practices
The following leading practices are guidelines for creating other integration type scripts.
Script variables
The payload script runs on the ServiceNow instance when a work item is created. Use the payload variable to build the request body in the format your external system requires. The script output is sent as the request
body to the configured endpoint using basic authentication.
| Variable | Description |
|---|---|
payload |
The content to send in the request body. Structure this object to match the format expected by your external API. |
grFinding |
GlideRecord of the finding. Use this to read finding data for the request body. |
workItemType |
The work item type selected for this integration. |
Leading practices
- Review your target API documentation before writing the script
- The external system's API determines the required request body format, field names, and data types. Review the API documentation for your target system before building the
payloadobject to avoid silent mapping failures. - Match the payload structure to the API's expected format
- Set the Content type field and the structure of
payloadto match what the API expects. For a JSON API, buildpayloadas a plain JavaScript object — it will be serialized automatically. For other formats, construct the payload string directly. - Use grFinding to include finding context
- Read finding fields using standard GlideRecord methods on
grFindingand map them to the fields your external system expects. For example,grFinding.getValue('short_description')can populate a title or summary field. - Enable ES12 mode for modern JavaScript
- To use modern JavaScript syntax, enable ECMAScript 2021 (ES12) mode in Scan Engine Properties before writing your payload script.