Designing email notice templates

Last update 2020-10-08

This is an advanced topic for PDXpert 14.0 and later. You must have administrator permissions to add and delete email templates. If you want to replace email content, you should know basic features of the HTML language.

Although you can use a plain text editor like Windows Notepad or Notepad++, there's also a wide variety of free and commercial HTML editors available. The HTML examples (below) can be used as a starting point for pasting into an editor. Search the web for html editor

PDXpert PLM software sends event-driven email notices to users. This application note describes how to design and add your own email formats.

Introduction: How email templates work

PDXpert can send email notices when certain events occur. For example, when a new user account is made, the person can get an email that shows the PDXpert client application download, as well as log-in information. Other notices are sent by the PDXpert server to users who must act on a change form, or who is an observer to the change workflow action. And, there are emails related to tasks assigned by one user to another user.

PDXpert uses a standard set of email templates. Emails always have a plain-text Subject line and HTML-formatted Content. In most cases, you can replace PDXpert's standard templates with your own templates. Replace the standard email template with a new template on the Tools menu ➔ Email Management window.

HTML and non-HTML formats§

There are four possible subject+content options using:

  • A new the plain-text subject line, and PDXpert's standard content.
  • Plain-text subject lines for different workflow paths, and using PDXpert's standard content.
  • Custom HTML with a common plain-text subject line (contained in an HTML <title>), with custom HTML-formatted content (in the <body>).
  • Custom HTML subject lines for different workflow paths: unformatted subject line (<title>) with HTML-formatted content (<body>).

Only change workflow notices can have path-based subject lines; task notices don't have paths.

If you do not use a custom HTML body, then PDXpert's standard email content is used. The workflow or task parameter values are merged with your text, then excess length is deleted, before your email is sent.

Your text signals a custom HTML body by beginning with <!DOCTYPE or <html. The complete HTML is not validated; PDXpert expects that you validated the HTML before adding it to the system. The current parameter values are merged with (1) the HTML <title> element, and (2) your HTML <body> ... </body> element. The result is sent as the email.

The following Email Management window shows some example templates:

  • A change actor's HTML-formatted template, with path-based subjects.
  • A change observer's notice, where only the email subject is changed; the body uses the system's standard format.
  • An HTML-formatted notice sent to a person who's been assigned a task.
  • An empty template, which uses both the standard email subject and email body when the assigned task is completed.
Email template settings

Plain text subject template§

If you want to change only the email subject, then enter the new subject as plain text:

You have a new task!

HTML template§

A basic HTML email template looks like this:

<!DOCTYPE html><html lang="en">

<head><meta charset="utf-8">

<title>Actor email subject (one line, valid and escaped HTML) without styles</title>

</head>

<body>

<p>Actor email body (valid and escaped HTML).</p>

<p>The body can contain multiple lines, and can use styles.</p>

</body>

</html>

Subject lines are always a single line of unformatted text: no colors, or bold, italic or underline styles. PDXpert removes all newline characters, tabs and doubled spaces. Most parameters can be used in the subject. Some parameters may include a lot of text and are not practical: after merging the change data into your template, PDXpert limits the subject line length.

Subject line details§

The template textbox can contain only the email subject as plain text, or an HTML document's <title> element can contain the subject line.

PDXpert's standard email subject line is used when:

  • the template textbox is empty,
  • the HTML document doesn't begin with <!DOCTYPE or <html, or
  • the HTML document doesn't have a <title>, or
  • the HTML document <title> element is empty.

Custom subject line§

The subject line can be a simple text string, such as A change has been processed. This text is used for every email, regardless of the change workflow path.

However, we can insert more details about the current change form. The subject line is used for every change workflow path, so simple information is best; for example, the change type, the number, and its new lifecycle:

Change form {ChangeTypeShort} {ChangeNumber} is now {ChangeNewLifecycle}

The parameters {ChangeTypeShort} {ChangeNumber} and {ChangeNewLifecycle} are selected from the set of available change workflow parameters. There's a separate set of assigned task notice parameters.

Path-based subject line for change workflow§

You can specify a unique subject line for every path on the change workflow diagram. If the subject line begins with the characters |Pn=, then the rest of the line is used as the subject for workflow Path n. You can define as many path-based subjects as you want; any paths you don't define use the standard subject line. For example, change forms moving along workflow Path 3 can show a subject line as:

