---
schema_version: "1"
id: 36793100c258f602ebfe882a9c3c156edd5c62d17efdd575de5397a5b1d103dc
title: Save Recommendation Decisions
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/actions_obj_save_recommendation_decision.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/actions_obj_save_recommendation_decision.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 10ec2c7ad883c05f3fac513ea26ebc6692edb055cd9616c208665c1bd6b609c0
description: Save visit and task recommendation decisions.
---
# Save Recommendation Decisions

Save visit and task recommendation decisions.

This object is available in API version 51.0 and later for users with a Consumer Goods Cloud license.

## Supported REST HTTP Methods

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

**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="d36e85">Input</th>

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d36e91" data-title="Description">Required parameters based on the action type that are relevant to process a
                decision.</td>

            </tr>

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

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

              <td class="entry" headers="d36e91" data-title="Description">Required. Decision made for a recommendation.<p class="p">The possible values are:</p>
                <a name="ul_bf4_33q_skc"><!-- --></a>
                <ul class="ul bulletList" id="ul_bf4_33q_skc">
                  <li class="li"><samp class="codeph nolang">Accept</samp></li>

                  <li class="li"><samp class="codeph nolang">Reject</samp></li>

                </ul>
              </td>

            </tr>

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

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

              <td class="entry" headers="d36e91" data-title="Description">Unique identifier of the recommendation.</td>

            </tr>

          </tbody>

        </table>

## Outputs

| Input | Type | Description |
| --- | --- | --- |
| actionMessage | string | Details about why a recommendation is accepted or rejected. |
| actionStatus | string | Indicates whether a recommendation decision succeeded or failed. |

## Example

**Sample Request**

JSON Request Body

{
   "inputs": \[{
      "recommendationId":"9TuB0000000TN6iKAG",
      "actionType":"Accept",
      "actionParams":{
         "TaskGenerationType":"AIVisitTaskTemplate" //For Consumer Goods Cloud
      }
   }\]
}

**Sample Response**

JSON Response Body

{
   "actionName": "saveRecommendationDecision",
   "errors": null,
   "isSuccess": true,
   "outputValues": {
      "actionStatus": "success",
      "actionMessage": "The visit was scheduled.",
   }
}

**Sample Error**

JSON Error Body

\[{
   "actionName": "saveRecommendationDecision",
   "errors": null,
   "isSuccess": true,
   "outputValues": {
      "actionStatus": "error",
      "actionMessage": "We can’t schedule the recommendation because the recommendation status isn’t Recommended.",
   }
}\]