Knowledge Base - Cloud Connect

Salesforce Recalculate Configuration Setup

.

This guide explains how to configure and enable the Recalculate Configuration headless flow in Cloud Connect CPQ for Salesforce. You’ll learn how to add a Recalculate Configuration quick action button to page layouts and how to build a custom screen flow that allows users to trigger a recalculation of configuration logic for a selected record—without opening the Configurator.

This feature is useful when business logic or pricing changes require the system to recalculate and persist configuration results automatically.

Prerequisites

Before configuring this feature, ensure the following items are correctly set up:

  • Cloud Connect Salesforce 25.12 or later

  • Integration API Settings in Salesforce configured and tested successfully

  • Cloud Connect Configurator URL in Admin Center configured and tested

  • Web Configuration Migration Service enabled

  • Stateless Configurator Webservice enabled

Creating a Custom Recalculate Configuration Flow on any Object

The recalculation functionality is provided as a managed subflow, which requires only the recordId of the object whose configuration must be recalculated.

You will create a simple Screen Flow that allows the user to review the selected record and initiate recalculation.

Flow and Variables Creation

  1. Navigate to Setup > Flows.

  2. Select New Flow.

  3. Select Screen Flow.

  4. In the Toolbox pane, select New Resource.

    New Resource.png
  5. Configure the Resource as follows, then ensure it is available for use as an input variable.

    Variable Copy Configuration.png

Field

Value

Resource Type

Variable

API Name

recordId

Data Type

Text

Availability

Select Available for input

Create the Source Opportunity Selection Screen

This screen allows users to select the record from which the configuration will be applied.

  1. Create a new element after the Start element of the flow.

    NewElementafterStart.png
  2. Select Screen as the Type.

  3. Enter Select Source Opportunity as the label (or use Quote if applicable). The API Name defaults to Select_Source_Opportunity.

  4. Hide the Pause and Previous buttons in the Screen footer settings.

    HidePauseandPrevious.png
  5. From the Components pane, drag a Choice Lookup component onto the screen.

  6. Label it Source Opportunity and set the API name to Source_Opportunity_Choice.

    SourceOpportunity.png
  7. In the Configure Choices section, select New Choice Resource.

    NewChoiceResource.png
  8. Configure the Record Choice Set as shown below.

    NewChoiceResourceparameters.png

Field

Value

Resource Type

Record Choice Set

API Name

Opportunities_Choice_Record_Set

Object

Opportunity (or Quote)

Filter

Id does not equal {!recordId}

  1. Configure how each Choice is displayed.

ConfigurEachChoice.png

Field

Value

Choice Label

Name

Data Type

Text

Create the Source Opportunity Not Selected Error Screen

If the user does not select a record, display an error message.

  1. Add a new Decision element after the Select Source Opportunity screen.

    Decision.png
  2. Set up Record Not Selected as follows.

    Record Not Selected.png

Field

Value

Label

Record was not selected

Outcome API Name

Record_was_not_selected

Condition Logic

All Conditions Are Met (AND)

Condition

{!Source_Opportunity_Choice.selectedChoiceValues} = ""

  1. Add a Screen element to inform the user that a Source Record was not selected.

Source Record not selected.png
  1. Add the required Error message text using a Display Text component.

Display Text.png
  1. Configure footer buttons as needed.

  2. Add an End element after the error message screen.

    End Element.png

Create the Source Opportunity Verification Screen

After the user selects a record, show them the key details for confirmation.

  1. Under the Default Outcome path, add a new Get Records element.

    Get Records.png
  2. Set up Get Records as follows.

    Get Records Parameters.png

Field

Value

Label

Get Opportunity

API Name

Get_Opportunity

Object

Opportunity

Condition Requirements

All Conditions Are Met (AND)

Condition

Id = {!Source_Opportunity_Choice.selectedChoiceValues}

  1. Add a new Screen element and name it Source Opportunity Details/Source_Opportunity_Details.

  2. In the Next or Finish Button Label field, enter Copy.

    CopyNextorFinish.png
  3. Add a new Section component and create an extra column.

    Add NewColumn.png
  4. Using the Display Text component, build the verification layout. Fields may vary depending on your object or business requirements.

  5. To reference data from the selected Opportunity, use the Get Opportunity element via the Resource Picker.

    Resource Picker.png

Recalculate Configuration Managed Subflow Utilization

Use these steps to add the Recalculate subflow.

  1. Add a new Subflow element.

    SubflowElement.png
  2. Choose Recalculate Configuration Headless/Xplx_RecalculateConfiguration_Headless.

    SFrecalculatereferenceflow.png
  3. Set up the subflow as follows:

    recaulculatesubflowsetup.png

Field

Value

Label

Recalculate Configuration

API Name

Recalculate_Configuration

recordId

{!Source_Opportunity_Choice.selectedChoiceValues}

  1. Save and activate the flow.

    1. In the Flow Label field, enter Recalculate Configuration to Current Opportunity.

    2. In the Flow API Name field, enter Recalculate_Configuration_to_Current_Opportunity.

Create a Quick Action for Flow Action Type

To allow users to launch your flow directly from an object record page, create a Quick Action.

  1. Navigate to Setup > Object Manager > Opportunity > Buttons, Links, and Actions.

  2. Select New Action.

    NewAction.png

Only Action will work properly. Referencing this from a Button or Link will limit functionality.

  1. For Action Type, select Flow.

  2. Select the Screen Flow you created.

  3. For the Label, enter Recalculate Configuration to Current Opportunity (or a label appropriate for object).

  4. Enter an API Name.

  5. Select Save.

Create a Quick Action for Lightning Web Component Action Type

To allow users to launch your flow directly from an object record page, create a Quick Action.

  1. Navigate to Setup > Object Manager > Opportunity > Buttons, Links, and Actions.

  2. Select New Action.

Only Action will work properly. Referencing this from a Button or Link will limit functionality.

NewAction.png
  1. For Action Type, select Lightning Web Component.

    SF-RecalculateLWC.png
  2. For the Lightning Web Component, select the Xplx:recalcConfigLwcAction you created.

  3. For the Label, enter Recalculate (or a label appropriate for object).

  4. For the Name, enter Recalculate

  5. Select Save.

Add the Quick Action to the Opportunity Layout

Add the quick action to the layout to surface the managed action directly on the object record page for end users. Add the packaged 'Recalculate Configuration to Current Opportunity' action to the layout.

  1. In Salesforce, navigate to Setup > Object Manager > Opportunity/Quote > Page Layouts.

  2. Select the required layout.

  3. Select Mobile & Lightning Actions in the toolbar.

  4. Drag Recalculate Configuration to Current Opportunity to the Salesforce Mobile and Lightning Experience Actions section.

    SFRecalculateOpportunity.png
  5. Select Save.

If Dynamic Actions are enabled, see Adding Buttons to Layouts Using Dynamic Actions instead.