Có nhiều trường hợp mà người bán muốn khách hàng đặt trước một khoảng thời gian tối thiểu để đặt các dịch vụ hoặc khung giờ cụ thể. Bạn có thể đặt các giá trị này ở cấp dịch vụ và/hoặc ở cấp tình trạng còn hàng. Nếu bạn đặt ở cả hai cấp, thì chế độ cài đặt ở cấp tình trạng còn hàng sẽ được sử dụng.
Định nghĩa về mức dịch vụ
Ở cấp dịch vụ, trường này được gọi là rules.min_advance_booking. Bạn nên đặt trường này thành số giây trước thời gian bắt đầu đặt phòng mà bạn cần đặt phòng. Ví dụ: nếu bạn luôn phải đặt trước 1 giờ trước thời gian bắt đầu, thì trường này sẽ được đặt thành 3600 (vì vậy, bạn có thể đặt trước 3 giờ chiều cho đến 2 giờ chiều). Điều này sẽ áp dụng cho tất cả các khung giờ cho dịch vụ đó (trừ phi bị ghi đè bởi định nghĩa cấp khung giờ).
[null,null,["Cập nhật lần gần đây nhất: 2024-11-26 UTC."],[[["Merchants can set a minimum advance booking time for services, ensuring bookings are made within a specified timeframe before the service start time."],["This can be configured at the service level (affecting all slots) or at the individual slot level, offering flexibility in setting booking windows."],["Service-level settings use `rules.min_advance_booking` (in seconds), while slot-level settings use `scheduling_rule_overrides.last_bookable_sec` (as an EPOCH timestamp)."],["Merchants still need to validate booking requests against the booking window on their end and handle potential booking failures appropriately, as feed-based limits might not cover all edge cases."]]],["Merchants can set minimum advanced booking times for services or slots. At the service level, the `rules.min_advance_booking` field specifies the minimum seconds needed before a reservation's start time. At the slot level, `scheduling_rule_overrides.last_bookable_sec` defines the last bookable time via an epoch timestamp. If both are set, the slot-level rule takes precedence. Regardless of feed settings, the booking system must validate booking windows upon receiving a `CreateBooking` request and respond with `SLOT_UNAVAILABLE` if the booking is outside the allowed window.\n"]]