Mail address user

See also: Mail address guest user value resolver

Value resolver – Abstract

Purpose: This value resolver searches the communication information attributes in the address of the logged in or an explicitly selected user for entries for the Communication type 'E-mail' with the specified context and returns a list of the e-mail addresses found.


images/download/attachments/91131936/image2022-1-21_10-48-11-version-1-modificationdate-1642758491260-api-v2.png

The Mail address user value resolver searches the communication information attributes in the address of a given user account for entries of the 'E-mail' (EMAIL) Communication type with the specified 'Context'.

  • If the User parameter refers to a specific user account (see Users), its address (address) field is evaluated.

  • If there is no selection for the User, then the evaluation is performed for the Current user, which may differ from the actual login context within a Run as event action.

  • The input value is irrelevant for this value resolver.

If successful, the return value of the value resolver is a list of strings (string[]) containing all non-empty values of communication information attributes of the searched address whose context (communicationContext) exactly matches (including case sensitivity) the value in the Context communication info parameter.

NOTE◄ Even a single match is returned as an element of a list, so a value resolver (e.g. List item or Rule list resolver) may be needed to directly access the single value. However, this does not matter in the typical environment within a E-Mail event action, since strings or lists of strings are accepted there when addressing e-mails (in the 'Recipient', 'CC' and 'BCC' parameters).

The return value of the resolver, on the other hand, is 'No value' (null) if at least one of the following conditions applies:

  • No selection has been made for the User parameter and in the context of the value resolver, Current user indicates a Guest users. This is the case if all of the following conditions are met:

  • There is a reference to a user account (via the User parameter, the session, or an explicit selection in a Run as event action in the direct or indirect execution context of the value resolver), but does not have a communication information attribute in that user account that satisfies all of the following conditions:

    • The attribute refers to the Communication type 'E-mail' (EMAIL) in the 'Type' (communicationType) field.

    • The attribute refers exactly to the value in the Context parameter of the value resolver in the 'Context field' (communicationContext).

    • The attribute defines any text in the 'Value' field (communicationValue).
      NOTE◄ Whether this text meets formal criteria for an e-mail address is not examined. However, the 'example' below demonstrates how 'supposed e-mail addresses' can be subsequently made feasible.

NOTE◄ The evaluation of the user account address by the Mail address user value resolver is performed without any regard to access restrictions that apply in the execution context (Role of session, Company of session, Run as) for the relevant user account. The value resolver can therefore also access the communication information of users that do not appear, for example, in a Search or overview with the same login data.

Configuration

The Context communication info parameter must be filled with any static text as a required field. The value resolver only returns values from communication information whose 'context' (communicationContext) matches the value specified here exactly (incl. upper/lower case).

NOTE◄ Since the parameter cannot be left 'empty', the value resolver categorically does not consider communication information without context.


The optional User parameter allows a single selection from the Users list. As can be seen in the image, the Combobox element supports a search function.

If no user is selected, then the evaluation refers to the Current user valid in the context of the value resolver, unless it is a guest user.

IMPORTANT◄ During configuration, only users with read-only access at the minimum in the current session appear in the drop-down list. If an existing configuration refers to a user for whom there is no read access in the current session, the label appears as 'hidden – User'. At runtime, read access is irrelevant for the configuration behaviour.

images/download/attachments/91131936/image2022-1-21_10-48-50-version-1-modificationdate-1642758530540-api-v2.png

Example

Association criteria (see Association criteria) checks whether the account of the currently logged in user contains at least one piece of communication information of the 'E-mail' EMAIL Communication type for which the context is 'registration' and whose 'value' (communicationValue) meets the formal criteria for an e-mail address.

Configuration:

The association criteria is configured as shown on the right:

  • The external Entity property rule uses the Is empty comparison type in conjunction with a negation to determine whether the contained concatenation of value resolvers has found an 'acceptable' e-mail address in the logged-in user's account. This evaluation determines whether the association criteria is considered 'passed' or 'failed'.

  • Within the concatenation, the Mail address user value resolver is first used to search for e-mail addresses for the context registration in the address of the logged-in user (the User parameter remains empty). If such communication information exists, the value resolver passes its values to the concatenated successor as a list of strings.

  • The concatenated Rule list resolver checks the 'E-mail addresses' – if a list is passed and not 'no value' (null) – with another Entity property rule, which is shown in more detail in the following section. Since the Resolve all as list option is not selected, the search stops at the first 'match' and returns it, so the external Entity property rule is 'non-empty' and the association criteria is considered to have 'passed'.

  • If no relevant communication information is found, or none of the e-mail addresses entered there passes the formal test described below, the association criteria is considered to have been 'failed'.

NOTE◄ If the Current user in the execution context of the value resolver refers to a guest user (see Guest users), the Mail address user value resolver always returns 'no value' (null). Then the association criteria is considered as 'failed'. So the configured rule implies the check if a 'full' user is considered as Current user.

images/download/attachments/91131936/image2022-1-21_10-46-52-version-1-modificationdate-1642758412454-api-v2.png

The image on the right shows in detail the Rule list resolver configured for the example:

  • On the left side of the Entity property rule, the list value to be checked – the supposed e-mail address – is subjected to a two-step text substitution, which serves to replace a text that is evaluated as an 'acceptable' value for an e-mail address with the randomly chosen string @EMAIL@. The Equals comparison type checks against the same string (see the static text on the right).

  • A special case where this string @EMAIL@ was specified directly in the user account instead of a valid e-mail address is handled by the first Replace text value resolver (left), which replaces this text with an empty string.

  • The concatenated second Replace text value resolver uses a 'regular expression' as Search text, which completely replaces the text with the 'keyword' @EMAIL@ if it matches the desired check criteria for the e-mail.

NOTE◄ The regular expression used as the Search text in the example is deliberately crude and therefore 'fallible' as far as the distinction between acceptable and unacceptable e-mail addresses is concerned. It can be replaced by any custom expression that covers specific requirements more precisely. In particular, control over the characters allowed to be used for the username and domain between the required components ('@' and '.') should be stricter. Currently, only spaces ('\s') and the @ symbol ('@') are excluded.

images/download/attachments/91131936/image2022-1-21_10-52-38-version-1-modificationdate-1642758758839-api-v2.png