FI Finnish
SE Swedish
FR French
PL Polish
DE German
US English (US)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

English (US)
FI Finnish
SE Swedish
FR French
PL Polish
DE German
US English (US)
  • Log in
  • Home
  • Platform
  • ESM
  • Other Technical ESM Documentation
  • Handler Documentation

Handler - EntityStateMail

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Service Management
    Matrix42 Professional Solution Matrix42 Core Solution Enterprise Service Management Matrix42 Intelligence
  • Identity Governance and Administration (IGA)
    IGA overview IGA solution library
  • Platform
    ESM ESS2 ESS Efecte Chat for Service Management Integrations Add-ons
  • Release Notes for M42 Professional, IGA, Conversational AI
    2026.1 2025.3 2025.2 2025.1 2024.2 2024.1 2023.4 2023.3 2023.2 2023.1 2022.4 2022.3 Release Information and Policies
  • Other Material
    Terms & Documentation Guidelines Accessibility Statements
  • Services
+ More
    • Service Management

    • Identity Governance and Administration (IGA)

    • Platform

    • Release Notes for M42 Professional, IGA, Conversational AI

    • Other Material

    • Services

Handler - EntityStateMail

EntityStateMail handler generates the user interface for viewing and sending e-mail. Typically, EntityStateMail handler is used in help desk incident templates. The format of the mail may depend on a selected mail template. This makes it possible to send differently formatted mails depending on receiver.

In order to send e-mail from Matrix42, you must define the mail-server settings in Platform settings.

Before starting configuration, give a code for the attribute. Otherwise the saving will fail. Do not reuse the attribute between several templates.

 

Configuring of this handler is different from other handlers. Most settings are configured in a separate configuration view, which opens up from the button in the metadata editor. With this mail template configuration, you can specify information that the EntityStateMail handler includes in the message automatically when opening a new message for composition or when replying to a received message. You can define, for example, a default mail subject, as well as recipient and sender information. In addition, you can also denote attributes whose values you want to include from the parent data card in the mail.

The following picture displays the appearance of an attribute with EntityStateMail handler. The second picture illustrates an example of an e-mail message based on a mail template which includes information that is denoted in the attribute metadata.

An attribute with EntityStateMail handler:

E-mail generated with the EntityStateMail handler:

You can insert email recipient addresses by typing to the 'To' field. Addresses are fetched from data cards based on configurations in platform settings.

By default listeners and handlers will be run after sending email from data card view. See metadata how to change this

Templates and attributes where the data is retrieved are defined by platform setting mail.addressbook.codes.

 

The following tables provide information on the attribute settings and metadata requirements for EntityStateMail handler. In addition, the table provides proposals for possible metadata values.

Table 1.  Attribute Settings

Handler name Datatype
EntityStateMail External reference

Table 2.  Optional Attribute Metadata

Name Value Description
Mail templates attribute attribute_code

Attribute code of the attribute, which defines the list of mail templates used for pre-filling an email. If this settings is configured, mail template selection is done in this separate attribute. Note that it's possible to send email from data card view mode, but it's not possible to select the template. So mails sent in view mode use the value in the attribute. If the value is empty, the default mail template configuration is used.

Attribute can be of any data type. Recommended data types are static string and reference. The values in the attribute Mail templates attribute must match the names of the mail template configurations in the mail template editor. See below.

If this setting is not configured (default), mail template selection is done on the right side of the 'New', 'Reply' or 'Reply to all' buttons.

Uploaded attachments attribute attribute_code Attribute code of the attribute whose value is to be updated, when an e-mail containing file attachments is sent. Attribute must be of data type externalReference. Attribute must be configured to use FileUpload.
Don't run listeners/handlers [boolean]

Determines if listeners and handlers should be skipped and should not run after sending email from data card view. Sent email and attachments will still be added to the data card even if listeners and handlers will be skipped.

If the setting is not configured (default), listeners and handlers will not be skipped and will be run when email is sent from data card view.

Show as tabs [boolean]

Attributes using handlers with the metadata "Show as tabs" are always displayed at the top of the class in the new Agent UI (2023) regardless of the ranking.

NOTE: This setting applies only for the new Agent UI (2023)

Determines whether the attribute with the EntityStateMail handler is shown with tab layout.

The following criteria determines whether tabs are shown:

  • There must be at least one attribute with the EntityStateMail handler and one attribute with the Worklog handler, or two or more EntityStateMail handlers or two or more Worklog handlers in the same class.
  • The attributes must have the showAsTabs setting enabled.

The default value of showAsTabs is true.

If the value of showAsTabs is false, the attributes are shown as any other attributes.