|P3={ChangeEditor} routed {ChangeTypeShort} {ChangeNumber} for approval [{ChangePath}]

Content details§

PDXpert's standard email content is used when:

  • the template textbox is empty, or

  • the HTML document begins with <!DOCTYPE or <html, and doesn't end with </html>, or

  • the HTML document doesn't have a <body>

Design hints§

  • Writing HTML for email is not the same as designing a web page – web browsers are better than email clients. Email software may ignore shared styles in the <head> or in elements like <table> or <div>. In the examples below, you may see that each <p style="..."> element repeats the same paragraph style. Test your HTML using common email clients (Outlook, Thunderbird, Hiri, etc.), as well as corporate applications like CRM and ERP.

  • Don't use embedded or linked images, such as a company logo. Images and links are often blocked by antivirus, and may prevent delivery of emails outside of your company network. Similarly, limit use of URLs such as company website.

  • All date paramenters end in ...Date}, such as {TaskDueDate}), and show a sortable date without the time (for example, 2020-03-21). Before formatting, date parameters are converted from UTC to the PDXpert server's local time and selected culture. You can add an optional date format string using @, such as {TaskDueDate@d MMM yyyy} (without double-quote) or {TaskDueDate@"d MMM yyyy"} (with double-quote). The format string must conform to a standard or custom .NET date format. Emails that go to other countries should use a culture-independent format that all users understand. It's best to use a format that doesn't include the time.

  • An HTML template with an empty <title></title> element sends an email using the standard subject line with your custom HTML content.

  • An HTML template with an empty <body></body> element sends an email with only a subject line and no content.

  • In the examples, the subject line often contains the {ChangePath} numeric value. This is useful for database queries or transforms that track the workflow history.

  • Quoted attribute values may use single quotes: lang='en' instead of lang="en". Some email clients may not support single quotes.

Template descriptions§

Change workflow actor & observer§

Standard subject§

Change form {ChangeTypeShort} {ChangeNumber} is now {ChangeNewLifecycle} (moved from {ChangeOldLifecycle})

Standard body: Actor§

This email is sent to users who are expected to act: an analyst, the next reviewing groups' members, etc.

Act now: Your immediate action on this change is required.

{ChangeReviewSummary}


{ChangePrimaryDiscussion}


You received this email from PDXpert® software based on your assigned role and this change's workflow. Contact your PDXpert administrator to unsubscribe.

Standard body: Observer§

This email is sent to interested persons who do not actively participate in making, processing or reviewing the change form.

You're an observer of this change. Determine how this change affects you.

{ChangeReviewSummary}


{ChangePrimaryDiscussion}


You received this email from PDXpert® software based on your assigned role and this change's workflow. Contact your PDXpert administrator to unsubscribe.

Change workflow parameters§

The following parameters can be used in the HTML template, and will be replaced by the actual change form values.

{ChangeAnalyst}
The person name of change form's assigned Analyst.
{ChangeClassification}
The change form's displayed Change classification selection.
{ChangeEditor}
The name of the person who acted on the change form, causing it to move along the current path, from the old lifecycle state to the new lifecycle state.
{ChangeEffect}
The change form acts on its affected items as either an Executing or Advisory change form. The change form template's Release/cancel iterations when change is released checkbox sets this value.
{ChangeNewLifecycle}
The ending lifecycle state of the change form's current path. For example, if the change form is moving along path 03, then the {ChangeNewLifecycle} is replaced with Routed.
{ChangeNumber}
The change form's assigned Number value.
{ChangeOldLifecycle}
The beginning lifecycle state of the change form's current path. For example, if the change form is moving along path 03, then the {ChangeOldLifecycle} is replaced with Originated.
{ChangeOriginator}
The person name of change form's assigned Originator (Trustee).
{ChangeOriginDate}
The change form's Originated date. See note 1.
{ChangeOwner}
The full Owner name for the change form owner, which is always the home organization. For example, Acme Manufacturing Company.
{ChangeOwnerShort}
The display name for the change form's owner (always the home organization). For example, Acme.
{ChangePath}

The current numeric (1, 2, …, 25) transition path, matching the paths shown on the Change Forms collection member's Workflow page.

Although the help topic's workflow diagram shows all paths with two numeric characters, you can also use normal numbers 1 to 9 for the path identifier. That is, either |P01= or |P1= is accepted.

