Customize scripted extension points

task australia Updated Sep 10, 2026 2 min read configure-extension-points.md
Raw file servicenow.com

Customize specific parts of the Fortinet connector's behavior by implementing scripted extension points.

Before you begin

Service Graph Connector for Fortinet must be installed. For instructions, see Configure a Fortinet SD-WAN Service Graph Connector.

Role required: tsom_visibility_admin

About this task

The Service Graph Connector for Fortinet exposes nine scripted extension points. Each extension point controls a specific part of the connector's behavior, such as request payloads, ADOM filtering, or how a CIs Life Cycle Stage Status is set. Every extension point follows the same pattern: an extension point record defines the contract (the functions your implementation must provide), and an extension instance record wires your implementation to that extension point. See Fortinet extension points reference to find the extension point that controls the behavior you want to change.

The following steps apply to any of the nine extension points. This example customizes FortinetCustomizedContractParsing to change how license expiration dates are stored on CIs.

Procedure

  1. Navigate to All > System Scripted Extension Points > Scripted Extension Points.

  2. Search for Fortinet in the Extension Points search field.

  3. From the API Name search results list, select the extension point you want to customize, for example sn_sgc_fortinet.FortinetCustomizedContractParsing.

  4. Select the Create implementation related link.

  5. In the Script field, implement the function stubs for the extension point's contract.

    The docstring on each stub describes what your function must return.

  6. Run your implementation before the default by setting the Order field to a value less than 100.

    The default implementation has an order of 100; implementations with a lower order number execute first and take precedence.

  7. Select Update.

Result

Your custom implementation is saved and active. The connector picks it up automatically on its next scheduled run — no restart or cache clear needed.

Example: Customize license expiration date storage

By default, Fortinet SGC stores license expiration dates as separate CI key-value pairs for each device, using the naming convention license_expiration_date_*SERVICE\_CODE*. This example customizes FortinetCustomizedContractParsing to store only the earliest expiration date across all devices instead.

In the Script field, modify the buildLicenseAttributes function to return an array of {key, value} objects containing the CI key-value pairs you need to store. Loop through contractItems to find the minimum date value, then return it as a single object: { key: "license_expiration_date", value: "<earliest_date>" }.[Omitted image "contract-items-parsing.png"] Alt text: Contract items parsing implementation interface

The next time Fortinet SGC discovers devices, your script runs first. It stores the license key-value pairs you defined on the relevant CIs, overriding the default per-device key-value pairs behavior.

Related topics

Fortinet extension points reference

Extension points

Create a scripted extension point

Keywords extension points scripted fortinet license
Search documentation
Search document titles and file paths on the australia branch