Attributes - Group Identity

currentUserGroup - Group Identity Attributes

String Operators widely used with name attributes

The basic range of string operations serves to resolve the string attribute into a boolean outcome. These operators are inserted after the string attribute using the (.) notation e.g. currentUserGroup.name.contains("Corporate")

OperatorDefinition
containsUsed to see if the string contains the defined value
matchesThis is used to perform regular expression-based matching on the string
existsSome proper value exists for this string (i.e. source passed a value that was not an empty string)
notExistsThe string is either Null or Empty
isNullchecks if the string is Null i.e. it was not passed from the source
isNotNullchecks if the string is NOT Null

Name

Use the name attribute to check the user group's name. This allows you to target specific groups based on their name or check if the name contains certain substrings.

Purpose

Target users based on their user group name for personalized messaging or group-specific campaigns.

Usage

  • Profile: currentUserGroup()
  • Attribute: name
  • Data type: STRING

Supported operators

You can use the following string operators with the name attribute:

OperatorDefinition
containsUsed to see if the string contains the defined value
matchesUsed to perform regular expression-based matching on the string
existsSome proper value exists for this string (i.e. source passed a value that was not an empty string)
notExistsThe string is either Null or Empty
isNullChecks if the string is Null i.e. it was not passed from the source
isNotNullChecks if the string is NOT Null
==Returns true if both operands have the same value

Syntax

currentUserGroup.name[Operator][Value]

Examples

Example 1: Check if the user group name has substring "Corp".
currentUserGroup.name.contains("Corp")
Example 2: Check if the user group name is "Enterprise Team"
:-----------------------------------------------------------
currentUserGroup.name == "Enterprise Team"
Example 3: Check if the user group name contains "family"
:--------------------------------------------------------
currentUserGroup.name.contains("family")

External ID (externalId)

Use the externalId attribute to check the user group's external identifier. This is useful for targeting user groups based on their external system identifiers.

Purpose

Target user groups based on their external identifiers for integration with external systems or specific group targeting.

Usage

  • Profile: currentUserGroup()
  • Attribute: externalId
  • Data type: INTEGER/ALPHANUMERIC

Supported operators

You can use the following operators with the externalId attribute:

OperatorDefinition
containsUsed to see if the string contains the defined value
existsSome proper value exists for this string
isEmptySimilar to notExists
isNotNullChecks if the string is NOT Null
isNullChecks if the string is Null
notExistsThe string is either Null or Empty
==Returns true if both operands have the same value
!=Returns true if the operands don't have the same value
matchesUsed to perform regular expression based matching on the string

Syntax

currentUserGroup.externalId[Operator][Value]

Examples

Example 1: Check if the current user group's external ID contains a string "ENT"
currentUserGroup.externalId.contains("ENT")
Example 2: Check if the current user group external ID exists
:------------------------------------------------------------
currentUserGroup.externalId.exists()
Example 3: Check if the current user group external ID equals "CORP_456"
:------------------------------------------------------------------------
currentUserGroup.externalId == "CORP_456"

Created Date (createdDate)

Use the createdDate attribute to check when the user group was created. This is useful for targeting groups based on their creation timeline or age.

Purpose

Target user groups based on when they were created for time-sensitive campaigns or lifecycle-based messaging.

Usage

  • Profile: currentUserGroup()
  • Attribute: createdDate
  • Data type: DATE

Supported sub-attributes

You can use the following date sub-attributes with the createdDate attribute:

Sub-AttributeDefinition
isAfterChecks if the creation date is after a specified date and time
isBeforeChecks if the creation date is before a specified date and time
isNotNullChecks if the creation date has a value (is not null)
isNullChecks if the creation date is null
yearReturns the year of the creation date
monthReturns the month of the creation date
dayReturns the day of week of the creation date
dayOfMonthReturns the day of the month of the creation date
isWeekdayChecks if the creation date falls on a weekday
isWeekendChecks if the creation date falls on a weekend
daysDiffReturns the difference in days between creation date and another date
daysDiffFromStringReturns the difference in days between creation date and a date string
minutesDiffReturns the difference in minutes between creation date and another date
dateDiffReturns the difference between creation date and another date
isHourBetweenChecks if the creation date's hour falls between specified hours
isTimeBetweenChecks if the creation date's time falls between specified times
isValidChecks if the creation date is a valid date

Syntax

currentUserGroup.createdDate[Sub-Attribute][Parameters]

Examples

Example 1: Check if the user group was created after May 1st, 2025
currentUserGroup.createdDate.isAfter(2025,5,1,0,0,0)
Example 2: Check if the user group was created in 2024
:--------------------------------------------------------
currentUserGroup.createdDate.year == 2024
Example 3: Check if the user group was created on a weekend
:-----------------------------------------------------------
currentUserGroup.createdDate.isWeekend(true)
Example 4: Check if the user group was created more than 30 days ago
:--------------------------------------------------------------------
currentUserGroup.createdDate.daysDiff(2025,5,27) > 30

Usage Examples - Combined Conditions

Example 1: Write a rule to check if the user group name contains "Corporate" and was created after May 1, 2024
Expression: currentUserGroup.name.contains("Corporate") && currentUserGroup.createdDate.isAfter(2024,5,1,0,0,0)
Example 2: Write a rule to check if the user group has an external ID and the name is not null
Expression: currentUserGroup.externalId.exists() && currentUserGroup.name.isNotNull(true)