IT CanvassTalk to an advisor
Examples · LessonBy , SailPoint Architect · Published · IdentityIQ 8.4 · all levels

Rule examples

Copy-ready BeanShell rule examples for correlation, build-map and provisioning hooks.

Quick answer

These rule examples show the most common IdentityIQ hooks, correlation, build map, and field value, as short BeanShell snippets you can adapt.

Key takeaways
  • Correlation, build-map and provisioning rules
  • Short, commented BeanShell snippets
  • Adapt identifiers to your schema
  • Keep rules small and tested

Rules are how you customise IdentityIQ in BeanShell at defined hook points. These examples show the patterns you will reach for most, correlation, build-map and provisioning, with the context each rule receives and how to keep them safe and fast.

Correlation rule

A correlation rule matches an incoming account to the correct identity, usually on a stable key. It receives the account and returns a correlation expression:

import sailpoint.object.*;
// Correlate an account to an identity by employeeId
String empId = (String) account.getAttribute("employeeId");
if (empId == null || empId.trim().length() == 0) {
  return null; // fall through to default correlation
}
return "employeeId==" + empId;

Build-map rule

A build-map rule shapes raw data read from a source before it is applied:

// Normalise department casing coming from HR
String dept = (String) map.get("Cost_Center_Name");
if (dept != null) { map.put("department", dept.trim().toUpperCase()); }
return map;

Guidance

  • Always null-check attributes, missing values are the norm.
  • Keep rules small and single-purpose.
  • Never query per-identity in a loop, it destroys refresh performance.
  • Version-control and test every rule.

Common pitfalls

  • Unguarded attribute access throwing null-pointer errors.
  • Heavy database work inside hot-path rules.
  • Copying a rule without checking its context.

Practice challenge

+0 XPStreak ×0
Question 1 of 3
What do rule examples cover?

Frequently asked questions

What does the term Rule examples refer to in SailPoint?
Rules are how you customise IdentityIQ in BeanShell at defined hook points. These examples show the patterns you will reach for most, correlation, build-map and provisioning, with the context each rule receives and how to keep them safe and fast.
What is worth remembering about Rule examples in practice?
A correlation rule matches an incoming account to the correct identity, usually on a stable key.
What is another point to note about Rule examples?
Always null-check attributes, missing values are the norm. Keep rules small and single-purpose. Never query per-identity in a loop, it destroys refresh performance.
What tends to go wrong with Rule examples?
Unguarded attribute access throwing null-pointer errors. Heavy database work inside hot-path rules. Copying a rule without checking its context.
Want this with a live instructor and a lab tenant?
SailPoint Developer training →
Already working on SailPoint and stuck on a live ticket?Get an expert SailPoint developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support