Message template

From VYRE

Jump to: navigation, search

Contents

Introduction

A message template is used to send messages to users internally and/or externally. External messages are sent to the users email account (i.e., outlook, gmail). While internal messages are sent to the users internal unify inbox, which can only be accessed through Unify. Messages can be sent due to direct user action, or at pre-defined times( using a scheduler). Message templates can be found in the publishing module under Messages.

Message Template has five sections which are divide into five tabs:

  • Message Template: The core information of Message Template
  • Recipients: The recipients of the message.
  • Reply To: The reply to users.
  • Linked Items/Users: Define custom variables (generated variables) that will be used in the Message Template tab.
  • Variables:List of available variables.

Message Template Section

Message template settings

The Message Template tab is used to configure the core information of a message template.

Message Template related fields

  • Title: Descriptive name of the Message Template.
  • Type: There is three types of Message Templates:
  1. Content related: Item based Message Template. You must specify:
    • Content Store: the store/collection schema the message template will be used for.
  2. User related: User based Message Template. You must specify:
    • User Realm: the realm the users will belong to.
  3. Static: Others, does not rely on an existing item or user. It can be triggered directly from the message template by clicking the Send button.

Email related fields

All of the email related fields run through a velocity template and have access to all the velocity variables(listed in the Variables Tab). Below is a list of email specific fields:

  • Subject: The subject of the message.
  • Sender name: The message sender name.
  • Sender address: The message sender email address.
  • Send HTML: If enabled sends the email as an HTML else the message is sent as plain text. If:
    • true: uses the HTML body field as the email body
    • false:uses the Plain text message as the email body.
  • Plain text message: The contents of the message as plain text.
  • HTML body: The contents of the message as HTML. The WYSIWYG editor is used add/modify HTML.

Recipients Section

When creating a recipient, or editing them at a later point, there may be more options depending on the type. For each message template recipients are defined, various different types are possible, depending on what type of message is being sent. Current recipients can be viewed, edited and deleted in the Recipients tab, clicking on Add recipient option in the top navigation creates a new recipient.

The recipients tab has three global settings that applies to all recipient in the message template:

  • User recipients Locale: By default, the locale of a message template is determined by the site it was triggered from. If this option is enabled, the locale is determined by the locale of the recipient that is receiving the message. That locale can be edited on a user by user basis by editing their User profile.
  • Ignore Item/User permission when sending message: users have view access to linked items/users that they do not have permission for.
  • Send to inactive users: When this option is checked, the message will be sent to all users, regardless of their state. When this is unchecked, inactive users will be ignored and will not receive a message.


The first screen displays three options:

  • Title: An descriptive title of the recipient (internal use).
  • Type: recipient type, When adding a new recipient, a list of different types is displayed. Some of these only display for certain types of message templates. Once added there may be further edit options.
  • User Realm: This chooses the realm which the user being sent the message belongs to (not for static email addresses).

Type

Below is a table that list of the recipients type available in Message Template.

Recipient Type Message Type User Inbox Description
Static user group All Y A list of users from a user group.
Profile Groups All Y A list of users from a profile group.
User Search All Y A search is defined in the edit mode of this recipient. All users that are returned by that search will receive the message. since 4.7.1
Email address All N A static email address, i.e. eftar.miah@vyre.com. Note the email address does not have to correspond to an user.
Dynamic variable static N A variable name, that will be replaced dynamically with arguments passed to the message template before sending the message. since 4.6.1
Current user content, users Y The user who triggered the message, either through an item or user portlet.
user_property user N The email address is obtained from a User Profile Property. i.e. from the users home or work email address.
creator_user user Y The user who created or edited the user. Used in the User Edit Portlet.
deleted_user user N The user who has been deleted. Applicable, only when an user is deleted via the User Edit Portlet. Deleted users 'email' and 'fullname' are only available.
Linked users content Y A list of linked users from a link definition path.
Item e-mail attribute content N An attribute from the store which has been set to contain an email address.
Item multiple e-mail attribute content N An attribute from the store which has been set to contain a list of comma separated email addresses.since 4.6.1
Translation group content Y A list of users from a translation group.

Reply-To Section

Reply-to was introduced in [Unify 4.6.1]. The interface is the same as Recipients, but with a limited set of types. The Types that available are:

  • static email address
  • static user group
  • profile group
  • current user
  • linked users
  • item attribute
  • translation group

Linked users/items Section

If the message template is content related the linked users/items tab will appear. This allows linked users and items to be used in the message. The tab displays a list of all linked lists already set up, these can be edited and deleted.

Creating