{ChangePrimaryDiscussion}
The complete text contained in the primary discussion (often labeled as Change description.) Although this parameter can be used in the email Subject, it's not recommended because the entire subject line is limited to 140 characters.
{ChangePriority}
The change form's displayed Priority selection.
{ChangeProblemSource}
The change form's displayed Problem source selection.
{ChangeReason}
The change form's displayed Change reason selection.
{ChangeReviewComment}
The reviewing person's comment that's included with the response. See note 2.
{ChangeReviewDate}
The date of the review. See notes 1 & 2.
{ChangeReviewGroup}
The reviewing group's name. See note 2.
{ChangeReviewParticipation}
The reviewing group's participate: Must act or Can act. See note 2.
{ChangeReviewResponse}
The reviewing person's selected response, such as Approve change. See note 2.
{ChangeReviewSummary}
The reviewing group name, reviewer, response and comment. See note 2.
{ChangeSecondaryDiscussion}
The complete text contained in the secondary discussion (often used for background or supporting details) Although this parameter can be used in the email Subject, it's not recommended because the entire subject is limited to 140 characters.
{ChangeType}
The change form's change Type name, as defined in the collection member.
{ChangeTypeShort}
The change form's change Type abbreviation, as defined in the collection member.

Notes

  1.  The date can be formatted using a .NET format specifier string, like {ChangeOriginDate@d MMM yyyy}.

  2. This parameter is available only for "incomplete review" emails sent on Paths 8 to 13, and Path 16; it's blank for all other paths.

 

Change workflow examples§

Standard body with custom subject§

Observing {ChangeTypeShort} {ChangeNumber}, now at {ChangeNewLifecycle}

Workflow notice summary§

Use this template, and then move a change to a new workflow lifecycle state, to see the parameter values.

HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8">

<title>EmailNoticeChangeActor for Path {ChangePath}</title>

</head>

<body>

<p style="font-family:sans-serif;font-size:12pt"><i>EmailNoticeChangeActor</i> key</p>

<p style="font-family:sans-serif;font-size:12pt"><b>{Name}:</b> Current value</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeAnalyst:</b> {ChangeAnalyst}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeClassification:</b> {ChangeClassification}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeEditor:</b> {ChangeEditor}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeEffect:</b> {ChangeEffect}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeNewLifecycle:</b> {ChangeNewLifecycle}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeNumber:</b> {ChangeNumber}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeOldLifecycle:</b> {ChangeOldLifecycle}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeOriginator:</b> {ChangeOriginator}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeOriginDate:</b> {ChangeOriginDate}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeOwner:</b> {ChangeOwner}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeOwnerShort:</b> {ChangeOwnerShort}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangePath:</b> {ChangePath}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangePrimaryDiscussion:</b> {ChangePrimaryDiscussion}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangePriority:</b> {ChangePriority}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeProblemSource:</b> {ChangeProblemSource}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReason:</b> {ChangeReason}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReviewComment:</b> {ChangeReviewComment}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReviewDate:</b> {ChangeReviewDate}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReviewGroup:</b> {ChangeReviewGroup}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReviewParticipation:</b> {ChangeReviewParticipation}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReviewResponse:</b> {ChangeReviewResponse}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeReviewSummary:</b> {ChangeReviewSummary}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeSecondaryDiscussion:</b> {ChangeSecondaryDiscussion}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeType:</b> {ChangeType}</p>

<p style="font-family:sans-serif;font-size:12pt"><b>ChangeTypeShort:</b> {ChangeTypeShort}</p>

</body>

</html>

Custom body with path-based subject line§

The body contains the change description:

ACT NOW

{ChangePrimaryDiscussion}

Information in this email is proprietary.

HTML with path-based <title> for the subject line

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8">

<title>

|P1={ChangeTypeShort} {ChangeNumber} assigned to {ChangeOriginator} [{ChangePath}]

|P2={ChangeTypeShort} {ChangeNumber} submitted for analysis [{ChangePath}]

|P3={ChangeTypeShort} {ChangeNumber} routed for approval [{ChangePath}]

|P4={ChangeTypeShort} {ChangeNumber} analyzed and returned for update [{ChangePath}]

|P5={ChangeTypeShort} {ChangeNumber} analyzed and routed for approval [{ChangePath}]

|P6={ChangeTypeShort} {ChangeNumber} is Canceled [{ChangePath}]

|P7={ChangeTypeShort} {ChangeNumber} returned for update while routed [{ChangePath}]

