Spesifikasi
Untuk memengaruhi urutan tampilan layanan untuk penjual tertentu, tetapkanranking_hint.score
pada setiap
Service
di
Feed layanan.
// 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]; }Jika beberapa layanan ditampilkan (misalnya: halaman langsung setelah tombol "Pesan" yang menampilkan semua layanan yang dapat dipilih pengguna),
Service.ranking_hint.score
akan digunakan sebagai salah satu sinyal untuk memesan
Layanan. Makin tinggi skornya, makin tinggi halaman yang akan menampilkan Layanan.
Contoh
Seorang penjual memiliki 3 layanan "Potongan Rambut", "Mewarnai", "Pijat kulit kepala dan Potongan Rambut" dan urutan pilihan mereka adalah sebagai berikut:- Potong rambut
- Pijat kulit kepala dan Potong rambut
- Mewarnai
Layanan
{ "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 } } ] }