Message Templates

Message templates are used to specify and format messages that are to be sent to users when various events occur. They can support plain text and HTML formatting, and distribution to both email and SMS services. They are more commonly used within message-based notification based event handlers.

Message Template Object Properties

Table 1.
Property Support Explanation
Scope Account The scoping of this object
Visibility Whether the object supports visibility
Plugins Supports plugins
Extended Config. Whether the object has an extended configuration tab
Scripting Whether the object can be configured using scripting
Enable / Disable Whether the object can be enabled and disabled
Start / Stop Whether the object can be started and stopped
Copy Whether the object can be copied
Export / Import Whether the object can be exported and imported
Delete Whether the object can be deleted
Unique Name Whether the object name must be unique within its scope
Variants Whether the object supports Variants

Creating a New Message Template

1) On the toolbar, click the New option.

2) From the drop down, select Message Template.

3) In the Create new Message Template section, fill in the relevant details such as, name and visibility.

4) Click Save to finalise.

Configuring a Message Template

Once you have created your new message template you must set up a template. The template comprises the content and formatting for your message.

1) Click the Template sub-tab.

2) Click Edit.

3) Edit the details for the message, such as subject, priority, and the message body.

Adding Images

You can add images to your message templates if you wish, such as company logos.

1) Click the Insert/Edit Image icon.

2) In the Insert/edit image pop up, specify the details for your image, and click OK.

Setting an Event Handler for the Message Template

In order to send your message template to a user, you must create an event handler.

1) Create your Event Handler.

2) Click the Configuration sub-tab.

3) In the Configuration sub-tab, click the Edit option.

4) In the Message Template field, select the your message template from the drop down.

5) In the Account field, you can select an account from the drop down. All users in that account will receive the message template you have created. You can select multiple accounts by clicking the Plus icon.

6) In the Sub-Account field, you can select a sub-account from the drop down. All users in that sub-account will receive the message template you have created. You can select multiple sub-accounts by clicking the Plus icon.

7) In the Group field, you can select a group from the drop down. All users in that group will receive the message template you have created. You can select multiple groups by clicking the Plus icon.

8) In the Workspace field, you can select a specific workspace from the drop down. All users in that workspace will then receive the message template you have created. You can select multiple workspaces by clicking the Plus icon.

9) In the User field, you can select a specific user from the drop down. That user will then receive the message template you have created. You can select multiple users by clicking the Plus icon.

10) In the Expression field, you can enter an evaluated expression. You can enter multiple expressions by clicking the Plus icon.

11) In the Subject field, enter a subject for your message.

12) In the Sender field, you can enter an email address for the sender of the message.

13) When you have finished configuring your event handler, click Save to finalise.

14) Click the Enable option to enable your event handler.

Notes:

  • The scripting variables available depend on the context of where the message template is being used.
  • If the message template is being used within an event handler, then the event object is available.

If you wish to embed the icon image for the Flex object you are referencing, you can use the following scripting:

<img src="https://#{event.mioObject.Account.hostname}.@[domainName]/${event.mioObject.iconURL}" alt="" />

In this context we are setting the domain name (@[domainName]) from Flex as a system property.

​Scenario: On ingesting the asset or on modifying the metadata value of an asset, the user should be notified by an asset link.

In order to create the Ooyala Flex asset link to the user in message body, add the following expression in the message body or the message template:

#{httpBaseUrl}/#mio=assets%2Casset%2Cindex.jsp%Fid%3D#{asset.id}

Was this article helpful?