Mapping Rule Language - RapidIdentity Platform Documentation

RapidIdentity Platform Documentation

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

A mapping rule file contains a rule identifier, an entity type, and one or more assignment rules. The following file is a simple, complete example:

ruleID = ed917774-05d6-440f-b07f-7b7808e7aa24
ruleType = person
let idautoPersonStuID = sourcedId
  • The ruleID defines the identifier of the rule, which is usually the identifier of the adapter associated with the rule.

  • The ruleType defines the entity type the rule applies to. In this example, the attributes are associated with people.

The lines that follow are the assignment rules. Each rule begins with the let keyword. For example, the following rule instructs the provisioning system to assign the field idautoPersonStuID in the target system the value from the field sourcedId in the source system:

let idautoPersonStuID = sourcedId

Additional rules extend the file to create a more complete record. The following example populates RapidIdentity from a OneRoster 1.1 user CSV:

ruleID = ed917774-05d6-440f-b07f-7b7808e7aa24
ruleType = person
let employeeType = role
let givenName = givenName
let mail = email
let idautoPersonMiddleName = middleName
let idautoPersonStuID = sourcedId
let idautoPersonSchoolCodes = orgSourcedIds
let sn = familyName

Real systems require more than simple assignments, such as this example that maps data from the OneRoster API using JSON:

ruleID = ed917774-05d6-440f-b07f-7b7808e7aa24
ruleType = person
let displayName = givenName + " " + familyName
let employeeType = when {
    roles.contains("student") -> "student"
    roles.containsAny("administrator", "aide", "proctor") -> "staff"
    roles.contains("teacher") -> "teacher"
    else -> ""
}
let givenName = givenName
let mail = email
let idautoDisabled = if (status != "active") "TRUE"
let idautoPersonEmployeeTypes = role
let idautoPersonMiddleName = middleName
let idautoPersonStuID = sourcedId
let idautoPersonSchoolCodes = orgs.mapWithSelector("sourcedId")
let sn = familyName