Mail address company attribute
See also: Mail address address attribute value resolver
Value resolver – Abstract
Purpose: This value resolver searches the communication information attributes of the address of a 'Company and address attribute' specified via the Company type parameter for entries for the Communication type 'E-mail' with the specified Context and returns a list of the e-mail addresses found.
The Mail address company attribute value resolver searches the communication information attributes of the company address (company.address) for a 'Company and address attribute' specified by the Company type parameter for entries of the 'E-mail' (EMAIL) Communication type with the specified Context.
The input value expects an entity of the 'Attribute owners' group type, which supports 'Company and address attributes'.
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 exactly matches (including case sensitivity) the value in the Context 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 one of the following conditions applies:
The input value does not support 'Company and address attributes' according to the type.
The input value does not have a 'Company and address attribute' for the specified Company type.
A 'Company and address attribute' of the specified Company type was found, but at least one of the following conditions applies:
The 'Company' (company) field does not refer to a company.
►NOTE◄ The same attribute possibly refers to an address (address field) instead. Evaluation of this address (address) then enables the Mail address address attribute value resolver.The company address does not have any communication information attributes that fulfill all of the following conditions:
The attribute refers to the 'E-mail' (EMAIL) Communication type 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.
►NOTE◄ The evaluation of a company address by the Mail address company attribute 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 company account. The value resolver can therefore also access the communication information of Company accounts 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 Company type parameter requires a single selection based on the dynamic enumeration Company type as a required field. As shown in the image, the Combobox element supports a search function. ►IMPORTANT◄ If Dynamic enum filters are applicable for the enumeration in question in the context of a session, they also restrict the selection for the Company type in the course of configuration. However, Dynamic enum filters have no influence on the evaluation of the value resolver at runtime. |
|
Example
The bill-to party (Company type INV) specified within the order via a 'Company and address attribute' is notified by e-mail about selected working state changes for a business object of the 'Orders' type (see Orders).
As the bill-to party for orders, only Company accounts listed as company accounts in Lobster Data Platform / Orchestration should be used. The 'Company and address attribute' can therefore only be expressed as a 'Company attribute'.
Notifications for the order status relevant to the 'Bill-to party' are only sent to e-mail addresses specified in the context 'INV' (for 'invoice') specified by the address in the input form:
The screenshot shows the Communication info specified in the company account of 'ZWORX Ltd'.
Each of the three stored e-mail addresses refers to a specific Context.
However, all communication information attributes refer to the same Value. Obviously, the same address should always be used regardless of the Context.
Configuration:
In accordance with requirements, a notification is sent to all addresses stored for the 'INV' and 'AOB' contexts. This is guaranteed with the following configuration within a E-Mail event action:
In the example of 'ZWORX Ltd.', the same address is assigned as the recipient in each case with the address data shown above. Even if duplicates in the recipient list are typically ignored by the mail system, at least in the e-mail object from Lobster Data Platform / Orchestration (see E-mails), the same address appears multiple times if the e-mail is saved:
|
|
The variant of the configuration shown on the right systematically avoids the problem of any duplication:
►NOTE◄ The Value to collect parameter is not required here, since the entire entry is included in the results list.. Runtime example:
|
|