Criteria definition
Komodo Care Connect lets you define custom criteria, or rules, on different custom metadata types for various features in the product. For example, custom criteria can be used to determine when a DocuSign envelope should be sent for electronic signatures, when the data change request (DCR) framework should run, and which Account records should be filtered out by Account Search.
Criteria definitions must be valid JSON strings with the following structure. Information about each JSON key and value are further detailed in Table 84, “Criteria properties” below.
{ "path":"<field API name>", "operator":"<operator>", "value":"<value>" }
Warning
References to fields in the criteria cannot traverse relationships. Values must be set on the record in question.
Property | Description |
---|---|
| The API name of the attribute that you want to base the criteria on. WarningThis is case sensitive and should include any namespace as appropriate. |
| The way in which the
Note
Warning
|
| A string containing the desired value of the WarningThis is case sensitive. NoteA wildcard ( |
Compound criteria
Compound criteria may be used to build more complex rules. There are two compound criteria operators:
AnyTrue
AllTrue
To build compound criteria, wrap individual criteria statements in compound criteria operators:
{ <compound criteria operator>: [ { "path":"<field API name>", "operator":"<operator>", "value":"<value>" }, { "path":"<field API name>", "operator":"<operator>", "value":"<value>" }, ] }
Example criteria definitions
Below are two criteria definitions for an example DCR configuration on the Account object. The custom criteria are defined on the Criteria JSON (mvn__PJN_Criteria_JSON__c
) field on the Data Change Request Criteria (mvn__PJN_Data_Change_Request_Criteria__mdt
) custom metadata type.
Criteria type | Description | Sample JSON string |
---|---|---|
Simple criteria | Tracks changes on a physician account. | { "path":"mvn__PJN_Record_Type_Developer_Name__c", "operator":"Equals", "value":"PJN_Physician" } |
Compound criteria | Tracks changes on either a physician or a staff account. | { "AnyTrue": [ { "path":"mvn__PJN_Record_Type_Developer_Name__c", "operator":"Equals", "value":"PJN_Physician" }, { "path":"mvn__PJN_Record_Type_Developer_Name__c", "operator":"Equals", "value":"PJN_Staff" } ] } |