Data Generation Rules
This feature is currently available only to customers participating in a Private Preview. If you'd like to participate and 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 a user'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.
Working with Data Generation Rules
-
Search for or navigate to the Configuration page.
-
Select the Data Generation tab.
-
Create a new Rule by clicking Create Rule.
-
Or edit a Rule by selecting an existing one and clicking Edit.
-
-
Use the field descriptions below to create or edit a Rule.
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 |
Data Type |
Note |
---|---|---|---|
Rule Name |
Yes |
Unique; Text |
|
Description |
Yes |
Text |
If selected, an email will be sent to the specified email address whenever an user is added to this user type. |
Field Name |
Yes |
Selection |
The field to which this rule will apply. |
Priority |
No |
Number |
An integer value that defines the priority of this rule relative to other rules. |
Enabled |
No |
Boolean |
If true, the rule is enabled and will be run based on the trigger. |
Conditional Rule |
No |
Boolean |
See Creating Conditional Rules below. |
Triggers |
No |
Selection |
The selected option defines what triggers this rule to run. Trigger options:
|
Rule Type |
No |
Selection |
The type of rule, which can be either script or pattern. |
Script |
No |
Selection |
A script that evaluates the user to return the value for the field. If this type is selected, then the following fields are required.
|
Pattern |
No |
|
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:
|
Characters to Exclude |
No |
Text |
|
Convert to Lower Case |
No |
Boolean |
|
Convert to ASCII/Latin1 |
No |
Boolean |
|
Transform Existing Values |
No |
Boolean |
|
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 “User Creation,” then later during user creation, if the “UserName” field is blank (empty), the system will create a username with this Data Generation Rule. However, if the user created does have a username, the Data Generation Rule will not be triggered.
Mapping Tables
To narrow a rule to apply to only specified scenarios, you can configure the rule to use a mapping table. 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 By Reference |
Look up a hard-coded table name using a key from the user data. |
|
|
Both types of lookup can be used in a single pattern data generation rule; they are not exclusive.
Data Generation Pattern Syntax
A pattern is used to generate data dynamically by grabbing data from entity fields, using lookups (mapping tables), or using keywords like “appshortname” or “increment” to increment for unique fields.
Below, we define general syntax for patterns you can use to generate data.
Fields and values are NOT case-sensitive.
For information on creating and managing a data generation rule, see Data Generation Rules.
General Syntax
Be sure to wrap every substitution with double curly brackets “{{}}”; otherwise, the literal value will be used to generate the data.
{{fieldName}} => grabs value from that field name Literal Value => Literal Value
Keywords
{{appshortname}} => Delinea {{yyyy}} => 2006 //current date year {{yy}} => 06 //current date year {{mm}} => 10 //current date month {{dd}} => 31 //current date day
Field Substitutions
Only the user object type is supported at this time, so only user fields will work. And only Text, LongText fields can be used to generate data.
{{fieldName}} => value for field name {fieldName[0]}} => value for field name at index 0 (must be an array of string values)
Lookup Substitutions
Lookups have three main parts. First, they are prefixed with the keyword “lookup.” Then, they are followed by the mapping table name (spaces must be used if the mapping table name has spaces) and, finally, the row key.
The row key can be followed by an index for mapping tables that have rows with more than one value per row.
{{lookup.tableName.rowKey}} => The value for the given mapping table at the given row. {{lookup.tableName.rowKey[2]}} => The value at index 2 for the given mapping table at the given row.
Lookup Reference Substitutions
Lookup references operate the same as lookups in that they can use mapping tables, but instead of providing an explicit row key value, you can use a field on the entity to grab a row key dynamically. They are also prefixed with lookupref
instead of lookup
.
{{lookupref.tableName.fieldName}} => The value for the given mapping table at the given row. The Row key is generated from the value in fieldName. {{lookupref.tableName.fieldName[2]}} => The value at index 2 for the given mapping table at the given row.
Modifiers
This section lists the modifiers that you can add to your syntax to generate values.
Character Length
You can specify the maximum number of characters you want to grab from a field or lookup value.
In the event that the value is less than the provided character length, it will grab the entire value.
{{fieldName:3}} => Retrieves only the first 3 characters. {{lookup.tableName.rowKey:3}} => Retrieves only the first 3 characters. {{lookup.tableName.fieldName:3}} => Retrieves only the first 3 characters.
Increment
The number provided with the increment substitution will specify the number of places that will be generated. For example, “1” will start at “1” and increment up to “9”, “2” will start at “01” and increment up to “99”, etc.
This will only increment for fields that have the unique property equal to true.
{{increment:3}} => starts at 001 and goes up to 999