Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Come aggiungere finestre di annullamento
Le finestre di annullamento definiscono quando i pulsanti Annulla e Modifica sono attivi. Ciò significa che le funzioni di annullamento e modifica non saranno utilizzabili nelle email di conferma dell'utente e scompariranno da tutte le altre piattaforme, inclusa la finestra modale di conferma.
Le finestre di annullamento possono essere attivate in due modi: a livello di servizio e
a livello di slot. Le procedure per specificare le finestre a questi livelli sono discusse di seguito.
Se sono impostate sia una finestra di annullamento a livello di servizio sia una a livello di slot, verrà applicata la finestra
a livello di slot. Se non sono impostati, la finestra di annullamento
viene impostata per impostazione predefinita sull'inizio della fascia oraria (ovvero l'utente può annullare la prenotazione all'ultimo minuto).
Definizione del livello di servizio
Le finestre di annullamento a livello di servizio possono essere attivate specificando rules.min_advance_online_canceling nel feed Service. Questo campo deve essere impostato sul numero di secondi prima dell'ora di inizio della prenotazione che deve essere effettuata. Ad esempio, se la prenotazione può essere annullata solo fino alle 24 ore prima dell'orario di inizio, questo campo viene impostato su 86400 (quindi una prenotazione per le 15:00 può essere annullata solo fino alle 15:00 del giorno precedente).
Questo vale per tutti gli slot per quel servizio
(a meno che non venga ignorato dalla definizione a livello di slot).
[null,null,["Ultimo aggiornamento 2025-07-26 UTC."],[[["\u003cp\u003eCancellation windows control when users can cancel bookings, hiding the cancellation option outside the window.\u003c/p\u003e\n"],["\u003cp\u003eYou can set cancellation windows at the service level (affecting all slots) or the slot level (affecting individual slots).\u003c/p\u003e\n"],["\u003cp\u003eService-level windows use \u003ccode\u003erules.min_advance_online_canceling\u003c/code\u003e in the Service feed to define the minimum time before the booking start when cancellations are allowed.\u003c/p\u003e\n"],["\u003cp\u003eSlot-level windows use \u003ccode\u003escheduling_rule_overrides.last_online_cancellable_sec\u003c/code\u003e in the Availability feed to specify the last time (EPOCH timestamp) a slot can be cancelled.\u003c/p\u003e\n"],["\u003cp\u003eImplementing cancellation windows in feeds doesn't replace handling \u003ccode\u003eBookingFailure\u003c/code\u003e with \u003ccode\u003eOUTSIDE_CANCELLATION_WINDOW\u003c/code\u003e for edge cases in your system.\u003c/p\u003e\n"]]],["Cancellation windows control when cancellations are allowed. They can be set at the service level using `rules.min_advance_online_canceling` in the Service feed (specifying seconds before the reservation start) or at the slot level using `scheduling_rule_overrides.last_online_cancellable_sec` in the availability feed (specifying an EPOCH timestamp). Slot-level settings override service-level settings. If neither is set, cancellations are allowed up until the slot's start. Implementations must handle `OUTSIDE_CANCELLATION_WINDOW` errors for edge cases.\n"],null,["# Set Cancellation Windows\n\nHow to Add Cancellation Windows\n-------------------------------\n\n\nCancellation windows define when the cancel and modify buttons are active. This\nmeans the cancel and modify functions will be inoperable in user confirmation\nemails and will disappear from all other surfaces, including the confirmation modal.\n\n\nCancellation windows can be enabled in two ways: service-level and\nslot-level. The processes for specifying windows at these levels are\ndiscussed below.\n\nIf both a service-level and a slot-level cancellation window are set, the\nslot-level window will take effect. If neither are set, the cancellation window\ndefaults to the start of the time slot (i.e. the user can be cancelled at the\nlast minute).\n\n### Service level definition\n\nService-level cancellation windows can be enabled by specifying\n`rules.min_advance_online_canceling` in the\n[Service](/actions-center/verticals/reservations/e2e/reference/feeds/services-feed#SchedulingRules-definition)\nfeed. This field\nshould be set to the number of seconds in advance of the reservation start\ntime that the booking needs to be made. For example, if the booking can only be cancelled up\nuntil 24h before the start time this field would be set to\n86400 (so a booking for 3pm can only be cancelled until 3pm the previous day).\nThis would apply to all slots for that service\n(unless overridden by [slot level definition](#slot-level)). \n\n### JSON\n\n```json\n{\n \"service\": [\n {\n \"rules\": {\n \"min_advance_online_canceling\": 86400\n }\n }\n ]\n}\n```\n\n### Slot level definition\n\nAt the\n[availability slot level the field is called\n`scheduling_rule_overrides.last_online_cancellable_sec`](/actions-center/verticals/reservations/e2e/reference/feeds/availability-feed#Availability-definition). This\nfield is the last time (EPOCH timestamp) that the specific slot can be cancelled.\nThis would apply to each individual slot where this was specified. \n\n### JSON\n\n```json\n\"service_availability\": [\n {\n \"availability\": {\n \"scheduling_rule_overrides\": {\n \"last_online_cancellable_sec\": 1468081800\n }\n }\n }\n]\n```\n| **Warning** : Implementing cancellation window in feeds does not prevent you from having to implement and handle the [`BookingFailure`](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-difinitions/bookingfailure-definition) `OUTSIDE_CANCELLATION_WINDOW`. There might be edge cases (such as a stall browser tab) where an [UpdateBooking](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-methods/updatebooking-method) might be sent outside of the specified cancellation window. Upon receiving an [UpdateBooking](/actions-center/verticals/reservations/e2e/reference/booking-server-api-rest/e2e-methods/updatebooking-method), your system must confirm that the change occurs within the specified cancellation window and, if it's not, respond with `UpdateBookingResponse.booking_failure = OUTSIDE_CANCELLATION_WINDOW`."]]