Professional Documents
Culture Documents
2009 HP Confidential
Agenda
2009 HP Confidential
Introduction
With the functionality of the Email integration package for Service
Manager it is possible to send outbound Rich HTML emails from Service
Manager. The mechanism consists of user defined email templates
which can be used to send emails when a certain action in Service
Manager happens.
The installation package consists of several unload files and a Connect-It
scenario.
2009 HP Confidential
Flow
When a certain email generation event in Service Manager happens,
the template defined in the notifications-table will be used to construct
the message. The message is then temporarily stored in the eventouttable before it gets picked up by the Connect-It Scenario which runs
every minute.
The scenario transforms it in a HTML-message and transmits it to the
SMTP-server.
After the message is being sent, a copy is placed in the eventoutsenttable. In the case an error occurs, the message stays in the eventout-table till the next run of the scenario and the error message is added to
the record.
2009 HP Confidential
2009 HP Confidential
2009 HP Confidential
2009 HP Confidential
2009 HP Confidential
Components
Documentation
HTML mail menu
HTML Templates (limited number)
SM7 Notifications (limited number)
2009 HP Confidential
10
2009 HP Confidential
HTML Templates
A template is a record that is used to structure the format of the emails.
This email mechanism can be used for the following modules:
11
Interaction
Incident
Problem
Problem Tasks
Known Error
Service Requests
Line Items
Orders
KM Document
2009 HP Confidential
HTML Templates
ACME
12
2009 HP Confidential
HTML Templates
13
2009 HP Confidential
HTML Templates
ACME
14
2009 HP Confidential
Notifications Definition
In the notification record the HTML templates are called via a JavaScript
ScriptLibrary function.
To construct the mail body the function
HTMLTemplates.getMailBody(.) has to be used. The function expects
the following parameters as input:
The save - record for which an email has to be sent (if not available, take the same as in 2.)
The recipient
2009 HP Confidential
Notifications Definition
example
Body
Subject
16
2009 HP Confidential
17
2009 HP Confidential
18
2009 HP Confidential
19
2009 HP Confidential
HP Connect-It scenario
20
2009 HP Confidential
HP Connect-It scenario
Detect HTML messages
This option enables you to send messages containing HTML tags. The
HTML code is interpreted and is not displayed in the source format for
the body of the e-mail.
21
2009 HP Confidential
ScriptLibrary: HTMLTemplates
Function 1 getMailBody
This function parses the template and returns an HTML String. Therefore the
recipient data is fetched from the table to determine the language of the contact
in order to select the appropriate template record. The sub function
parseTemplate() does the actual parsing of the template (replacing the
{RECORD.xxx}-directives with the actual data).
Function 2 getMailHeader
This function functions in a similar way as the getMailBody()-function, but only
the email-title (Subject) of the template record gets parsed.
22
2009 HP Confidential
Error Handling
ScriptLibrary: HTMLExportDone
After the mail is sent by Connect-IT to the SMTP-server. What happens:
A: The message is sent successfully: Via the HTMLExportDoneScriptLibrary record and the equally named EventMap the actions to
move the message record to the Eventoutsent-table are taken.
B: In case an error occurs: Via the same ScriptLibrary record and
EventMap the action to copy the SMTP-error message to the
errormessage- field is taken.
In the exportMailDone function the command to move the Eventoutrecord to the Eventoutsent-record or to fill in the errormessage-field is
executed based on the validation result of the mail sent action.
23
2009 HP Confidential
Error Handling
EventRegistration and Mappings HTMLExportMailDone
A new input event HTMLExportMailDone is registered in Service Manager to
define the actions that have to be done after an email has been sent. When this
event occurs, the process HTML.Export.Mail.Done is called to handle it.
Process HTML.Export.Mail.Done
The HTML.Export.Mail.Done process calls and passes the variables to the
exportMailDone- function.
24
2009 HP Confidential
25
2009 HP Confidential
26
2009 HP Confidential
27
2009 HP Confidential
28
2009 HP Confidential
Q&A
29
2009 HP Confidential