i4SCADA Knowledge Base

MessengerPro Text Replacements

Abstract

Check out this article for an overview about the i4SCADA MessengerPro Text Replacements in feedback mails, SMS messages or exchange parameters.

MessengerPro configuration has some parameters that do not allow only static text. It is possible to feed information into some output texts using text replacement syntax.

There are three different types of text replacements:

  1. Text replacement with alarm properties.

  2. Text replacement in feedback mails or SMS messages (answer of MessengerProService to a confirmation request mail or SMS).

  3. Text replacement for exchange parameters.

Text replacement with alarm properties

Inside an alarming message (email, fax, voice call or SMS message) the user can configure additional information inside the following texts:

  • Header of email, fax or SMS message (Configured inside i4SCADA Studio at the concerning service)

  • Footer of email, fax or SMS message (Configured inside i4SCADA Studio at the concerning service)

  • Additional Alarm Text for all services (Configured inside i4SCADA MessengerPro web application at the alarming definition)

  • Attachment of emails (Configured inside i4SCADA MessengerPro web application at the alarming definition)

The following commands are recognized as text replacements:

Command

Description

##AlarmType##

The alarm type of the alarm (defined as alarm property inside i4SCADA Studio)

##AlarmGroup##

The alarm group of the alarm (defined as alarm property inside i4SCADA Studio)

##AlarmText##

The alarm text of the alarm (defined as alarm property inside i4SCADA Studio)

##AlarmConstant##

Alarm constant (defined within alarm condition inside i4SCADA Studio)

##AlarmConstantTo##

Alarm constant To (defined within alarm condition inside i4SCADA Studio)

##SignalName##

Signal name of the alarm (defined as alarm property inside i4SCADA Studio)

##DateOn##

Timestamp of the alarm activation (as it is inside Alarm Online)

##DateOff##

Obsolete: Timestamp of the alarm deactivation

(in former versions an alarm needed to be off and acknowledged to stop its alarming. Now a deactivated alarm will cause an alarming)

##DateAck##

Obsolete: Timestamp of the alarm acknowledgement

(in former versions an alarm needed to be off and acknowledged to stop its alarming. Now an acknowledged alarm will cause an alarming)

##x##

[x as number 1 to 5]

Alarm Replacement Signal Values (defined as alarm property inside i4SCADA Studio)

Text replacement with MSSQL User Defined Functions (for advanced users only):

Command

Description

##UDFx#

[x as number]

The replacement text is generated by a user defined function that is located inside i4SCAD database. MessengerPro Service will call this function with the following SQL Statement:

SELECT dbo.udfGetMessengerText('{AlarmID}', '{SubscriberID}',{UdfNumber})

AlarmID is the primary key of the Alarms table SubscriberID is the primary key of the Subscribers table UdfNumber is the number taken from the command (for example 11 for ##UDF11##). UdfNumber can be used to differ between different replacement tasks like:

  1. for signal description

  2. for subscriber name

and so on …

There is one command without a text replacement:

Command

Description

##NDT##

No Default Text.

This command deactivates the default text containing:

{Alarming PIN}.{Alarm Text}.{Date On}

The user then has to define the alarming text by using the additional text configuration property (alarming configuration of MessengerPro web application).

Text replacement in feedback mails or SMS messages

MessengerPro sends feedback messages (answer of MessengerPro Service to a confirmation request mail or SMS).

There are three types of feedback message:

  • Invalid request

  • Error occurred

  • Successful confirmation

For “Invalid request” messages there are no text replacement options.

For “Error occurred” message the user can have the following replacements:

Command

Description

##AlarmingPIN##

Alarming PIN from the confirmation request.

##UserPIN##

User PIN from the confirmation request.

For “Successful confirmation” messages all replacements for “Error occurred” messages are possible plus the text replacements with alarm properties (see sub chapter above).

Text replacements for exchange parameters

It is possible to forward SMS and fax to an MS Exchange Server. This is done with CDO Objects from Microsoft. The Exchange Server is able to send a fax or SMS to a subscriber through an additional plugin (third party software).

Therefore exchange server needs to detect which message is a mail and which message is a fax message. This filter and the interface depends on the specific Exchange extension and could be for example a defined subject like “$$FAX$$” or similar.

For that purpose the fields (address, subject and text) of the exchange allow replacements:

Command

Description

##MemberAddressee##

Alarming PIN from the confirmation request.

##AlarmText##

Default alarm text.

##MessageText##

Complete message text containing header, footer and additional text.