Importing and Updating Fact Sheets

Learn how to import and update application fact sheets using the inboundFactSheet processor of the Integration API.

Overview

You can import fact sheets into SAP LeanIX using the inboundFactSheet processor of the Integration API. By the end of this tutorial, you'll be able to:

  • Import application fact sheets into SAP LeanIX, including basic information like names and descriptions.
  • Update imported fact sheets with business criticality values.
  • Set up value mappings for fact sheet fields in the processor configuration.

Prerequisites

This tutorial assumes you have basic knowledge of:

Step 1: Import Fact Sheets with Basic Information

In the first step, import application fact sheets with the following attributes:

Attribute KeyTypeDescription
nameSTRINGThe name of the fact sheet.
descriptionSTRINGThe description of the fact sheet.

👍

Tip

To get attribute keys, go to the processor configuration page, click the three-dot icon in the upper-right corner, then select Get Data Model. The data model of the workspace is returned in the Output Log section, where you can find the keys of specific attributes.

Getting the Data Model of the Workspace from the Processor Page

Getting the Data Model of the Workspace from the Processor Page

To configure and run a connector, follow these steps:

  1. Go to the Integration API section in the administration area.
  2. Click New Processor Configuration, fill in the required details, and then click Create.
  3. On the connector configuration page, enter the processor configuration in the left-side section.
  4. In the Input section on the right, enter the input data.
  5. To start a test run, click Test run. If successful, proceed to the next step.
  6. To start a run, click Run.
  7. To save the connector, click Save in the lower-left corner.

Two application fact sheets are imported into the workspace with their names and descriptions. You can check the created fact sheets in the inventory. To learn how to use the inventory, see Inventory.

Processor Configuration

Example processor configuration:

{
  "processors": [
    {
      "processorType": "inboundFactSheet",
      "processorName": "Create applications",
      "processorDescription": "Creates application fact sheets",
      "type": "Application",
      "filter": {
        "type": "Application"
      },
      "identifier": {
        "external": {
          "id": {
            "expr": "${content.id}"
          },
          "type": {
            "expr": "externalId"
          }
        }
      },
      "run": 0,
      "updates": [
        {
          "key": {
            "expr": "name"
          },
          "values": [
            {
              "expr": "${data.name}"
            }
          ]
        },
        {
          "key": {
            "expr": "description"
          },
          "values": [
            {
              "expr": "${data.description}"
            }
          ]
        }
      ],
      "enabled": true,
      "variables": [],
      "logLevel": "warning"
    }
  ]
}

Input Data

📘

Note

The id passed in the content array represents the record ID in the external system. This ID is written to the externalId field (External ID). A unique fact sheet ID is generated automatically upon fact sheet creation.

Example input data:

{
  "connectorType": "Basic-ImportApplications",
  "connectorId": "ImportApplications",
  "connectorVersion": "1.0.0",
  "lxVersion": "1.0.0",
  "description": "",
  "processingDirection": "inbound",
  "processingMode": "full",
  "customFields": {},
  "content": [
    {
      "type": "Application",
      "id": "APP-0001",
      "data": {
        "name": "AC Management",
        "description": "AC Management description"
      }
    },
    {
      "type": "Application",
      "id": "APP-0002",
      "data": {
        "name": "AC Management Cloud",
        "description": "AC Management Cloud description"
      }
    }
  ]
}

Step 2: Update Fact Sheets with Business Criticality Values

In this step, update the imported fact sheets with business criticality values. The names and descriptions remain unchanged.

Attribute KeyTypeDescription
businessCriticalitySINGLE_SELECTIndicates the importance of an application to the functioning and success of a business. Possible values: missionCritical (Mission critical), businessCritical (Business critical), businessOperational (Business operational), or administrativeService (Administrative service).

Consider a scenario where business criticality values differ between the external customer's system and SAP LeanIX. To address this, create a mapping of business criticality values and provide these mappings in the processor configuration. This setup lets you import business criticality values from your external system by aligning them with SAP LeanIX values.

External ValueSAP LeanIX Value
1-CriticalmissionCritical
2-HighbusinessCritical
3-LowbusinessOperational
0-NonCriticaladministrativeService

In the connector you created in the previous step, update the processor configurations and input data. Then, run the connector. This updates two application fact sheets you imported earlier. Business criticality values are mapped from the external system to SAP LeanIX.

Processor Configuration

Example processor configuration:

{
  "processors": [
    {
      "processorType": "inboundFactSheet",
      "processorName": "Create applications",
      "processorDescription": "Creates application fact sheets",
      "type": "Application",
      "filter": {
        "type": "Application"
      },
      "identifier": {
        "external": {
          "id": {
            "expr": "${content.id}"
          },
          "type": {
            "expr": "externalId"
          }
        }
      },
      "run": 0,
      "updates": [
        {
          "key": {
            "expr": "name"
          },
          "values": [
            {
              "expr": "${data.name}"
            }
          ]
        },
        {
          "key": {
            "expr": "description"
          },
          "values": [
            {
              "expr": "${data.description}"
            }
          ]
        },
        {
          "key": {
            "expr": "businessCriticality"
          },
          "values": [
            {
              "expr": "${data.businessCriticality}",
              "regexMatch": "1-Critical",
              "regexReplace": {
                "match": "^.*$",
                "replace": "missionCritical"
              }
            },
            {
              "expr": "${data.businessCriticality}",
              "regexMatch": "2-High",
              "regexReplace": {
                "match": "^.*$",
                "replace": "businessCritical"
              }
            },
            {
              "expr": "${data.businessCriticality}",
              "regexMatch": "3-Low",
              "regexReplace": {
                "match": "^.*$",
                "replace": "businessOperational"
              }
            },
            {
              "expr": "${data.businessCriticality}",
              "regexMatch": "0-NonCritical",
              "regexReplace": {
                "match": "^.*$",
                "replace": "administrativeService"
              }
            }
          ]
        }
      ],
      "enabled": true,
      "variables": [],
      "logLevel": "warning"
    }
  ]
}

Input Data

Example input data:

{
  "connectorType": "Basic-ImportApplications",
  "connectorId": "ImportApplications",
  "connectorVersion": "1.0.0",
  "lxVersion": "1.0.0",
  "description": "",
  "processingDirection": "inbound",
  "processingMode": "full",
  "customFields": {},
  "content": [
    {
      "type": "Application",
      "id": "APP-0001",
      "data": {
        "name": "AC Management",
        "description": "AC Management description",
        "businessCriticality": "1-Critical"
      }
    },
    {
      "type": "Application",
      "id": "APP-0002",
      "data": {
        "name": "AC Management Cloud",
        "description": "AC Management Cloud description",
        "businessCriticality": "2-High"
      }
    }
  ]
}

Summary

In this tutorial, you learned how to import application fact sheets and update them using the inboundFactSheet inbound processor of the Integration API. You also learned how to set up value mappings in the processor configuration.