Templates

Templates are lists of content templates which can be used in the notifications, like task assignment or reminders. Templates can be used to define a mail notification or generate documents from the scripting environment.

By default, emakin uses predefined templates to send notifications, but mail content can be customized by creating a new template. 

The following steps describe how to create message templates in the Emakin.

  • To open templates, step in the pool. Click "Add New Template" button, and the message templates design pop-up will open.
  • Enter the following information.

Name
Name of a message template.

Subject
Subject of a message template.

Type
Type of a message template.

  • Standart type is utilized to create the content of written type. For more information please refer to the data templates
  • XSLT type is utilized to create the content of xml type.

Click on the "Done" button, edit and details button will appear below the form name. Details button is used for designing a message content.

Standart Type:

If standart type is chosen, content area will be opened on the same page. Message template consists from the text and the special field. 

We will analyse the following screen content:

  • Dear is message of initiation word.
  • Identity is a field on the form. We want to bring the identity data from the form, into the message. Before we find to identity under which title. 
  • Owner is the title of an identity.
  • Start with two curly braces, enter the "Owner" name, and add a slash, then enter the "Identity" name, and add two curly braces.



  • Click on the html button, and the message template text will transform to the html format. 



  • Click Details button under the form name to close the window.

When the process runs, message will go to the users' e-mail address. 

Example message in an e-mail:

XSLT Type:

If XSLT type is chosen, content area will be opened on the same page. Message template consists of xml content.

You can use the default templates, or create the new templates.

Defined templates can also be used in scripting. For more information please refer to the $Templates page.

Default Templates

By default, emakin uses the following templates which are stored in the "configuration/messagetemplates.xml" file:

Task Notification

<html>
<body style="margin:0; padding:0">
 <div style="margin:1em">
  <p><b>{{ $Recipients }}</b>,</p>
  <p>You have a new task named {{ $WorkItem.Caption }}.</p>
  <p>
   <a style="display:inline-block; padding:5px; border:outset 1px; background-color: #D7DEF0; text-decoration:none;" href="{{ $DomainUrl }}/app/?/workitem/{{ $WorkItem.Id }}">{{ $WorkItem.Caption }}</a>
  </p>
  <p>{{ $WorkItem.Instructions }}</p>
  <p><u>Details</u>
   <br></br>
   <b>Form number</b> {{ $Instance.Number }},<br></br>
   {{ if $WorkItem.DeadlineDate then <b>Deadline date</b> {{ $WorkItem.DeadlineDate }} }}
  </p>
 </div>
 <div style="margin:0 0 0 0; padding:0.5em 0 0.5em 1em;background-color:#666">
  <a href="{{ $DomainUrl }}/">
   <img src="{{ $LogoUrl }}" border="0"></img>
  </a>
 </div>
</body>
</html>

First Reminder

<html>
<body style="margin:0; padding:0">
 <div style="margin:1em">
  <p><b>{{ $Recipients }}</b>,</p>
  <p>{{ $WorkItem.Caption }} still waiting in your task list. Please review.</p>
  <p>
   <a style="display:inline-block; padding:5px; border:outset 1px; background-color: #D7DEF0; text-decoration:none;" href="{{ $DomainUrl }}/app/?/workitem/{{ $WorkItem.Id }}">{{ $WorkItem.Caption }}</a>
  </p>
  <p>{{ $WorkItem.Instructions }}</p>
  <p><u>Details</u>
   <br></br>
   <b>Form number</b> {{ $Instance.Number }},<br></br>
   {{ if $WorkItem.DeadlineDate then <b>Deadline date</b> {{ $WorkItem.DeadlineDate }} }}
  </p>
 </div>
 <div style="margin:0 0 0 0; padding:0.5em 0 0.5em 1em;background-color:#666">
  <a href="{{ $DomainUrl }}/">
   <img src="{{ $LogoUrl }}" border="0"></img>
  </a>
 </div>
</body>
</html>

Repeating Reminder

<html>
<body style="margin:0; padding:0">
 <div style="margin:1em">
  <p><b>{{ $Recipients }}</b>,</p>
  <p>{{ $WorkItem.Caption }} still waiting in your task list. Please review.</p>
  <p>
   <a style="display:inline-block; padding:5px; border:outset 1px; background-color: #D7DEF0; text-decoration:none;" href="{{ $DomainUrl }}/app/?/workitem/{{ $WorkItem.Id }}">{{ $WorkItem.Caption }}</a>
  </p>
  <p>{{ $WorkItem.Instructions }}</p>
  <p><u>Details</u>
   <br></br>
   <b>Form number</b> {{ $Instance.Number }},<br></br>
   {{ if $WorkItem.DeadlineDate then <b>Deadline date</b> {{ $WorkItem.DeadlineDate }} }}
</p>
 </div>
 <div style="margin:0 0 0 0; padding:0.5em 0 0.5em 1em;background-color:#666">
  <a href="{{ $DomainUrl }}/">
   <img src="{{ $LogoUrl }}" border="0"></img>
  </a>
 </div>
</body>
</html>

Deadline

<html>
<body style="margin:0; padding:0">
 <div style="margin:1em">
  <p><b>{{ $Recipients }}</b>,</p>
  <p>Your {{ $WorkItem.Caption }} task is deadlined and automatically closed.</p>
  <p>
   <a style="display:inline-block; padding:5px; border:outset 1px; background-color: #D7DEF0; text-decoration:none;" href="{{ $DomainUrl }}/app/?/workitem/{{ $WorkItem.Id }}">{{ $WorkItem.Caption }}</a>
  </p>
  <p><u>Details</u>
   <br></br>
   <b>Form number</b> {{ $Instance.Number }},<br></br>
  </p>
 </div>
 <div style="margin:0 0 0 0; padding:0.5em 0 0.5em 1em;background-color:#666">
  <a href="{{ $DomainUrl }}/">
   <img src="{{ $LogoUrl }}" border="0"></img>
  </a>
 </div>
</body>
</html>

Watch

<html>
<body style="margin:0; padding:0">
 <div style="margin:1em">
  <p><b>{{ $Recipients }}</b>,</p>
  <p>A new {{ $WorkItem.Caption }} task assigned to {{ $AssignedTo }}. This email is been sent for your information and you can find task in your watch list later.</p>
  <p>
   <a style="display:inline-block; padding:5px; border:outset 1px; background-color: #D7DEF0; text-decoration:none;" href="{{ $DomainUrl }}/app/?/workitem/{{ $WorkItem.Id }}">{{ $WorkItem.Caption }}</a>
  </p>
  <p>{{ $WorkItem.Instructions }}</p>
  <p><u>Details</u>
   <br></br>
   <b>Form number</b> {{ $Instance.Number }},<br></br>
   {{ if $WorkItem.DeadlineDate then <b>Deadline date</b> {{ $WorkItem.DeadlineDate }} }}
  </p>
 </div>
 <div style="margin:0 0 0 0; padding:0.5em 0 0.5em 1em;background-color:#666">
  <a href="{{ $DomainUrl }}/">
   <img src="{{ $LogoUrl }}" border="0"></img>
  </a>
 </div>
</body>
</html>

Because of mail client notifications do not include any external link (except images) to resources like style sheets or scripts. Otherwise mail client may refuse to load resources because of security and privacy.

XSLT

Uses industry standard XSLT format, but requires some technical skills. For more information please refer to https://www.google.com.tr/search?q=xslt



Copyright © 2010 - 2023 Emakin. All rights reserved.