規格
如要影響特定商家服務的顯示順序,請在服務動態饋給中的每個Service
上設定 ranking_hint.score
。// Ranking hints for a service. message ServiceRankingHint { // Arbitrary partner or merchant assigned rank for this service. // // Services with a higher score will be shown more prominently (e.g. shown // higher in lists). Note that other factors may also influence ranking, such // as price, availability, user history, etc. // // Optional. Must be non-negative if set. float score = 1 [features.field_presence = EXPLICIT]; }顯示多項服務時 (例如,「預訂」按鈕後方直接顯示了供使用者選擇的所有服務的網頁),系統會使用
Service.ranking_hint.score
做為服務訂購服務的信號之一。服務頁面中的分數越高,服務就會顯示。
範例
某商家有 3 項服務「剪髮」、「著色」、「Scalp 按摩和髮型」,以下是他們偏好的訂單:- 剪髮
- 頭皮按摩與理髮
- 著色
服務
{ "service": [ { "price": { "currency_code": "USD", "price_micros": 20000000 }, "service_id": "haircut", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-1", "localized_service_name": { "value": "Haircut", "localized_value": [ { "locale": "en", "value": "Haircut" } ] }, "localized_description": { "value": "Get a haircut.", "localized_value": [ { "locale": "en", "value": "Get a haircut." } ] }, "ranking_hint": { "score": 30.0 } }, { "localized_service_name": { "value": "Coloring", "localized_value": [ { "locale": "en", "value": "Coloring" } ] }, "price": { "currency_code": "USD", "price_micros": 40000000 }, "service_id": "haircoloring", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-1", "localized_description": { "value": "Get your hair dyed.", "localized_value": [ { "locale": "en", "value": "Get your hair dyed." } ] }, "ranking_hint": { "score": 10.0 } }, { "localized_service_name": { "value": "Scalp massage and Haircut", "localized_value": [ { "locale": "en", "value": "Scalp massage and Haircut" } ] }, "price": { "currency_code": "USD", "price_micros": 30000000 }, "service_id": "scalpmassage", "prepayment_type": "NOT_SUPPORTED", "merchant_id": "beauty-1", "localized_description": { "value": "Get a shampoo and scalp massage followed by a haircut.", "localized_value": [ { "locale": "en", "value": "Get a shampoo and scalp massage followed by a haircut." } ] }, "ranking_hint": { "score": 20.0 } } ] }