Advanced Configuration
Configure advanced settings for the ServiceNow integration.
Introduction
You can configure advanced settings for the ServiceNow integration on the Advanced tab of the ServiceNow configuration page. Here, the configuration is represented in JSON format. Any changes made to the configuration on other tabs automatically appear on the Advanced tab.
Some settings can only be configured in the advanced configuration, such as OAuth 2.0 setup, advanced relation mapping, dot walking, and more. For detailed information, refer to the following sections.
Tip
If the Advanced tab doesn't appear on the ServiceNow configuration page, contact SAP LeanIX Support to activate this feature. If you're an SAP customer, submit a request from the SAP for Me portal.
Best Practices
Use the advanced configuration of the ServiceNow integration for the following purposes:
- Configure advanced settings: Configure settings that can not be configured otherwise and adjust settings for advanced use cases.
- Back up and restore configurations: You can use the JSON code version control, backup, and restoration purposes. Simply copy the full JSON code and save it in a file for future use.
- Restore the default configuration: To revert to the default configuration, remove the existing configuration in the JSON editor and input an empty JSON document
{}
. This action restores the default supported configuration mapping, providing a good starting point for your configuration.
Relation Mapping Behaviour
Some settings in the relation mapping behaviour can only be configured in the advanced settings.
CMDB_REL_CI
You can add an optional query
to relation mappings in foreignRelationMapping
to enhance integration performance. Here's an example of a query that reads only from relations where the parent class is a business capability and the child class is a business application.
Example:
"foreignRelationMapping": {
"type": "CMDB_REL_CI",
"relationName": "Provided By::Provides",
"query": "parent.sys_class_name=cmdb_ci_business_capability^child.sys_class_name=cmdb_ci_business_app^typeISNOTEMPTY"
}
REFERENCE_FIELD
There are no additional flags for the REFERENCE_FIELD
mapping type.
MAPPING_TABLE
There is an additional option to define a Graph Rule sync constraint in the Advanced Section: MAPPING_TABLE_CONNECTION
. This limits the objects to the one's available in the custom relationship table while pulling into SAP LeanIX.
Example:
"syncConstraint": {
"graphRules": [
"APPLICATION_SAM_CONNECTION",
"MODEL_CATEGORY"
]
}
Other Settings
In this section, you can find out how to configure advanced settings for the ServiceNow integration for specific use cases.
Dot Walking
It is possible to dot walk
certain field mappings within the advanced configuration of the Integration. This is especially useful if it is required to pull information of some record from its corresponding referenced field.
In the following example, we know that Schedule & Track is linked to the Business Unit of Australia. To bring this information into SAP LeanIX as a relationship, we will have to -
- Map the table which the reference field is from to a SAP LeanIX Fact Sheet type. In this case it would be linking the SAP LeanIX User Group Fact Sheet Type to the
business_unit
table. - Create a relationship descriptor of type
REFERENCE_FIELD
between the Applications and the User Group Fact Sheet Type using thebusiness_unit
reference field as seen below in the screenshot.
While the above method works, it is often times too much work just to bring in data from the field. Especially so if it is not required to have as a Relationship. In such a case, dot-walking functionality can be used to bring the name of the Business Unit into SAP LeanIX as a string field.
Example - Bring data of reference fields into text fields in SAP LeanIX
Use Dot Walking Functionality to get a Business Unit's name which is assigned to a Business Application.
- Step 1
Review the field in ServiceNow by clicking on the (i) icon
-
Step 2
We notice that thename
field is the one that stores the actual value of "Australia" in a string field. -
Step 3
Logically speaking another way to put this would bebusiness_unit.name
. Wherein, the first part before the "." is the name of the field within the main table. Subsequently, the second part after the "." is the name of the field within the referenced table where the value is stored. This is known as dot-walking. -
Step 4
Within SAP LeanIX, this can be modeled within the advanced tab as follows -
"alias": {
"fieldType": "FOREIGN_FIELD",
"foreignFieldName": "business_unit.name",
"useNormalDirection": true
},
In the code example above, we are pulling the name of the attached business unit to the Application into the Alias field of SAP LeanIX which for the purposes below we have renamed to "Business Unit".
Deletion Ratio
To avoid accidentally the deletion of of Fact Sheets or ServiceNow records because of an erroneous configuration, a deletion ratio threshold can be configured.
The maximumDeletionRatio
specifies the deletion ratio in percent. The default value is 50. If the total candidate records for deletion are higher than 50%, then the Integration will not delete those records and output an error in the synclog to review.
If a maximumDeletionRatio
is specified and the number of items to delete / synchronized items is less than maximumDeletionRatio
, then the synchronization is allowed to delete.
Tip
Set the Deletion Ratio to lower or higher depending on the preferred result.
Be careful with the use of
strict mode
andmaximumDeletionratio
as it can lead to unintended permanent deletion of data.If the expectation is to delete majority/all of records on either side, then the deletionratio can be set to higher or 100%.
However, if the expectation is to carefully review each and every candidate for deletion within the synclog, the ratio can be set to 1. Further still, for the latter use-case we recommend to not have Strict Mode turned on to begin with as the synclog will still show records that are not part of the source system, which inherently are deletion candidates.
Graph Constraint Hardware Filter
While using the graph constraints APPLICATION_SAM_CONNECTION
or APPLICATION_HARDWARE_CONNECTION
additional parameters can be applied optionally to only retrieve Software Product Models that are linked to Operational Hardware CIs.
The hardwareFilter
key within the advanced configuration tab can contain a sysparm_query
for filtering the hardware table like the sysparm_query used in ServiceNow REST API.
Note
Queries only containing
AND
andOR
operators (^ and ^OR in ServiceNow query notation) are supported.
A valid example of filtering for the documentation would be:
"hardwareFilter": "operational_status=1^ORinstall_status=1"
In this example, the Hardware Filter is applied to only bring over Software Models which are attached to Hardware CIs that are Operational.
Read Relationship Table Iteratively
In some cases, it can be useful to iteratively load and process relationships during the synchronization. Thus, the readRelCiIterative
condition as seen above in Line 188
of the screenshot can be set to true
.
In case this is not specified or is set to null, the integrations reads the whole table into the memory to detect relations.
Disable Validation for Specific Foreign Fields
Due to issues integrating with ServiceNow, some field metadata may not be read correctly, which can lead to failed validations when saving otherwise valid configurations.
In this case, validation can be disabled specifically for these ServiceNow fields as follows:
{
"factSheetSyncDescriptors": [
{
...
"fieldMapping": {
"mapping": {
"description": {
"fieldType": "FOREIGN_FIELD",
"foreignFieldName": "serviceNow_field_one",
"useNormalDirection": true
}
}
}
},
...
],
...
"validation": {
"ignoredMissingFields": ["serviceNow_field_one"]
}
}
In ignoredMissingFields
, list all values of foreignFieldName
for which you want to disable validation. The integration will still attempt to load the necessary metadata as usual, but will continue if the metadata cannot be found.
Disable Partial Sync
The skipPartialSyncCondition
property is no longer supported. To configure how partial sync should be executed, use the Partial Sync Mode property. For more information, see Partial Sync Mode.
Updated 17 days ago