Feed de servicios

Crea y sube feeds de servicios

Cuando crees y subas feeds de servicios, sigue estas instrucciones:

  • Sigue la especificación que se describe en el feed de servicios para los archivos de datos de servicios. Te recomendamos que uses nombres de archivo de datos de servicio únicos para cada carga. Incluye una marca de tiempo en el nombre del archivo, por ejemplo, service_1633621547.json.
  • En el descriptor del conjunto de archivos, establece el campo name en glam.service.v0. Para ver un ejemplo del archivo de descriptor, consulta el ejemplo de JSON. Te recomendamos que uses nombres de archivo de descriptor únicos para cada carga. Incluye una marca de tiempo en el nombre del archivo, por ejemplo, service_1633621547.filesetdesc.json. El archivo descriptor se debe subir al servidor SFTP genérico.
  • Sube feeds al servidor SFTP genérico todos los días como actualizaciones completas.
  • Puedes encontrar los detalles del servidor SFTP en la sección Configuración > Feeds del Partner Portal.
  • Selecciona servidores de feeds

    Cómo seleccionar servidores de feeds en el Partner Portal
  • Consulta el estado de la transferencia del feed en la sección Feeds > History del Partner Portal.

Definiciones

Definición de ServiceFeed

message ServiceFeed {
  option features.(pb.java).nest_in_file_class = YES;

  repeated Service data = 1;
}

Definición de Service

// The definition of a service provided by a merchant.
message Service {
  option features.(pb.java).nest_in_file_class = YES;

  // An opaque string from an aggregator partner which uniquely identifies a
  // merchant.
  // (required)
  string merchant_id = 1 [
    features.field_presence = IMPLICIT,
    features.(pb.cpp).string_type = STRING
  ];

  // An opaque string of ASCII characters from an aggregator partner which
  // uniquely identifies the service.
  // Must be equal to or shorter than 100 characters.
  // (required)
  string service_id = 2 [
    features.field_presence = IMPLICIT,
    features.(pb.cpp).string_type = STRING
  ];

  // The name of the service, e.g. "Men's haircut". Possibly in several locales.
  // (required)
  Text localized_service_name = 3;

  // The name of the service category, e.g. "Haircut", "Shave", "Color".
  // Possibly in several locales. The category will be used to group services
  // when presented to the consumer.
  // Note: For merchants without categories on your website, you can group all
  // services into one category and use a generic name such as "All Services"
  // or "General." Merchants who have categories you should try to replicate
  // those categories.
  // (required)
  Text localized_service_category = 4;

  // The user-visible description of the service, possibly in several locales.
  // This field is not required for every services, but is strongly
  // recommended to be filled when available.
  // Important notes:
  //   * The recommended maximum size is 2,000 characters.
  // (optional)
  Text localized_service_description = 5;

  // The price of the service.
  // Note, if a service (or merchant) doesn't provide price up front, use
  // RangeInterpretation.INTERPRETATION_NOT_DISPLAYED as PriceInterpretation.
  // (required)
  ServicePrice service_price = 6;

  // An action link related to this service. Action link should deep link to the
  // 3P page with the preselected service.
  // Note: Only the first entry will be used. Other provided action links will
  // be ignored.
  // Optional, but highly recommended if service-level deep links are supported.
  // This enables service-level entrypoints on Google if provided.
  // Note: For merchants participating in Healthcare vertical should not provide
  // service-level deep link.
  // (optional)
  repeated ActionLink action_link = 8;

  // Duration of the service.
  // Note, if a service (or merchant) doesn't provide service duration, use
  // RangeInterpretation.INTERPRETATION_NOT_DISPLAYED as DurationInterpretation.
  // (required)
  ServiceDuration service_duration = 9;

  // Ranking hint for this service.
  // (optional)
  ServiceRankingHint ranking_hint = 10;

  // Bookability info for the service, required for agentic bookings on Google.
  // (optional)
  ServiceBookabilityInfo bookability_info = 11;

  // Policies for this service, required for agentic bookings on Google.
  // (optional)
  ServicePolicyInfo policy_info = 12;
}

Definición de Text

// A possibly-localized text payload. Some Text fields may contain marked-up
// content.
message Text {
  option features.(pb.java).nest_in_file_class = YES;

  // Text value in an unknown locale, which will be displayed if
  // `localized_value` for the user locale is empty or missing. The locale for
  // this value may depend on the partner or service provider, and it should not
  // be assumed to be any specific language.
  // (required)
  string value = 1;

  // Per-locale text values.
  // (optional)
  repeated LocalizedString localized_value = 2;
}

Definición de interpretación del rango

// Describes how a range of values should be interpreted and displayed to the
// user.
enum RangeInterpretation {
  option features.(pb.cpp).enum_name_uses_string_view = false;
  option features.(pb.java).nest_in_file_class = YES;


