Attribute Mapping references
Summarize
Summary of Attribute Mapping references
Attribute Mapping allows ServiceNow customers to define how attributes correspond to ServiceNow table fields, creating a single source of resource for data integration.
Show less
Key Features
- Attribute: The main attribute for mapping, such as userName.
- Sub-Attribute: Defines additional details for complex attributes (e.g., name.familyName), where the main attribute is 'name' and the sub-attribute is 'familyName'.
- Filter Condition: Enables specification of additional information for multi-valued attributes using conditions based on SCIM Provider schemas (e.g., phoneNumbers with types like work, mobile, home).
- Database Field Name: Required when direct attribute mapping is selected, representing the ServiceNow field that the SCIM Attribute aligns with (e.g., mapping username to the user ID field).
- Default Value: Specifies a value to return if the direct mapping yields null, which can also be a hard-coded value.
- Script: Used to fetch attribute values, with output needing to be in string format or JSON string format for compatibility with the provider.
Key Outcomes
By utilizing Attribute Mapping, ServiceNow customers can ensure accurate data alignment between SCIM attributes and ServiceNow fields, streamline data integration processes, and maintain consistency in resource management. This leads to improved operational efficiency and data integrity across the platform.
The attribute mappings enables you to use the attributes as a single source of resource to the ServiceNow table fields.
Attribute
The attribute for which mapping needs to be defined. For example, userName.
Sub-Attribute
Select the sub-attribute, if any, for which a mapping needs to be defined.
For example, if there is a complex type attribute like name.familyName, then the attribute is name and the sub-attribute is familyName.
For simple attributes like user name, the Sub-Attribute value would be None.
Filter Condition
A multi-valued attribute can have additional information that can be specified by using a Filter Condition. The choices for the filter condition are populated using the schemas defined by the SCIM Provider.
For example, the phoneNumbers attribute has multiple types like work, mobile, home, and so on.
You can specify a Filter Condition from a set of possible values. For example, the phoneNumber attribute can have the Filter Condition as type eq "mobile".
The phoneNumber attribute can instead have a Filter Condition as type eq "work".
Database Field Name
If the direct attribute mapping option is chosen, then this attribute needs to be defined. The Database Field Name field represents the ServiceNow field name that is mapped with the SCIM Attribute.
For example, the username SCIM Attribute can be mapped to a user as the Database Table Name field, and to the user ID field as the Database Field Name field.
You can also dot-walk using the Database Field Name. For example, the department SCIM Attribute can be mapped to the Department Name field.
Here the Database Table is User and the Database field Name is Department Name.
Default Value
The default value is passed to the SCIM Provider if direct attribute mapping of that field returns null. The default value can also be used to return a hard-coded value.
In the case of a hard-coded value, the database table name and field name should be None.
For example, the primary sub-attribute value of work email can be hard coded as true.
Script
The script is used to fetch the attribute value. The return type of the script should be always a string, or a JSON converted as a string. The output of the script should be in the proper format as expected by the provider for that attribute.
The following is a sample script for a multi-valued attribute.
The output of the script should have a stringified JSON Array.
The following is a sample Script of a simple-valued Attribute.
The output of the script should be a string.