Skip to main content

recommendations

Creates, updates, deletes, gets or lists a recommendations resource.

Overview

Namerecommendations
TypeResource
Idaws.qconnect.recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
recommendationsarrayThe recommendations.
triggersarrayThe triggers corresponding to recommendations.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_recommendationsselectassistant_id, session_id, regionmaxResults, waitTimeSeconds, nextChunkToken, recommendationTypeThis API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024, you will need to create a new Assistant in the Amazon Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications. Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.
notify_recommendations_receivedexecassistant_id, session_id, region, recommendationIdsRemoves 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
assistant_idstringThe identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
regionstringAWS region (default: us-east-1)
session_idstringThe identifier of the session. Can be either the ID or the ARN. URLs cannot contain the ARN.
maxResultsintegerThe maximum number of results to return per page.
nextChunkTokenstringThe token for the next set of chunks. Use the value returned in the previous response in the next request to retrieve the next set of chunks.
recommendationTypestringThe type of recommendation being requested.
waitTimeSecondsintegerThe duration (in seconds) for which the call waits for a recommendation to be made available before returning. If a recommendation is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list.

SELECT examples

This API will be discontinued starting June 1, 2024. To receive generative responses after March 1, 2024, you will need to create a new Assistant in the Amazon Connect console and integrate the Amazon Q in Connect JavaScript library (amazon-q-connectjs) into your applications. Retrieves recommendations for the specified session. To avoid retrieving the same recommendations in subsequent calls, use NotifyRecommendationsReceived. This API supports long-polling behavior with the waitTimeSeconds parameter. Short poll is the default behavior and only returns recommendations already available. To perform a manual query against an assistant, use QueryAssistant.

SELECT
recommendations,
triggers
FROM aws.qconnect.recommendations
WHERE assistant_id = '{{ assistant_id }}' -- required
AND session_id = '{{ session_id }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND waitTimeSeconds = '{{ waitTimeSeconds }}'
AND nextChunkToken = '{{ nextChunkToken }}'
AND recommendationType = '{{ recommendationType }}'
;

Lifecycle Methods

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.

EXEC aws.qconnect.recommendations.notify_recommendations_received
@assistant_id='{{ assistant_id }}' --required,
@session_id='{{ session_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"recommendationIds": "{{ recommendationIds }}"
}'
;