|P8={ChangeTypeShort} {ChangeNumber} disapproved and returned for update [{ChangePath}]

|P9={ChangeTypeShort} {ChangeNumber} is Rejected after it was disapproved [{ChangePath}]

|P10={ChangeTypeShort} {ChangeNumber} stopped after it was disapproved [{ChangePath}]

|P11={ChangeTypeShort} {ChangeNumber} is Canceled after it was disapproved [{ChangePath}]

|P12={ChangeTypeShort} {ChangeNumber} approved and routed to the next group(s) [{ChangePath}]

|P13={ChangeTypeShort} {ChangeNumber} accepted and must be released [{ChangePath}]

|P14={ChangeTypeShort} {ChangeNumber} is Released after all reviewers approved [{ChangePath}]

|P15={ChangeTypeShort} {ChangeNumber} is Canceled after it was routed [{ChangePath}]

|P16={ChangeTypeShort} {ChangeNumber} held [{ChangePath}]

|P17={ChangeTypeShort} {ChangeNumber} returned for update after it was held [{ChangePath}]

|P18={ChangeTypeShort} {ChangeNumber} routed for approval after it was held [{ChangePath}]

|P19={ChangeTypeShort} {ChangeNumber} is Canceled after it was held [{ChangePath}]

|P20={ChangeTypeShort} {ChangeNumber} returned for update after it was disapproved [{ChangePath}]

|P21={ChangeTypeShort} {ChangeNumber} is Rejected after it was disapproved [{ChangePath}]

|P22={ChangeTypeShort} {ChangeNumber} is Canceled after it was disapproved [{ChangePath}]

|P23={ChangeTypeShort} {ChangeNumber} returned for update after it was accepted [{ChangePath}]

|P24={ChangeTypeShort} {ChangeNumber} is Released after it was accepted [{ChangePath}]

|P25={ChangeTypeShort} {ChangeNumber} is Completed [{ChangePath}]

</title>

</head>

<body>

<p style="font-family:Arial,sans-serif;font-size:12pt;font-weight:bold;color:#800;">ACT NOW</p>

<p style="font-family:Arial,sans-serif;font-size:12pt;">{ChangePrimaryDiscussion}</p>

<p style="font-family:Arial,sans-serif;font-size:10pt;color:#888;border-top:1px #888 solid">Information in this email is proprietary.</p>

</body>

</html>

Task assigned & completed§

Standard subject: Task assigned§

Task due {TaskDueDate} for {TaskItemOwnerShort} {TaskItemType} {TaskItemNumber}

Standard subject: Task completed§

Task {TaskStatus} for {TaskItemOwnerShort} {TaskItemType} {TaskItemNumber}

Standard body: Task assigned§

This email is sent to the person who is assigned a task.

{TaskItemFullInfo}

Priority: {TaskPriority}

Assigned by: {TaskAssignedByPerson}

Assigned on: {TaskAssignedDate}

Due on: {TaskDueDate}

Task description: {TaskDescription}

Standard body: Task completed§

This email is sent to the person who assigned the task. The task's status may be set to Completed, Deferred, or Canceled.

{TaskItemFullInfo}

Priority: {TaskPriority}

Assigned to: {TaskAssignedToPerson}

Assigned on: {TaskAssignedDate}

Due on: {TaskDueDate}

Status: {TaskStatus}

Status on: {TaskStatusDate}

Task description: {TaskDescription}

Parameters§

The following parameters can be used in the HTML template, and will be replaced by the actual task values.

{TaskAssignedByPerson}
Name of the person shown in the task's Assigned by field.
{TaskAssignedDate}
Date shown in the task's Assigned on field. See note 1.
{TaskAssignedToPerson}
Name of the person shown in the task's Assigned to field.
{TaskDescription}
The complete content of the Task description field.
{TaskDescriptionShort}
The shortened content of the Task description field. See note 2.
{TaskDueDate}
Date shown in the task's Due on field. See note 1.
{TaskItemClass}
The item's class name: Part, Document or Change.
{TaskItemDescription}
A simplified version of the task's part, document or change form description. See note 2.
{TaskItemNumber}
The part, document or change form Number of the item that contains the assigned task.
{TaskItemOwner}
The full Owner organization name of the item that contains the assigned task. For example, Acme Manufacturing Company.
{TaskItemOwnerShort}
The display name for the organization that owns the item that contains the assigned task. For example, Acme.
{TaskItemRevision}
The part or document pending revision identifier. (Empty for change forms.)
{TaskItemSummary}
The part, document or change form item summary: owner display name; item type abbreviation; item number; pending revision (if any); and the item's simplified description. See note 2.
{TaskItemType}
The full Type name of the item that contains the assigned task. For example, Assembly.
{TaskItemTypeShort}
The abbreviation (display name) for the item type of the item that contains the assigned task. For example, Assy.
{TaskPriority}
The selected value shown in the task's Priority field.
{TaskSendingPerson}
The name of the person who acted on the task, causing it to send the email notice. This could be the person who assigned the task, who responded to the assignment, or an analyst or trustee.
{TaskStatus}
The selected value shown in the task's Status field.
{TaskStatusDate}
Date shown in the task's Status on field. See note 1.

