Skip to main content

Appointment reminder

We create AppointmentReminder in two cases:

  • when the appointment is created (different ways of booking in Appointments::StateChangeService)
  • as a part of Scheduled::BulkScheduleAppointmentRemindersJob that we call every night (0 3 * * *) and it creates reminders for the appointments (uniq for customer_id and date) without it

Then, at the beginning of each hour (0 * * * *), we call Scheduled::RemindAppointmentsJob that selects all the reminders that should be reminded in the next hour and calls for them RemindAppointmentsJob.

SMS notification rules​

We send SMS only if:

  • we didn't send an SMS for the same booking token or we send an SMS only for appointments with the same booking token but earlier start time
  • the reminder time is in the future
  • we don't have any appointments with the same booking token that start in the next 30 minutes
  • we didn't already send a push notification for the appointment