NotifyRecommendationsReceivedCommand

Removes the specified recommendations from the specified assistant's queue of newly available recommendations. You can use this API in conjunction with GetRecommendations  and a waitTimeSeconds input for long-polling behavior and avoiding duplicate recommendations.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { QConnectClient, NotifyRecommendationsReceivedCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, NotifyRecommendationsReceivedCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // NotifyRecommendationsReceivedRequest
  assistantId: "STRING_VALUE", // required
  sessionId: "STRING_VALUE", // required
  recommendationIds: [ // RecommendationIdList // required
    "STRING_VALUE",
  ],
};
const command = new NotifyRecommendationsReceivedCommand(input);
const response = await client.send(command);
// { // NotifyRecommendationsReceivedResponse
//   recommendationIds: [ // RecommendationIdList
//     "STRING_VALUE",
//   ],
//   errors: [ // NotifyRecommendationsReceivedErrorList
//     { // NotifyRecommendationsReceivedError
//       recommendationId: "STRING_VALUE",
//       message: "STRING_VALUE",
//     },
//   ],
// };

NotifyRecommendationsReceivedCommand Input

Parameter
Type
Description
assistantId
Required
string | undefined

The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.

recommendationIds
Required
string[] | undefined

The identifiers of the recommendations.

sessionId
Required
string | undefined

The identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.

NotifyRecommendationsReceivedCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
errors
NotifyRecommendationsReceivedError[] | undefined

The identifiers of recommendations that are causing errors.

recommendationIds
string[] | undefined

The identifiers of the recommendations.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ResourceNotFoundException
client

The specified resource does not exist.

ValidationException
client

The input fails to satisfy the constraints specified by a service.

QConnectServiceException
Base exception class for all service exceptions from QConnect service.