This response is generated for each Recommend() request

Constructors

Properties

ErrorMessage: string
RecommendationItems?: RecommendationItemEntity[] = []

The Recommendation Item Entities that were created by the recommendation provider

RecommendationRun?: RecommendationRunEntity

The Recommendation Run entity that was created by the recommendation engine

Request: RecommendationRequest<Record<string, any>>
Success: boolean

Methods

  • Appends the provided errorMessage param to the ErrorMessage property, with "Error: " prepended to the message and a newline character appended to the end. Also sets the Success property to false.

    Parameters

    • errorMessage: string

    Returns void

  • Appends the provided warningMessage param to the ErrorMessage property, with "Warning: " prepended to the message and a newline character appended to the end. The value of the Success property is not changed.

    Parameters

    • warningMessage: string

    Returns void

  • Returns the ErrorMessage property as an array of strings. Useful in the event multiple errors or warnings were produced during the recommendation run.

    Returns string[]