  // When range represents an exact value (such that min value equals to max)
  // Will be interpreted as a specific value.
  //
  // Examples:
  //   $20 for a yoga class; 50 min haircut duration
  INTERPRETATION_EXACT = 1;

  // When only minimum of the range is known and displayed to consumers.
  // The maximum value will be decided based on other configurations
  // (e.g., price may go up if consumer selecting add-ons)
  //
  // Examples:
  //   $30 for dog grooming, but additional consumer choices may increase the
  //   price
  //   40 min massage, but there are also options for extending the time.
  INTERPRETATION_STARTS_AT = 2;

  // When the range is variable and both minimum and maximum values are known
  // and displayed to consumers.
  //
  // Examples:
  //   $30 - $60 for dog grooming, the exact price will depend on additional
  //   consumer choices.
  //   1 - 3 hour hair color service.
  INTERPRETATION_RANGE = 3;

  // When the range is variable and no min value is known. No information is
  // displayed to consumers ahead of time.
  //
  // Examples:
  //   A consultation for a home service
  INTERPRETATION_NOT_DISPLAYED = 4;
}

Definición del precio del servicio

// The price of a service.
message ServicePrice {
  option features.(pb.java).nest_in_file_class = YES;

  // Describes how a Price should be interpreted and displayed to the user.
  // (required)
  RangeInterpretation price_interpretation = 1;

  // The minimum price of the service. Must be set if price_interpretation is
  // set to EXACT, STARTS_AT, or RANGE.
  // price is known.
  // (optional)
  Price min_price = 2;

  // The maximum price of the service. Must be set if price_interpretation is
  // set to RANGE.
  // (optional)
  Price max_price = 3;
}

Definición de Price

// The price of a service or a fee.
message Price {
  option features.(pb.java).nest_in_file_class = YES;

  // The price in micro-units of the currency.
  // For example: 1.95 USD is 1950000 in micro-units.
  // If your price contains fractions of the smallest currency unit, then it
  // will be rounded using nearest even rounding (e.g. 2.5 cents rounded
  // to 2 cents, 3.5 cents rounded to 4 cents, 0.5 cents rounded to 0 cents,
  // 2.51 cents rounded to 3 cents).
  // (required)
  int64 price_micros = 1;

  // The currency of the price that is defined in ISO 4217.
  // (required)
  string currency_code = 2;

  // An optional and opaque string that identifies the pricing option that is
  // associated with the extended price.
  // (optional)
  string pricing_option_tag = 3;
}
// An action URL for a service.
message ActionLink {
  option features.(pb.java).nest_in_file_class = YES;


  // The entry point URL for this action link.
  // (required)
  string url = 1;
}

Definición de la duración del servicio

message ServiceDuration {
  option features.(pb.java).nest_in_file_class = YES;

  // Describes how a service duration should be interpreted and displayed to
  // the user.
  // Note, if a service (or merchant) doesn't provide service duration, use
  // 'INTERPRETATION_NOT_DISPLAYED' as DurationInterpretation.
  // (required)
  RangeInterpretation duration_interpretation = 1;

  // The minimum duration (in seconds) that the service may take. Must be set
  // if duration_interpretation is set to EXACT, STARTS_AT, or RANGE.
  // (required)
  int64 min_duration_sec = 2;

  // The maximum duration (in seconds) that the service may take. Must be set
  // if duration_interpretation is set to RANGE.
  // (optional)
  int64 max_duration_sec = 3;
}

Definición de sugerencia de clasificación de servicio

// Ranking hints for a service.
message ServiceRankingHint {
  option features.(pb.java).nest_in_file_class = YES;

  // Arbitrary partner or merchant assigned rank for this service.
  //
  // Services with a lower score will be displayed more prominently (e.g.
  // displayed higher in lists).
  //
  // Ranking hints affect both the ordering of services within a service
  // category, and the ordering of the categories themselves. The ranking hint
  // for a category is assumed to be the minimum ranking hint of any item in the
  // category. Note that other factors may also influence the final ranking,
  // such as price, user history, etc.
  //
  // The recommended approach is to define a total ordering on all the services,
  // by assigning each one a unique integer ranking hint and ensuring that
  // ranking hint values don’t overlap between categories. For example, if we
  // want the preferred ordering of categories and services to be:
  // Category 1: A, B, C
  // Category 2: D, E, F
  // Then the simplest ranking hint scheme to indicate this would be:
  // A=1, B=2, C=3, D=4, E=5, F=6.
  //
  // Must be non-negative if set.
  // (optional)
  float score = 1;
}

Definición de la información de reserva de servicios

// Bookability info for the service.
message ServiceBookabilityInfo {
  option features.(pb.java).nest_in_file_class = YES;

  // Indicates whether the service can be booked online.
  // (optional)
  bool is_online_bookable = 1;

  // Indicates whether payment is required when booking online.
  // (optional)
  bool payment_required = 2;

  // Indicates whether a credit card must be on file.
  // (optional)
  bool card_on_file_required = 3;

  // Indicates whether a One-Time Password (OTP), such as an email or SMS code,
  // is required when booking an appointment online.
  // (optional)
  bool otp_required = 4;

  // Indicates whether a user must sign in to book an appointment online.
  // (optional)
  bool sign_in_required = 5;
}

