Add ability to send reminder emails to Booking Contacts X time before Opening Instance starts.

Created on 14 September 2022, about 2 years ago
Updated 24 March 2023, over 1 year ago

Motivation

It would be great to send an email out to everyone who claimed a spot the day before, reminding them of the appointment they've set.

Proposed resolution

To handle this is a good way would require adding more fields to Booking Calendar to enable this option, set the lead time to send the email, a place to write the body and subject of the email, then a cron that sends off the emails.

✨ Feature request
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida

    Ended up going a very different direction than what was originally outlined. After chatting with some people I've landed on setting some defaults to help users generate these reminder emails with ECA. That keeps the complexity for Bookable Calendar down and passes off cron based reminder emails off to a different contrib module that works great and is built to make it easy for Admins to setup workflows.

  • πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida

    Here is what was added to README

    By default Bookable Calendar provides transactional type emails when a
    Booking is created. Starting with version 2.2.5 there now is also a built
    in way to send reminder type emails using [eca]( https://www.drupal.org/project/eca β†’ ).
    The default notification that it sends is a reminder email one day before the
    booking starts.

    The database update from 2.2.x to 2.2.5+ should auto install a View need and add
    the `notification` field to Booking Contact. It also should install the ECA
    model needed if your site meets the requirements of having the following modules
    installed:

    - eca_base
    - eca_content
    - eca_user
    - eca_views

    If you are already at 2.2.5 or greater and are missing the ECA workflows provided by
    Bookable Calendar you can install them with a drush command.

    `drush cim --partial --source=modules/contrib/bookable_calendar/config/optional`

    If you're also missing the View that this pulls from named "Booking Notifications" you
    can install that very similarly.

    `drush cim --partial --source=modules/contrib/bookable_calendar/config/install/views.view.booking_notifications.yml`

  • πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida

    Updated readme again with the following.

    Notifications

    Bookable Calendar provides the feature that allows users to send reminder emails using ECA β†’ . Previously, only transactional emails were available when a booking was created. With the version 2.2.5, there is now a default notification email that can be enabled that will send a reminder email one day prior to the booking.

    If you're upgrading from version 2.2.x to 2.2.5+, the database will automatically install the necessary View and add the notification field to Booking Contact. The ECA model will also be installed if your website meets the module requirements of having eca_base, eca_content, eca_user, and eca_views installed.

    If you've already upgraded to version 2.2.5 or higher and are missing the ECA workflows provided by Bookable Calendar, you can install them using a drush command:

    drush cim --partial --source=modules/contrib/bookable_calendar/config/optional

    If you're also missing the View named "Booking Notifications," you can install it using a similar drush command. However, if you've customized any of the default configuration provided by the module and don't want to lose that, it's recommended that you import the config views.view.booking_notifications.yml file through the GUI instead.

    Modifying Notifications

    When you first install the module, all time-based notifications are turned off by default. To turn them on, go to the ECA Workflow page (/admin/config/workflow/eca) and enable "Booking Notifications: Day Before". However, to use this feature, your site must have a properly running cron. The default notification email will be sent 24 hours before the booked opening to the email listed, and will be flagged as "sent" with the value of "day_before".

    The beauty of ECA is that you can easily modify the default workflow or create new ones. For a more comprehensive understanding of ECA and its capabilities, check out their guide or watch the video about using ECA with Bookable Calendar.

    It's important to note that there are two parts to this workflow: the "Booking Notifications" view and the ECA Workflow. By default, the view pulls all Booking Contacts that are between now and +1 day from now. The ECA Workflow then loops over the results in the view and sends the email as long as the notification field does not have the value of "day_before".

    Example of how to make a new Notification

    If you want to make a new notification that would email people one week before their booking here are the steps you would need to take.

    Update the Booking Notifications View

    1. Create a new page, copying the existing one on the Booking Notifications
      display
    2. Change the Filters on the start date to filter to 1 week ahead.
      1. Change >= now to >= +6 days
      2. Change <= +1 day to <= +7 days
    3. Change or take note of or change the machine name

    Create the New ECA Workflow

    1. From the operations dropdown, clone the existing "Booking Notifications: Day Before" Model
    2. Go to edit page of new ECA Model
    3. From right sidebar "general" change the name to be "Booking Notifications: Week Before"
    4. Click the arrow from "Notification" to "Mail" to open the edit screen.
    5. Change "expected field value" from "day_before" to be "week_before"
    6. Click the "Mark Notification As Sent" Task
    7. Change "Field Value" to "week_before"
    8. Click save on model.
  • πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida

    Created a tutorial video on how to use this feature. https://www.youtube.com/watch?v=YiCRBlz1N_Q

  • πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida

    This is now live in 2.2.5

  • Status changed to Fixed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States josh.fabean Florida
Production build 0.71.5 2024