Mail address address attribute

See also: Company Attribute Mail Adress 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.


images/download/attachments/91131789/image2022-1-19_19-8-12-version-1-modificationdate-1642615692844-api-v2.png

The Address Attribute Mail Address value resolver searches the communication information attributes of the address (address) of 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 type belonging to the 'Attribute owners' group and 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 Lists Resolver) may be needed to directly access the single value. However, this does not matter in the typical environment within a Send 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 'Address' (address) field does not refer to an address.
      NOTE◄ Possibly the same attribute refers to a company account (company field) instead. Evaluation of the company address (company.address) then enables the Company Attribute Mail Adress value resolver.

    • The address does not have a communication information attribute that fulfills 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.

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 Types 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. Dynamic enum filters have no influence on the evaluation of the value resolver at runtime.

images/download/attachments/91131789/image2022-1-19_19-12-56-version-1-modificationdate-1642615976262-api-v2.png

Example

The bill-to party (Company Types 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 a bill-to party for orders, it should be possible to use address book entries as well as user-entered addresses in addition to the company accounts managed in Lobster Data Platform / Orchestration as Company Accounts. The 'Company and address attribute' can also be alternatively or simultaneously expressed as a 'Company attribute' or as an 'Address attribute'. When searching for mail addresses to notify 'Bill-to party', relevant information in the address field takes precedence over any competing information in the company address (company.address).

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:

images/download/attachments/91131789/image2022-1-19_19-17-10-version-1-modificationdate-1642616230600-api-v2.png

  • The company selection for the Bill-to party in the example differs from the information input for the Bill-to party address (directly below it).

  • Under the Communication info within the Bill-to party address, two entries with the 'E-Mail' type are present. Only the second entry refers to the Context 'INV' is relevant for this example.

  • Whether e-mail addresses for the context 'INV' are stored in the 'ZWORX Ltd.' company account specified as the Bill-to party is not apparent from the form. However, in our context, these are only taken into account if the Bill-to party Address does not specify a mail address for the 'INV' context.

Configuration:

Within an event handling that reacts to the relevant working state changes (see Working State (Event)) and uses a Check type to ensure that the input value is an entity of the 'Order' type, the section 'Action on passed rule' is configured as shown on the right:

  • The main subject of event handling is the Send Mail event action, which is not described in detail here apart from the Recipient tab selected in the image.

  • Mail recipients are determined primarily by the Address Attribute Mail Address, which searches for e-mail addresses for the context 'INV' specified in the Context communication info based on the selection for the Company Types of the 'Bill-to party'.

  • The Default value resolver that follows per concatenation below is only evaluated if no relevant matches are found in the address attribute. Only then is the Company Attribute Mail Adress value resolver (with identical parameters) executed to check whether the company address of a company selected as 'Bill-to party' provides suitable communication information.

    NOTE◄ The variable entity is required here to establish the reference to the order as an input value for the Company Attribute Mail Adress value resolver. Otherwise, the default value passes on the 'No value' input value.

images/download/attachments/91131789/image2022-1-19_19-18-40-version-1-modificationdate-1642616320361-api-v2.png

Runtime example:

As long as the Bill-to party address in the order, as seen in the screenshot above, provides an e-mail address for the 'INV' context evaluated here, it will be used as the 'Recipient' when event handling responds to a 'notifiable' working state change for the purchase order (here: 'CONFIRMED').

  • The screenshot on the right shows the recipient address ('To') in the Preview view for E-mails after the order has been confirmed.

images/download/attachments/91131789/image2022-1-19_19-19-28-version-1-modificationdate-1642616368582-api-v2.png

After sending the order confirmation, the e-mail address specified in the Bill-to party address is now removed for the 'INV' context, e.g. because it was detected as incorrect after being sent, without any suggested corrections being available.

At the next 'notifiable' working state change (here: 'Dispatch triggered'), the event handling initially searches the mail address and then searches the company address for the Bill-to party 'ZWORX Ltd.' for the 'INV' context.

  • As the screenshot on the right shows, there is obviously an address stored there.

images/download/attachments/91131789/image2022-1-19_19-19-59-version-1-modificationdate-1642616399127-api-v2.png