Data Generation Rules

This feature is currently available only to customers participating in a private preview. If you'd like to participate to be among the first to try this feature, ask our support or account team for details.

When identities are created or updated, the data added to their fields is governed by data generation rules. Throughout an identity's lifecycle, data generation rules run based on pre-defined triggers.

You can set an order for data generation rules so they will be run in order of priority. If multiple rules have the same priority, they are run in non-deterministic order or in parallel.

For additional details, visit Data Generation Patterns Syntax.

Creating a Data Generation Rule

To view or manage a data generation rule, navigate to the Configuration page and select the Data Generation tab.

You can select an existing rule to modify or click Create New.

Fields

To create a Data Generation Rule, select Create and fill out all required fields, plus any additional ones desired. The table below summarizes field details and requirements.

Field

Required / Optional

Data Type

Note

Rule Name

Required

Unique; Text

Description

Required

Text

If selected, an email will be sent to the specified email address whenever an identity is added to this user type.

Field Name

Required

Selection

The field to which this rule will apply.

Priority

An integer value that defines the priority of this rule relative to other rules.

Enabled

Boolean

If true, the rule is enabled and will be run based on the trigger.

Conditional Rule

Boolean

See Creating Conditional Rules below.

Triggers

Selection

The selected option defines what triggers this rule to run. Trigger options:

  • Identity Creation

  • Identity Update

  • Field Update

  • Timer<>:

    • Hourly

      • Minute(s) past the hour.

    • Daily

      • Time of day

    • Weekly

      • Day of week

      • Time of day

    • Monthly

      • Day of month

      • Time of day

Rule Type

Selection

The type of rule, which can be either script or pattern.

Script

Selection

A script that evaluates the identity to return the value for the field. If this type is selected, then the following fields are required.

  • Script: The script to run.

Pattern

A pattern (or list of patterns) to generate the field's value. If this type is selected, then the following fields are required. Generation Rules:

  • Use template strings in the format {{givenname}}, where the template string is any identity field name, including custom fields.

  • In addition, it is possible to restrict the length of the replacement value using the format {{variable:<length>}}, where as the number of characters you want to use, for example, {{surname:5}} will use five characters from the surname.

  • Spaces can be used. For example, to generate an Identity's full name, the corresponding field can be set to generate data using a format similar to {{honsuffix}} {{givenname}} {{surname}}.

  • These special system template strings are also available:

    • appshortname: The short name of the application
    • yyyy: The current year as four digits (for example, 2012)

    • yy: The current year as two digits (for example, 12)

    • mm: The current month as two digits

    • dd: The current day as two digits

    • increment: An incrementing number - if used, must be placed as the last (right-most) string in your rule format. The number of digits can be controlled with the length parameter. For example, *------ will count up to a maximum of 999.

  • When separated by new lines, more than one format can be configured per Rule, and each format will be tried in turn to find a unique value.

Characters to Exclude

Text

  • A list of characters to exclude from the generated value

  • Only available when the field type is a string

Convert to Lower Case

 

Boolean

  • If true, the field's value will be transformed to lowercase

  • Only available when the field type is a string

Convert to ASCII/Latin1

Boolean

  • If true, the field value will be converted to ASCII/Latin1 character set

  • Only available when the field type is a string

Transform Existing Values

Boolean

  • If true, the field's existing values will be the generation rules' starting point.

Creating Conditional Rules

Conditional rules enable additional adjustments when specific conditions occur, such as a user leaving a field blank.

To create a conditional rule, select the Conditional Rule checkbox. Two new dropdown options become available: Condition Type and Conditional Field.

  • Condition Type - Select the criteria that must be met before an action is triggered.

    • Field is blank

    • Field is NOT blank

    • Field equals value

    • Policy is True - If selected, choose a Dynamic Collection.

  • Conditional Field - Select the field to be generated if the condition is met.

    • Dynamic Collection will replace this field if the Condition Type is “Policy is True”.

For example, if you create a rule to generate a username, and you select the Condition Type “Field is blank,” and the Conditional Field “UserName,” and the Event Trigger “Identity Creation,” then later during identity creation, if the “UserName” field is blank (empty), the system will create a username with this Data Generation Rule. However, if the identity created does have a username, the Data Generation Rule will not be triggered.

Mapping Tables

You can configure data generation rules to use a mapping table, to narrow the rule to specific scenarios. To do this, add a lookup to the rule, including the mapping table and the key name.

There are two types of lookups: by value or by reference.

Lookup Type

Function

Syntax

Note

Lookup By Value

Look up a hard-coded table name and key.

lookup:tableName:key

Lookup By Reference

Look up a hard-coded table name using a key from the identity data.

lookupRef:tableName:keyField

keyField is the field in the identity record to be used as the key.

Both types of lookup can be used in a single pattern data generation rule; they are not exclusive.