Refresh Actuals Calculation Action
For information on how the refreshActualsCalculation action can be used in a flow, see Use Manufacturing Actions in Flow Builder and Process Builder 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
| Input | Type | Description |
|---|---|---|
| userId | ID | The ID of the user. An email is sent to this user when the action is complete. |
| salesAgreementId | string | The ID of the sales agreement for refreshing actuals. |
| isCurrentAndFutureSchedules | boolean | Indicates whether to refresh actuals for the current schedule period only (false) or for the current schedule period and future
schedules (true). When true, the number of future schedules is based on the FutureActCalcSchedules field on the sales agreement. If you specify true for both isCurrentAndFutureSchedules and isCurrentSchedule, the action fails with an error. |
| isCurrentSchedule | boolean | Indicates whether to refresh actuals for the current period (true) or current and past periods (false). |
Usage
Sample Request
Here's a sample request for the Refresh Actuals Calculation action.
1{
2"inputs" : [{
3"userId" : "005Ws000001Agn0IAC",
4"salesAgreementId": "0YAWs0000004FkBOAU",
5"isCurrentSchedule": true,
6"isCurrentAndFutureSchedules": false
7}]
8}Sample Response
Here's a sample success response for the Refresh Actuals Calculation action.
1[
2 {
3 "actionName": "refreshActualsCalculation",
4 "errors": null,
5 "isSuccess": true,
6 "outputValues": {
7 "isSuccess": true,
8 "message": "Actuals calculation refreshed successfully",
9 "recordsProcessed": 15,
10 "salesAgreementId": "0YAWs0000004FkBOAU"
11 }
12 }
13]Error Response
Here's a sample error response for the Refresh Actuals Calculation action.
1[
2 {
3 "actionName": "refreshActualsCalculation",
4 "errors": [
5 {
6 "statusCode": "INVALID_INPUT",
7 "message": "Sales Agreement not found or user does not have access",
8 "fields": ["salesAgreementId"]
9 }
10 ],
11 "isSuccess": false,
12 "outputValues": null
13 }
14]