recalculate_case_action_fields
Recalculates calculated fields and when conditions for case action forms based on current data and user inputs, ensuring accurate field values and rule evaluations in Pega applications.
Instructions
Recalculate calculated fields & whens for the current case action form. If no eTag is provided, automatically fetches the latest eTag from the case action for seamless operation. Executes field calculations and when conditions based on current form state and user input. Supports recalculating specific fields and when conditions, merging content updates, and applying page instructions during the calculation process. The API validates case and action IDs, processes calculation requests, and returns updated field values and states.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caseID | Yes | Case ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces."ON6E5R-DIYRecipe-Work-RecipeCollection R-1008". a complete case identifier including spaces and special characters. | |
| actionID | Yes | Action ID for case/stage action (Example: "pyUpdateCaseDetails", "pyApproval"). CRITICAL: Action IDs are CASE-SENSITIVE and have no spaces even if display names do ("Edit details" → "pyUpdateCaseDetails"). Use get_case to find correct ID from availableActions array - use "ID" field not "name" field. | |
| eTag | No | Optional. Auto-fetched if omitted. For faster execution, use eTag from previous response. | |
| calculations | Yes | Required object containing fields and when conditions to recalculate. Must contain at least one of fields or whens arrays. | |
| content | No | Optional map of scalar properties and embedded page properties to be merged into the case during the recalculation process. Field values provided here will be available for use in calculations. Only fields that are present in the case action's view can be effectively utilized in calculations. | |
| pageInstructions | No | Optional list of page-related operations for embedded pages, page lists, or page groups. Required for setting embedded page references. | |
| originChannel | No | Optional origin channel identifier for this service request. Indicates the source of the request for tracking and audit purposes. Examples: "Web", "Mobile", "WebChat". Default value is "Web" if not specified. | |
| sessionCredentials | No | Optional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken. |