Loading
Prepare for Email to Become the Default Login ExperienceRead More
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Insurance
Contextual Data in Custom Calculations

Contextual Data in Custom Calculations

When you configure a field set for a coverage product, fields from the field set become available in your custom expression set or Integration Procedure. Use the fields for context-aware adjustment calculations and limit processing.

Required Editions

View supported editions.

By default, your custom expression set or Integration Procedure for calculating the adjusted amount gets the Claimed Amount from the Claim Coverage Payment Detail (CCPD) record as input. Similarly, your custom calculation logic for processing limits gets the Adjusted Amount and Limit Unit Count as input. When you configure a CCPD field set for a coverage, fields from the field set are available in your custom expression set or Integration Procedure. In the field set, you can include standard CCPD fields that aren't part of the default input. You can also include custom fields for data such as network type, treatment category, service location, or discount codes to make your calculation more contextual.

The following table shows how contextual fields reach your calculation logic for each adjuster action.

Adjuster Action API What the API Receives from the CCPD
Calculates the adjusted amount while creating a payment detail Calculate Adjustments The API gets the Claimed Amount field from the CCPD record as standard input. When you configure a field set for a coverage, the API also gets the fields from the field set as additional fields in the input. The API passes the additional fields to your custom calculation logic.
Edits a payment detail and recalculates the adjusted amount Recalculate Adjustments The API gets the Claimed Amount field from the CCPD record as standard input. When you configure a field set for a coverage, the API also gets the updated fields from the field set as additional fields in the input. The API fetches all fields from the field set, merges them with the updated values, and sends these contextual fields to your custom calculation logic.
Pays or pays ex-gratia Process Limits The API gets the Adjusted Amount and Limit Unit Count fields from the CCPD record as standard input, along with the Salesforce ID of the CCPD record. When you configure a field set for a coverage, the API gets these fields from the CCPD record by using the record ID, and sends these additional fields to your custom calculation logic.

When an API calls your expression set, it sends the standard and custom fields from the field set as input. However, you can't define expression set variables ending in __c to match the API names of custom fields. If you include custom fields in the field set, extend the PolicyLimitContext context definition and base your expression set on the extended definition. PolicyLimitContext has a ClaimCoveragePaymentDetail node with variables for the standard CCPD fields. Add and map variables for your custom fields under this node. In the expression set, access the variables from the context definition. See Extend a Context Definition and Map Context Definitions.

Your Integration Procedure receives the standard and custom fields from the field set in an additionalFields node in the input map. Each entry is a key-value pair with the field API name and its value.

Considerations

  • Configure the contextual fields in a field set on the Claim Coverage Payment Detail object and associate the field set with the coverage product in the payment processing setup. Without this configuration, no contextual fields are available to your custom calculation logic.
  • Expression Sets don't support Formula, AutoNumber, or Geolocation fields. Don't include these field types in the extended context definition.
  • Don't add these fields to the field set.
    • Type (Type)
    • Benefit Name (BenefitName)
    • Payment Status (PaymentStatus)
    • Claimed Amount (ClaimedAmount)
    • Adjusted Amount (AdjustedAmount)
    • Claim Coverage (ClaimCoverageId)
    • Claim Coverage Reserve Detail (ClaimCoverageReserveDetailId)
    • Operation Number (OperationNumber)
    • Ex Gratia Amount (ExGratiaAmount)
    • Ex Gratia Reason (ExGratiaReason)
    • Ex Gratia Limit Count (ExGratiaLimitCount)
    • Description (Description)
    • Claim Payment Summary (ClaimPaymentSummaryId)
  • Existing expression sets and Integration Procedures require no updates unless you want to enhance them to use contextual data.
 
Loading
Salesforce Help | Article