Creating a Comm Type that Checks an Attribute
You can create a comm type to send messages when the value of a specific attribute changes.
Note
This comm type is only available for users with the role OWNER or SP OPERATOR, so it is only used to check attributes for objects to which those roles apply such as an authorisation or a property.
There are three options:
- Send a message when the attribute value exceeds a certain value
- Send a message when the attribute value falls below a certain value
- Send a message when the attribute value changes
Example
Set up a parameter to notify property owners when their allocation drops to a certain level.
The process for doing this is as follows:
- Create the comm types in the Comm Types module
- Create and configure the comm type parameters in the Parameters module
- Register any users for messages using this comm type. Users will receive messages any objects for which they have the SP OPERATOR or the OWNER role. See Registering Parties with Comm Types for more details.
Tp create the comm types:
- Click Comm Types to open the Comm Types module.
- Click Add to create a new comm type
- Enter the following details:
Field Description Name
Enter a name for the comm type, for example: "Allocation increase"
Registration Enabled
Make the comm type active.
Default message
Enter a default message for this comm type. You will have the opportunity to change or replace this when you create messages. - In the Delivery Method section, specify what communication methods (such as sms, email, or fax) the comm type will use and what the priority of each method will be.
- Click Save to save your changes.
This procedure created a Comm Type object that we will now use as the parameter Object setting.
To create and configure the comm type parameters:
- Click Parameter Editor to open the Parameter Editor module.
- Click Add to create a new parameter.
- Enter the following details:
Field Description Parameter Type
Choose Customer communications plugin Object
Pick the Comm Type object that you created in the Comm Types module. Value
Enter the parameter value. See the Parameter Settings section below for how to set the parameter value. - Click Save to save your changes.
Parameter Value Settings
The form of the parameter value depends on what you want to test. The general pattern is:
rubiconx.message.server.AttributeThresholdPlugin|(list of parameter property types)|list of parameter properties
Testing against a threshold value
If you are testing the attribute value against a threshold value the parameter value is of the form:
rubiconx.message.server.AttributeThresholdPlugin|( Ljava.lang.Integer; threshold type; Ljava.lang.Double;) |attribute type Id, threshold, multiplier
The items to change are highlighted in blue above:
Item | Description |
---|---|
Attribute Type Id |
The unique attribute type id. You can find this value in the Attribute Type module on the Details tab. The type is always Ljava.lang.Integer. |
Threshold |
The specific value to compare to the attribute value |
Threshold type | This will be either Ljava.lang.Integer or Ljava.lang.Double |
Multiplier |
The multiplier determines the direction of the change that you are interested in. The type is always Ljava.lang.Double.
|
Example
Test to see if the value of attribute 15 exceeds 400:
rubiconx.message.server.AttributeThresholdPlugin|(Ljava.lang.Integer;Ljava.lang.Integer;Ljava.lang.Double;)|15, 400,1.0
Test to see if the value of attribute 20 falls below 250:
rubiconx.message.server.AttributeThresholdPlugin|(Ljava.lang.Integer;Ljava.lang.Integer;Ljava.lang.Double;)|20, 250, -1.0
Testing for a change in value
If you are just testing for a change in value, you do not need to specify any threshold or multiplier values. Instead, the parameter value takes the form:
rubiconx.message.server.AttributeThresholdPlugin|( Ljava.lang.Integer; Ljava.lang.Boolean;) |attribute type, false
The boolean value is a flag to disable threshold checking.
In this case you need only enter the attribute type Id.
Example
Test to see if the value of attribute 15 has changed since the last time it was saved:
rubiconx.message.server.AttributeThresholdPlugin|(Ljava.lang.Integer;Ljava.lang.Boolean;)|15, false