In case there is any attribute in between two or more attributes shown on tabs (attributes with EntityStateMail and Worklog handlers), the attribute is shown below the tabs.

The following picture describes EntityStateMail handler's mail template configuration screen. (To get to this screen, select the metadata and click the Edit button):

In first row, you can select a mail template to be edited. If Mail templates attribute is in use, the name must match with the values of the attribute, which was defined in meta data named Mail templates attribute. For creating a new configuration, select an empty slot for name. Then give a name for configuration. Finally press Save. If you want to change the name of a configuration, first select the wanted configuration. After that, write a new name in the "rename" field. At last, save the configuration. Now you can configure the mail template.

Next you will configure the outlook of the outgoing mail. You can define values for following fields and selections:

  • From (sender of the mail)
  • From field editable (defines whether the contents of the From field can be edited when user is sending the message)
  • To (receiver(s) of the mail)
  • Cc (receiver(s) of a copy of the mail)
  • Bcc (receiver(s) of a blind copy of the mail)
  • Subject (title for the mail)
  • Message (body contents of the mail)
  • Attachment

You can choose attachments to be included in the outgoing mail. You can either upload a new file to be included, or add a reference to a file that has already been uploaded to Efecte. The reference has to contain a name of a file, that is located in the upload directory of Efecte.

  • An example: add an attribute with FileUpload handler to the class holding the attribute with EntityStateMail handler. Set the attribute code to job_attachments. Now in EntityStateMail handlers special configuration screen add an attachment reference with value $job_attachments$ and click "Add reference". After this, when you create a new mail using the configuration, files found in the FileUpload handler created above will also be included in the mail as attachments.

Normally when you send an a-mail with attachments, the attached files are removed from the server as soon as the e-mail gets sent. With Uploaded attachments attribute meta data you can choose to save the attachments in an attribute of your choice.

It is only possible to save attachments that where explicitly added by the user. This does not affect attachments added with mail template configuration. The attachments configured in mail template are also never removed automatically.

 
  • An example: add an attribute with FileUpload handler to the class holding the attribute with EntityStateMail handler. Set the attribute code for Uploaded attachments attribute to saved_attachments. After this, when you create a new mail using the configuration, files that you explicitly added to the mail will be stored as values of the attribute with code saved_attachments.

All the fields listed above may contain hard coded text and values of the attributes of the data card. The values of the data card is entered as $attribute_code$. The fields can also contain values, which are retrieved from the referred data card.

  • An example: let's assume that the template contains field $client$. The template of $client$ contains field $email$. You can get the client's email by using value $client:email$. Or, if the $client$ template contains reference attribute $contact_user$, you can use value $client:contact_user:email$. 

If you need some values to be URL encoded, you may use $[URL]attribute_code$. In addition to URL encoding, it makes static values to be printed as ID-numbers of the selected value.

In the last row of configuration view, you can select which attribute is used as Tracking attribute. This attribute is used by MailTask to match incoming reply-mails to existing data cards. Then you can select, whether the original mail(s) is appended to reply. And with the last option you can select whether the outgoing mail format is plain text or html. If your mail template contains HTML tags, select "html". Otherwise select "plain".

When user is viewing an email potential html part is shown. If html part is not found plain text part will be displayed. Following table provides information about Platform Setting affecting the mail viewing.

Table 3.  Platform Settings

Name Value Description

mail.prefer.html

(deprecated)

[true | false]

NOTE: This setting is not supported in ESM 2015 or newer releases. Remove the setting if it exists.

If the value is set to false, plain text part is the preferred one. If plain text is not found the html part will be shown but all html brackets will be encoded. If value is set to true, potential html part will be shown. Tags and attributes are filtered according to settings described below. Default is true.

mail.html.allowed.tags [list of html tags separated by comma (,)] Allowed html tags in mail. Other tags will be removed because of security reasons.
mail.html.allowed.attributes [list of html tags separated by comma (,)] Allowed html attributes in mail. Other tags will be removed because of security reasons.

You can find data cards containing read or unread mails by using the Advanced search conditions. Add a search condition for attribute with the EntityStateMail handler and you see the options for filtering data cards based on read or unread mails.

 

handler entitystatemail entity state mail

Was this article helpful?

Yes
No
Give feedback about this article

Table of Contents

Related Articles

  • Attribute Metadata - ShowCode
  • Attribute Metadata - Related Data Card Search
  • Attribute Metadata - showButtonNewEntity / hideButtonSearch

Copyright 2026 – Matrix42 Professional.

Matrix42 homepage


Knowledge Base Software powered by Helpjuice

0
0
Expand