Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

BenefitsEligibilityService Class

Evaluates a constituent's eligibility for benefits and calculates benefit amounts. This class implements the Callable interface.

Namespace

PublicSectrSltn

Usage

Engineering: Descriptions in this topic and in the call method topic were drafted from the Apex source (BenefitsEligibilityService), not from a spec. Confirm before publish: (1) the customer-facing description and use case; (2) the entitlement, which the source gates with @PermGuard('PublicSector.orgHasBenefitManagementEnabledOrCmty'); (3) whether to state an API version — the source declares @VisibleApiVersion(minApiVersion='262'), which conflicts with a 264 "new class" framing; and (4) the relationship to ConnectApi.IntegratedEligibilityConnect.evaluateBenefits and ConnectApi.IntegratedEligibilityConnect.calculateBenefitAmounts, which this class calls.

Example

Engineering: Provide example info.

BenefitsEligibilityService Methods

The following are methods for BenefitsEligibilityService.

call(action, args)

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.

Signature

public Object call(String action, Map<String,Object> args)

Parameters

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, and options entries for the operation. The input entry holds the eligibility request data, and the method writes its result to the response key of the output entry.

Return Value

Type: Object

Always returns null. The operation result is written to the response key of the output map that you pass in args.