Skip to content

SearchRecommendationsRequest

Source code in docs_src/capo_customer_profiles/types/search_recommendations_request.py
class SearchRecommendationsRequest(TypedDict, closed=True):
    domain_name: "capo_customer_profiles.types.name.name"
    """<p>The unique name of the domain.</p>"""
    key_name: "capo_customer_profiles.types.name.name"
    """<p>A searchable identifier of a customer profile. You can use a predefined key, such as <code>_profileId</code>, <code>_phone</code>, or <code>_email</code>, or a custom-defined key.</p>"""
    key_values: "capo_customer_profiles.types.key_values_list.KeyValuesList"
    """<p>A list of key values. Provide one value for each field of the search key.</p>"""
    recommender: "capo_customer_profiles.types.recommender.Recommender"
    """<p>The recommender used to generate the recommendations.</p>"""
    candidate_ids: NotRequired[
        "capo_customer_profiles.types.candidate_id_list.CandidateIdList"
    ]
    """<p>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.</p>"""
    context: NotRequired[
        "capo_customer_profiles.types.recommender_context.RecommenderContext"
    ]
    """<p>The contextual metadata used to provide dynamic runtime information to tailor recommendations.</p>"""
    diversity: NotRequired[
        "capo_customer_profiles.types.recommendation_diversity_config.RecommendationDiversityConfig"
    ]
    """<p>Runtime diversity configuration for this request. Enables diversity-aware recommendations and optionally supplies values for placeholder-based diversity caps configured on the recommender.</p>"""
    metadata: NotRequired[
        "capo_customer_profiles.types.recommendation_metadata.RecommendationMetadata"
    ]
    """<p>Configuration for metadata to include in recommendation responses.</p>"""
    max_recommendations: NotRequired[
        "capo_customer_profiles.types.max_size500.MaxSize500"
    ]
    """<p>The maximum number of recommendations to return. The default value is 5.</p>"""

candidate_ids instance-attribute

candidate_ids: NotRequired[CandidateIdList]

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.

context instance-attribute

context: NotRequired[RecommenderContext]

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

diversity instance-attribute

diversity: NotRequired[RecommendationDiversityConfig]

Runtime diversity configuration for this request. Enables diversity-aware recommendations and optionally supplies values for placeholder-based diversity caps configured on the recommender.

domain_name instance-attribute

domain_name: name

The unique name of the domain.

key_name instance-attribute

key_name: name

A searchable identifier of a customer profile. You can use a predefined key, such as _profileId, _phone, or _email, or a custom-defined key.

key_values instance-attribute

key_values: KeyValuesList

A list of key values. Provide one value for each field of the search key.

max_recommendations instance-attribute

max_recommendations: NotRequired[MaxSize500]

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

metadata instance-attribute

metadata: NotRequired[RecommendationMetadata]

Configuration for metadata to include in recommendation responses.

recommender instance-attribute

recommender: Recommender

The recommender used to generate the recommendations.