Get Started with Consumer Goods Cloud
Save Recommendation Decisions
API End-of-Life Policy
Previous Versions
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.
URI: /services/data/vXX.X/actions/standard/saveRecommendationDecision
Formats: JSON, XML
HTTP Methods: GET, HEAD, POST
Authentication: Authorization: Bearer token
| Input | Type | Description |
|---|---|---|
actionParams | string | Required parameters based on the action type that are relevant to process a decision. |
actionType | string | Required. Decision made for a recommendation. The possible values are:
|
recommendationId | string | Unique identifier of the recommendation. |
| Input | Type | Description |
|---|---|---|
actionMessage | string | Details about why a recommendation is accepted or rejected. |
actionStatus | string | Indicates whether a recommendation decision succeeded or failed. |
Sample Request
JSON Request Body
1{
2 "inputs": [{
3 "recommendationId":"9TuB0000000TN6iKAG",
4 "actionType":"Accept",
5 "actionParams":{
6 "TaskGenerationType":"AIVisitTaskTemplate" //For Consumer Goods Cloud
7 }
8 }]
9}Sample Response
JSON Response Body
1{
2 "actionName": "saveRecommendationDecision",
3 "errors": null,
4 "isSuccess": true,
5 "outputValues": {
6 "actionStatus": "success",
7 "actionMessage": "The visit was scheduled.",
8 }
9}Sample Error
JSON Error Body
1[{
2 "actionName": "saveRecommendationDecision",
3 "errors": null,
4 "isSuccess": true,
5 "outputValues": {
6 "actionStatus": "error",
7 "actionMessage": "We can’t schedule the recommendation because the recommendation status isn’t Recommended.",
8 }
9}]