Rule properties are used in a number of places throughout the Dovetail suite, including:
Traditionally, a rule property would traverse a path through the schema, starting from the base object, and ending at a column.
For example, the Contact First Name property for a case would use the path case_reporter2contact:first_name.
However, there are instances where a static value may be desired, and this static value cannot be traversed to via a schema path. In these instances, a Configuration Item Rule Property is useful.
As a refresher, Configuration Items (commonly referred to as Config Items) are a way to store name/value pairs on a system-wide or user-specific level. They are stored in table_config_itm, and can be managed using Dovetail Admin, or imported via a DAT file.
Configuration Items have a Value Type, which defines the type of value they hold, which would be either String, Integer, or Float.
You may wish to have a business rule message that contains a static string, such as a URL to a website. Rather than hard-coding that URL in every business rule, the URL can be stored in a Config Item. This would allow the string to be edited at a later time in one place (in the config item), as opposed to having to modify many business rules.
Here's an example of how this would look in a business rule message:
RE: Action Item [Action Item ID] Assigned
Action Item [Action Item ID] has been assigned to you by [Logger]. The priority is [Priority]. Please take appropriate action.
[ConfigItem.Dovetail Agent URL.String]/action-items/[Action Item ID]
A URL could also be used in an email template, such as in the send_email_about_obj com_template which is used when a Log Email is performed on a case.
Here's an example of the action for the send_email_about_obj com_template, showing a config item used for the company logo URL, and for the Selfservice URL.
RE: About Case <ADDITIONAL_INFO> : [Case Title] [Subcase Title]
![Company Logo]([ConfigItem.Company Logo URL.String])
[Check the status and update your case (Case <ADDITIONAL_INFO>) online at the Dovetail SelfService site]([ConfigItem.Dovetail Selfservice URL.String]/case/<ADDITIONAL_INFO>)
You may wish to have a business rule that only fires if this is the production database (as opposed to a test or development database). You could use a business rule condition based on a configuration item's value. The config item would indicate the database type (production, test, development, etc. )
Now that business rule will only fire if it happens in your production database. It will not fire in the test database.
Configuration Item Rule Properties can be defined in either of two ways
Details on both of these are below.
To reference a configuration item, use the following syntax:
[ConfigItem.Configuration Item Name.Configuration Item Value Type]
Notice that there are three parts
All wrapped in square brackets, similar to other rule properties.
Valid values for Configuration Item Value Type are:
You can also create a business rule property that resolves to a configuration item.
This is useful when you want to make it available in the UI, such as in a business rule condition.
To do so, create a rule property with the following settings:
Name: A user-friendly name for the property
Path or Function: [ConfigItem.Configuration Item Name.Configuration Item Value Type]
Note: Be sure to include the square brackets
Here is an example of a rule property for a configuration item:
Function-based Rule Properties allow you to write your own code to determine a value.
You could write your own Function-based rule property for a config item's value, such as MySupportSiteUrlConfigItem, which would query for the MySupportSiteUrl configuration item and return its String value.
But, a Configuration Item Rule Property makes this process much simpler, and eliminates having to write or deploy custom code.