Notes

  1. The date can be formatted using a .NET format specifier string, like {TaskAssignedDate@m}.

  2. This parameter is up to 140 characters, after extra spaces and line breaks are removed.

Task assignment examples§

Standard body with standard subject§

Don't put any text into in the template's textbox.

Standard body with custom subject§

{TaskPriority} priority task for {TaskItemClass} {TaskItemNumber}

Assigned task summary§

Add this template, and then assign a task to another person, to see the parameter values in the task email.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8">

<title>Assigned task email subject (one line only, valid and "escaped" HTML)</title>

</head>

<body>

<p><b>Assigned Task</b></p>

<p><b>{Name}: Current value</b></p>

<p><b>TaskAssignedByPerson:</b> {TaskAssignedByPerson}</p>

<p><b>TaskAssignedDate:</b> {TaskAssignedDate@d MMM yyyy}</p>

<p><b>TaskAssignedToPerson:</b> {TaskAssignedToPerson}</p>

<p><b>TaskDescription:</b> {TaskDescription}</p>

<p><b>TaskDescriptionShort:</b> {TaskDescriptionShort}</p>

<p><b>TaskDueDate:</b> {TaskDueDate@d MMM yyyy}</p>

<p><b>TaskItemClass:</b> {TaskItemClass}</p>

<p><b>TaskItemDescription:</b> {TaskItemDescription}</p>

<p><b>TaskItemNumber:</b> {TaskItemNumber}</p>

<p><b>TaskItemOwner:</b> {TaskItemOwner}</p>

<p><b>TaskItemOwnerShort:</b> {TaskItemOwnerShort}</p>

<p><b>TaskItemRevision:</b> {TaskItemRevision}</p>

<p><b>TaskItemSummary:</b> {TaskItemSummary}</p>

<p><b>TaskItemType:</b> {TaskItemType}</p>

<p><b>TaskItemTypeShort:</b> {TaskItemTypeShort}</p>

<p><b>TaskPriority:</b> {TaskPriority}</p>

<p><b>TaskSendingPerson:</b> {TaskSendingPerson}</p>

<p><b>TaskStatus:</b> {TaskStatus}</p>

<p><b>TaskStatusDate:</b> {TaskStatusDate@d MMM yyyy}</p>

</body>

</html>

New user account created§

The standard email template cannot be completely replaced, and is not shown in the Email Management tool. Set the values using the PDXpert service configuration file. For more information, see the PDXpert service configuration setting in this Install Guide.

The new user account email is sent when the administrator adds a new user account. The user account must refer to a person that already has an email account.

This email notice's subject cannot be changed. The email body can be adjusted to set the service name (HostName); the service base port number (ServiceTcpPort) that affects downloading the client; or the preferred network location of the installer download (ClientInstallerPath).

Other parameters, such as {user password}, are automatically set by the system and cannot be changed.

Standard subject§

PDXpert client setup & user account log-in

Standard body§

If the PDXpert PLM client is not installed, download this file to install the software:

http://{server name}:{port number}/client/setup

To use PDXpert software:

  1. Run the PDXpert PLM application.
  2. Enter your account name: {user name}
  3. Enter your account password: {user password}
  4. Enter the server name (or IP address): {server name}
  5. Click the OK button.

Manage your password by selecting the Passwords... command from the Tools menu.

If you need help, contact {administrator name} or press the F1 key on your keyboard to open the PDXpert PLM help file.

This application note was relevant to the PDXpert software release that was current at time of publication. Product changes since that time may affect its utility. We'd be happy to assist you in assessing the applicability of this note to your situation.

Learn More
Application Notes
Working within PDXpert
Working with other software applications