Clicking Add linked list will allow a new list of linked users or items to be created. The following options need to be chosen:

  • Variable name: This will be used in the message.
  • Type: A choice of four types:
    • Item link: Items linked to the item the message is being sent for.
    • User link: Users linked to the item the message is being sent for.
    • Item creator: The user who created the item.
    • Item last modifier: The user who last modified the item.
    • Global Xml Configutaion: global xml config is used to return a group of data that can be transformed by xsl. behaves similar to item display portlet.

Depending on the option chosen, different secondary options will appear:

Item link properties

For linked lists of items:

  • Link Definitions: For which link definition to display linked items.
  • Extensible Stylesheet Language (XSL) File: Which XSL to use to render the XML returned. The XML will have the same form as that returned by the item search results portlet.
  • Load items that are linked to the items in the list: Loads linked items to the linked items into the XML.
  • Load users that are linked to the items in the list: Loads linked users to the linked items into the XML.
  • Load the content and metadata of items that are linked to the items in the list: Loads the full set of attributes of items to the linked items into the XML. This will only work if the linked items to the linked items are selected to be returned.

User link properties

For linked list of users:

  • User Link Definitions: For which link definition to display linked users.
  • Extensible Stylesheet Language (XSL) File: Which XSL to use to render the XML returned. The XML will have the same form as that returned by the user list portlet.

For item creator and modifier:

  • Extensible Stylesheet Language (XSL) File: Which XSL to use to render the XML returned. The XML will have the same form as that returned by the user display portlet.

Usage

Having set up a linked list, and formatted it using XSL, it can be used in the message body, subject, sender name and sender address by using the variable name that was set up, for example $linkedItems in the message body.

Variables Tab

The variables tab contains a list of variables which can be used in the message body, subject, sender name and sender address. These variables change depending on the type of message, for example content related messages will have variables containing information about the content item the message is being sent for, its creator and last modifier. A user related message will have variables containing information about the user. Any recipients added to the message may also add variables, for example once a recipient is added the recipient name can be used in the html body, for example starting the email with Dear $lr_123_fullname.

Triggering messages

Item portlets

Messages can be triggered by editing items. Depending on whether an item is created, edited or deleted a different message can be sent.

Item edit portlet

Template:Rellink

In an item edit portlet a message template can be selected to be sent when an item is saved (created or edited), or when an item is deleted. Ticking the checkbox next to the appropriate option in the portlets edit mode will trigger a message to be sent when the action occurs, with the message templates to select being chosen from all content related message templates assigned to the same store as the portlet.

Item edit using template portlet

Message settings access via portlet

Template:Rellink

Portlet settings

Item edit using templates portlets have the similar options to the item edit portlet, but with the difference that there are seperate options for creating and editing items, where seperate message templates can be defined for each action, or messages sent on only one of them.

Content template

Template:Rellink From version 4.4 it will be possible to define message templates to be used in the content template rather than just in the portlet. This will allow a much more fine-grained approach, with the correct use of JSTL allowing for choices or multiple messages to be sent depending on item attributes or user actions.

User portlets

Template:Rellink Both the user create portlet and the user edit portlet have the same options. The only difference is that the user create portlet sends the message when a new user is created, and the user edit portlet when the user is edited. Both portlets will only allow user related message templates to be selected.

There is a checkbox Send message on submit which specifies if messages will be sent when the user is being created/edited. The first dropdown displays selects a message template to be sent to the user who has been created/edited, and will pass their information as to the message template as the current user which can be used by variables in the text, and as a recipient. This for example could be used to send a creation confirmation message.

The second dropdown lists a message template which can be sent to another user, or multiple users. This for example could be used to inform an administrator that a user account has been created.

If you need to send the password field in the message, the variable is $user_password.

Schedulers

Template:Rellink Schedulers can be used to send a message at a specific time, rather than due to a user action. Items returned from a saved search, or users in a profile group will trigger a message or messages to be sent. This could for example be used to sent an email for all items due to be published in the next day. Another example would be to send all users who have not logged in, in the last 6 months, a reminder.

NOTE: if your scheduler is based on saved user search, make sure message template users current user as a recipient, otherwise email will be sent to each user as many times as there are users in the group. See UNF-4985 for more info.

Sending Messages

Messages will always be sent to the user's internal inbox, which can be viewed in the Unify backend in the my desktop module, and on sites using the user inbox portlet.

The second option is sending messages by email. If the user profile has the Receive email checkbox checked they will receive any messages by email as well as the inbox. This option can be set when a user is created using user create portlet or when editing a user through user edit portlet. In the backend there is also an option on the user profile in the users and groups module.

Personal tools