BenefitsEligibilityService Class
Evaluates a constituent’s eligibility for benefits and calculates benefit amounts. This class implements the Callable interface.
BenefitsEligibilityService implements the Callable interface, so you can invoke it generically (for example, from Flow or OmniStudio) without a compile-time reference. It wraps the Integrated Application Connect API.
- Evaluate eligible benefits (default action)
Calls
ConnectApi.IntegratedApplicationConnect.evaluateBenefits. The response lists each benefit with itsbenefitId,benefitName,benefitDescription,eligibilityStatus,message, andevaluationOutputsvalues.- Calculate benefit amounts (
action=calculateBenefitAmounts) Calls
ConnectApi.IntegratedApplicationConnect.calculateBenefitAmounts, which returns each benefit with itsbenefitAmountvalue.
The call() method always returns null. Read the result from output.get('response').
-
BenefitsEligibilityService Methods
Methods for the BenefitsEligibilityService class that evaluate a constituent’s benefit eligibility and calculate benefit amounts.
Methods for the BenefitsEligibilityService class that evaluate a constituent’s benefit eligibility and calculate benefit amounts.
The following are methods for BenefitsEligibilityService.
-
Runs a benefits eligibility operation and writes the result to the output map. Use the action parameter to either evaluate a constituent’s eligible benefits or calculate benefit amounts.
Runs a benefits eligibility operation and writes the result to the output map. Use the action parameter to either evaluate a constituent’s eligible benefits or calculate benefit amounts.
public Object call(String action, Map<String,Object> args)
- action
Type: String
The operation to run. To calculate benefit amounts, set action to
calculateBenefitAmounts. For any other value, the method evaluates the constituent's eligible benefits.- args
Type: Map<String,Object>
A map that contains the
input,output, andoptionsentries for the operation. Theinputentry holds the eligibility request data, and the method writes its result to theresponsekey of theoutputentry.
Type: Object
Always returns null. The operation result is written to the response key of the output map that you pass in args.