Developer Zone

ReachOut™ direct-to-desktop messaging service

From the on-line customer area you can create ReachOut™ messaging campaigns which are used to deliver messages or surveys directly to the desktop of users who are running your software. You may choose a specific target audience for your message by defining a set of delivery filters so that each message will be delivered only to those users who match the specified criteria (such as geographical region, edition, version, build, language, OS, license status, runtime duration, days since install, etc.)

When building a ReachOut™ campaign you can choose between 2 message delivery options.

  • Automated HTML popup messages (which is handled entirely by the Revulytics Usage Intelligence library and requires absolutely NO coding.
  • Manually retrieving the message (plain text or URL) through code by using the TBClass.MessageCheck methods.

Manual Message Retrieval

When you want full control on when and where in your application to display a ReachOut™ message to your users, you can define ReachOut™ messages of the type plain text or URL. Then from within your application you can call one of the below functions to check with the Revulytics Usage Intelligence server whether there are any pending messages (of this type) waiting to be delivered.

You may choose to display plain text messages anywhere in your application such as in a status bar or information box. For the URL type messages you can either open the URL in a browser or else render it in some HTML previewer embedded within your application.

The difference between TBClass.MessageCheckAnyType and TBClass.MessageCheckSpecificType is that TBClass.MessageCheckAnyType uses an ‘empty’ messageType parameter and fills it with the type of message that is sent by the server, while in the case of TBClass.MessageCheckSpecificType, the message type is specified by the developer, and the server would then only send messages of that type.

The message type (plain text or URL) can be one of the types from the following MessageType enum:

* AllMessageType (0)
* TextMessageType (1)
* URLMessageType (2)

Int32 TBClass.MessageCheckAnyType (String message, MessageType messageType)

This function requests a manual ReachOut™ message from the server. This can be either a plain text message or a URL, depending on what messages are waiting on the server.

Parameters:

message (string) - A string of maximum length 256 that will be filled-in by the SDK with the message
that is sent by the server.
messageType (MessageType) - This value is filled by the SDK and contains the type of message that is received (can
be either TextMessageType or URLMessageType from the ref:MessageType enum).

Return Type:

If 0 or greater, it contains the number of messages remaining on the server. Otherwise, it can be cast to GenericReturn and may contain one of the following values:

* FunctionNotAvailable (-1)
* ConnectionError (-2)
* AuthenticationFailure (-3)
* ServerError (-4)
* ConfigNotLoaded (-7)
* InternalError (-99)

Code Example:

Get all of the messages on the server, check if it is a text or URL message and display the appropriate message box.

// Create instance
TBClass tb = new TBClass("<path to Revulytics Usage Intelligence SDK .NET library>");
// Other initialization.....

string message = "";
MessageType msgType;

while (tb.MessageCheckAnyType(out message, out msgType) > 0) {
    if (msgType == MessageType.TextMessageType) {
        MessageBox.Show("TEXT Message" + message);
    } else if (msgType == MessageType.URLMessageType){
        MessageBox.Show("URL Message" + message);
    }
}

Int32 TBClass.MessageCheckSpecificType (String message, MessageType messageTypeExpected)

This function requests a manual ReachOut™ message from the server while specifying the type of message that is needed. The message type needed is to be sent in the messageTypeExpected parameter, and can be one of the MessageType enum values.

Parameters:

message (string) - A string of maximum length 256 that will be filled-in by the SDK with the message
that is sent by the server.
messageTypeExpected (MessageType) - This value is filled by the developer and should contain the type of
message that is being requested. This must be one of the MessageType enum values.

Return Type:

If 0 or greater, it contains the number of messages of the requested type remaining on the server. Otherwise, it can be cast to GenericReturn and may contain one of the following values:

* FunctionNotAvailable (-1)
* ConnectionError (-2)
* AuthenticationFailure (-3)
* ServerError (-4)
* ConfigNotLoaded (-7)
* InternalError (-99)

Code Example:

Get all text messages from the server and display them inside of a message box.

// Create instance
TBClass tb = new TBClass("<path to Revulytics Usage Intelligence SDK .NET library>");
// Other initialization.....


string message = "";

while (tb.MessageCheckSpecificType(out message, MessageType.TextMessageType) > 0)
{
    MessageBox.Show(message);
}