서비스 순서 설정

사양

특정 판매자의 서비스 표시 순서에 영향을 주려면 서비스 피드의 각 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.
  optional float score = 1;
}
여러 서비스가 표시되면 (예: 사용자가 선택할 수 있는 모든 서비스가 표시되는 '예약' 버튼 바로 다음에 있는 페이지) 서비스 주문 시 신호 중 하나로 Service.ranking_hint.score를 사용합니다. 점수가 높을수록 페이지에 더 높은 서비스가 표시됩니다.

한 판매자가 '헤어컷', '컬러링', '두피 마사지 및 헤어컷'의 3가지 서비스를 제공하고 있으며 선호하는 순서는 다음과 같습니다.
  1. 헤어커트
  2. 두피 마사지 및 이발
  3. 색칠하기
서비스 피드는 다음과 같이 지정할 수 있습니다.

서비스

{
  "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
      }
    }
  ]
}
위에 지정된 순서 (다른 신호 없이)는 다음과 같은 결과로 이어집니다.

서비스 순서: 이발, 두피 마사지 및 이발, 염색