Definición de información de la política de servicio

// Policy info for the service.
message ServicePolicyInfo {
  option features.(pb.java).nest_in_file_class = YES;

  // Policies for this service, required for agentic bookings on Google.
  // (optional)
  repeated ServicePolicy policies = 1;
}

Definición de la política de servicio

// A named policy for the service.
// Displayed to the user when performing agentic bookings on Google.
message ServicePolicy {
  option features.(pb.java).nest_in_file_class = YES;

  // A partner-defined policy identifier, not user-facing and possibly not
  // unique. The partner can use this to identify a specific policy content
  // or version. Treated as an opaque identifier by Google.
  // (optional)
  string id = 1;

  // A user-facing localized name for this policy.
  //
  // Standard, Title Case naming is strongly recommended to ensure a clean,
  // consistent, and recognizable user experience. Avoid informal abbreviations
  // or shorthand (e.g., do NOT use "T&C", "T&Cs", "ToS", or "Cancel").
  //
  // Recommended standard names for common policy types:
  //   - "Terms & Conditions" (or "Terms and Conditions" / "Terms of Service")
  //   - "Privacy Policy" (or "Privacy")
  //   - "Cancellation Policy" (or "Refund Policy")
  //   - "Health & Safety Policy"
  //
  // (required)
  Text name = 2;

  // The content of the policy to be displayed or linked to the user.
  // (required)
  oneof content {
    // The textual content of the policy to be displayed to the user.
    Text text_content = 3;

    // The URL where the policy can be viewed.
    Text url_content = 4;
  }
}

Definición de cadena localizada

// Instance of a string in one locale.
message LocalizedString {
  option features.(pb.java).nest_in_file_class = YES;

  // IETF BCP 47 language code, such as "en", "mas", "zh-Hant", "de-CH-1901".
  // See http://www.w3.org/International/articles/language-tags/.
  // (required)
  string locale = 1;

  // Message in the locale above (UTF-8).
  // (required)
  string value = 2;
}

Ejemplos de feeds de servicios

Feed de servicios

{
  "data": [
    {
      "merchant_id": "appointments-merchant-1",
      "service_id": "service-1",
      "localized_service_name": {
        "value": "Service Type 1",
        "localized_value": [
          {
            "locale": "en",
            "value": "Service Type 1"
          },
          {
            "locale": "es",
            "value": "Servicio Tipo 1"
          }
        ]
      },
      "localized_service_category": {
        "value": "Haircut",
        "localized_value": [
          {
            "locale": "en",
            "value": "Haircut"
          },
          {
            "locale": "es",
            "value": "Cortes de pelo"
          }
        ]
      },
      "localized_service_description": {
        "value": "Lorem ipsum dolor sit amet",
        "localized_value": [
          {
            "locale": "en",
            "value": "Lorem ipsum dolor sit amet"
          },
          {
            "locale": "es",
            "value": "el cliente esta muy contento"
          }
        ]
      },
      "service_price": {
        "price_interpretation": "INTERPRETATION_EXACT",
        "min_price": {
          "price_micros": 40000000,
          "currency_code": "USD"
        }
      },
      "action_link": [
        {
          "url": "https://www.rwgpartnerwebsite.com/appointment/service-1/in-person-1"
        }
      ],
      "service_duration": {
        "duration_interpretation": "INTERPRETATION_EXACT",
        "min_duration_sec": 360
      },
      "ranking_hint": {
        "score": 1
      },
      "bookability_info": {
        "is_online_bookable": true,
        "payment_required": false,
        "card_on_file_required": false,
        "otp_required": false,
        "sign_in_required": false
      },
      "policy_info": {
        "policies": [
          {
            "id": "service-policy-1",
            "name": {
              "value": "Cancellation Policy",
              "localized_value": [
                {
                  "locale": "en",
                  "value": "Cancellation Policy"
                },
                {
                  "locale": "es",
                  "value": "Política de cancelación"
                }
              ]
            },
            "text_content": {
              "value": "Appointments must be canceled at least 24 hours in advance.",
              "localized_value": [
                {
                  "locale": "en",
                  "value": "Appointments must be canceled at least 24 hours in advance."
                },
                {
                  "locale": "es",
                  "value": "Las citas deben cancelarse con al menos 24 horas de anticipación."
                }
              ]
            }
          }
        ]
      }
    }
  ]
}

Archivo de descriptor

{
  "generation_timestamp": 1663347730,
  "name": "glam.service.v0",
  "data_file": [
    "glam.service.v0_1663347730_0001.json",
    "glam.service.v0_1663347730_0002.json"
  ]
}