A Script With Service Type Comparison
Imagine a script that is only eligible if the current customer has gas service and the user belongs to user groups A, B or C. This script would need the following eligibility rules:
Customer has gas service
User belongs to user group A, B, or C
These rules require only one eligibility group on the script. It would looks as follows:
Group No.
Group Description
If Group is True
If Group is False
1
Has gas service and user is part of user group A, B or C
Eligible
Ineligible
The following criteria are required for this group:
Group 1: Has gas service and user is part of user group A, B, or C
Seq
Field to Compare
Comparison Method
If True
If False
If Insufficient Data
10
Algorithm: check if customer has gas service
= True
Check next condition
Group is false
Group is false
20
Algorithm: check if user belongs to user group A, B or C
= True
Group is true
Group is false
Group is false
Both criteria are similar - they call an algorithm that performs a logical comparison. These algorithms are a bit counter intuitive (but understanding them provides you with another way to implement complex eligibility criteria):
The first criterion works as follows:
Field to Compare. We chose a "field to compare" algorithm that checks if the current account has service agreements that belong to a given set of service types. It returns a value of True if the customer has an active service agreement that matches one of the service types in the algorithm. In our example, the "check if customer has gas service" algorithm returns a value of True if the customer has at least one active service agreement whose SA type references the gas service type. The "check if customer has electric service" algorithm is almost identical, only the service type differs.
Comparison Method. We simply compare the value returned by the algorithm to True and indicate the appropriate response.
The second criterion works similarly:
Field to Compare. We chose a "field to compare" algorithm that checks if the user belongs to any user group in a set of user groups. It returns a value of True if the user belongs to at least one user group defined in parameters of the algorithm. Refer to algorithm type SECF-USRNGRP for an example of this type of logic.
Comparison Method. We simply compare the value returned by the algorithm to True and indicate the appropriate response.
Note:Bottom line. The "field to compare" algorithm isn't actually returning a specific field's value. Rather, it's returning a value of True or False. This value is in turn, compared by the "comparison method" and the group is set to true, false or check next accordingly.