---
schema_version: "1"
id: e00f1872df4ac7020c1b6594ca6f0535cf00b88cc1d2100952da60bd99649ab2
title: Refresh Actuals Calculation Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/mfg_api_devguide/mfg_actions_refresh_actuals_calculation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.mfg_api_devguide.meta/mfg_api_devguide/mfg_actions_refresh_actuals_calculation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2328162cd5689b1df20120d143da937de0b3646155f9f10c1cea4c8491f98a35
description: Refresh actuals calculations for sales agreements for current and past periods.
---
# Refresh Actuals Calculation Action

Refresh actuals calculations for sales agreements for current and past periods.

![Note](https://developer.salesforce.com/docs/atlas.en-us.mfg_api_devguide.meta/mfg_api_devguide/images/icon_note.png)

#### Note

These actions update the actuals data in your Salesforce org. You must perform a database rollback to undo these actions.

For information on how the refreshActualsCalculation action can be used in a flow, see [Use Manufacturing Actions in Flow Builder and Process Builder](https://help.salesforce.com/s/articleView?id=ind.admin_manufacturing_standard_invocable_actions.htm&type=5&language=en_US "HTML (New Window)") in Salesforce Help.

This object is available in API version 47.0 and later for users with the Manufacturing Sales Agreements permission set.

## Supported REST HTTP Methods

**URI:** /services/data/vXX.X/actions/standard/refreshActualsCalculation

**Formats:** JSON, XML

**HTTP Methods:** GET, HEAD, POST

**Authentication:** Authorization: Bearer token

## Inputs

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d19721e101">Input</th>

              <th class="featureTableHeader  " id="d19721e104">Type</th>

              <th class="featureTableHeader  " id="d19721e107">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d19721e101" data-title="Input"><span class="keyword parmname">userId</span></td>

              <td class="entry" headers="d19721e104" data-title="Type">ID</td>

              <td class="entry" headers="d19721e107" data-title="Description">The ID of the user. An email is sent to this user when the action is complete.</td>

            </tr>

            <tr>
              <td class="entry" headers="d19721e101" data-title="Input"><span class="keyword parmname">salesAgreementId</span></td>

              <td class="entry" headers="d19721e104" data-title="Type">string</td>

              <td class="entry" headers="d19721e107" data-title="Description">The ID of the sales agreement for refreshing actuals.</td>

            </tr>

            <tr>
              <td class="entry" headers="d19721e101" data-title="Input"><span class="keyword parmname">isCurrentAndFutureSchedules</span></td>

              <td class="entry" headers="d19721e104" data-title="Type">boolean</td>

              <td class="entry" headers="d19721e107" data-title="Description">Indicates whether to refresh actuals for the current schedule period only (<samp class="codeph nolang">false</samp>) or for the current schedule period and future
                schedules (<samp class="codeph nolang">true</samp>). When <samp class="codeph nolang">true</samp>, the number of future schedules is based on the <samp class="codeph nolang">FutureActCalcSchedules</samp> field on the sales agreement.<p class="p">If you specify <samp class="codeph nolang">true</samp> for both
                  <span class="keyword parmname">isCurrentAndFutureSchedules</span> and
                  <span class="keyword parmname">isCurrentSchedule</span>, the action fails with an error.
                </p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d19721e101" data-title="Input"><span class="keyword parmname">isCurrentSchedule</span></td>

              <td class="entry" headers="d19721e104" data-title="Type">boolean</td>

              <td class="entry" headers="d19721e107" data-title="Description">Indicates whether to refresh actuals for the current period (<samp class="codeph nolang">true</samp>) or current and past periods (<samp class="codeph nolang">false</samp>).</td>

            </tr>

          </tbody>

        </table>

## Usage

**Sample Request**

Here's a sample request for the Refresh Actuals Calculation action.

{
"inputs" : \[{
"userId" : "005Ws000001Agn0IAC",
"salesAgreementId": "0YAWs0000004FkBOAU",
"isCurrentSchedule": true,
"isCurrentAndFutureSchedules": false
}\]
}

**Sample Response**

Here's a sample success response for the Refresh Actuals Calculation action.

\[
  {
    "actionName": "refreshActualsCalculation",
    "errors": null,
    "isSuccess": true,
    "outputValues": {
      "isSuccess": true,
      "message": "Actuals calculation refreshed successfully",
      "recordsProcessed": 15,
      "salesAgreementId": "0YAWs0000004FkBOAU"
    }
  }
\]

**Error Response**

Here's a sample error response for the Refresh Actuals Calculation action.

\[
  {
    "actionName": "refreshActualsCalculation",
    "errors": \[
      {
        "statusCode": "INVALID\_INPUT",
        "message": "Sales Agreement not found or user does not have access",
        "fields": \["salesAgreementId"\]
      }
    \],
    "isSuccess": false,
    "outputValues": null
  }
\]