A list of recommended products. The order represents the ranking (from the most relevant product to the least).
↳ attribution_token
string
A unique attribution token. This should be included in theUserEventlogs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
↳ missing_ids
array
IDs of products in the request that were missing from the inventory.
↳ validate_only
bool
True if the validateOnly property was set in the request.
getResults
A list of recommended products. The order represents the ranking (from the
most relevant product to the least).
A unique attribution token. This should be included in theUserEventlogs resulting from this
recommendation, which enables accurate attribution of recommendation model
performance.
Returns
Type
Description
string
setAttributionToken
A unique attribution token. This should be included in theUserEventlogs resulting from this
recommendation, which enables accurate attribution of recommendation model
performance.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getMissingIds
IDs of products in the request that were missing from the inventory.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class PredictResponse (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.PredictResponse)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.PredictResponse)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.PredictResponse)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.PredictResponse)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.PredictResponse)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.PredictResponse)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.PredictResponse)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.PredictResponse)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.PredictResponse)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.PredictResponse)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.PredictResponse)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.PredictResponse)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.PredictResponse) \nReference documentation and code samples for the Google Cloud Retail V2 Client class PredictResponse.\n\nResponse message for predict method.\n\nGenerated from protobuf message `google.cloud.retail.v2.PredictResponse`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getResults\n\nA list of recommended products. The order represents the ranking (from the\nmost relevant product to the least).\n\n### setResults\n\nA list of recommended products. The order represents the ranking (from the\nmost relevant product to the least).\n\n### getAttributionToken\n\nA unique attribution token. This should be included in the\n[UserEvent](/php/docs/reference/cloud-retail/latest/V2.UserEvent) logs resulting from this\nrecommendation, which enables accurate attribution of recommendation model\nperformance.\n\n### setAttributionToken\n\nA unique attribution token. This should be included in the\n[UserEvent](/php/docs/reference/cloud-retail/latest/V2.UserEvent) logs resulting from this\nrecommendation, which enables accurate attribution of recommendation model\nperformance.\n\n### getMissingIds\n\nIDs of products in the request that were missing from the inventory.\n\n### setMissingIds\n\nIDs of products in the request that were missing from the inventory.\n\n### getValidateOnly\n\nTrue if the validateOnly property was set in the request.\n\n### setValidateOnly\n\nTrue if the validateOnly property was set in the request."]]