View a markdown version of this page

GetProfileRecommendations - Amazon Connect

GetProfileRecommendations

Fetches the recommendations for a profile in the input Customer Profiles domain. Fetches all the profile recommendations

Request Syntax

POST /domains/DomainName/profiles/ProfileId/recommendations HTTP/1.1 Content-type: application/json { "CandidateIds": [ "string" ], "Context": { "string" : "string" }, "MaxResults": number, "MetadataConfig": { "MetadataColumns": [ "string" ] }, "RecommenderFilters": [ { "Name": "string", "Values": { "string" : "string" } } ], "RecommenderName": "string", "RecommenderPromotionalFilters": [ { "Name": "string", "PercentPromotedItems": number, "PromotionName": "string", "Values": { "string" : "string" } } ] }

URI Request Parameters

The request uses the following URI parameters.

DomainName

The unique name of the domain.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

ProfileId

The unique identifier of the profile for which to retrieve recommendations.

Pattern: [a-f0-9]{32}

Required: Yes

Request Body

The request accepts the following data in JSON format.

CandidateIds

A list of item IDs to rank for the user. Use this when you want to re-rank a specific set of items rather than getting recommendations from the full item catalog. Required for personalized-ranking use cases.

Type: Array of strings

Array Members: Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

Context

The contextual metadata used to provide dynamic runtime information to tailor recommendations.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 64.

Key Pattern: ^[a-zA-Z0-9_.-]+$

Value Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

MaxResults

The maximum number of recommendations to return. The default value is 10.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 500.

Required: No

MetadataConfig

Configuration for including item metadata in the recommendation response. Use this to specify which metadata columns to return alongside recommended items.

Type: MetadataConfig object

Required: No

RecommenderFilters

A list of filters to apply to the returned recommendations. Filters define criteria for including or excluding items from the recommendation results.

Type: Array of RecommenderFilter objects

Array Members: Maximum number of 1 item.

Required: No

RecommenderName

The unique name of the recommender.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

RecommenderPromotionalFilters

A list of promotional filters to apply to the recommendations. Promotional filters allow you to promote specific items within a configurable subset of recommendation results.

Type: Array of RecommenderPromotionalFilter objects

Array Members: Maximum number of 1 item.

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Recommendations": [ { "CatalogItem": { "AdditionalInformation": "string", "Attributes": { "string" : "string" }, "Category": "string", "Code": "string", "CreatedAt": number, "Description": "string", "Id": "string", "ImageLink": "string", "Link": "string", "Name": "string", "Price": "string", "Type": "string", "UpdatedAt": number }, "Score": number } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Recommendations

List of recommendations generated by the recommender.

Type: Array of Recommendation objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

BadRequestException

The input you provided is invalid.

HTTP Status Code: 400

InternalServerException

An internal service error occurred.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource does not exist, or access was denied.

HTTP Status Code: 404

ThrottlingException

You exceeded the maximum number of requests.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: