WACM.in Logo
Back to API Overview
Feature Guide

Reminders & Reservations

Schedule automated reminders, manage reservations, and integrate with AI Flow Builder for time-based messaging.

Overview

The Reminders module provides a reservation-based scheduling system for sending timed messages to contacts. It integrates with the Wpbox campaign system for message delivery and the AI Flow Builder for event-driven automation.

Web-Based Module

The Reminders module is managed through the WACM dashboard web interface. There is no external REST API — all configuration is done via the admin panel. Integration with other modules happens through Flowmaker events.

How It Works

1. Create Sources

Define reminder sources (e.g., "Appointment", "Follow-up", "Renewal") with time offsets and campaign templates.

2. Add Reservations

Create reservations for contacts with specific dates/times. Each reservation triggers automatic message scheduling.

3. Messages Sent

The CheckDueReminders job runs every minute, finds due reminders, and dispatches messages via the campaign system.

Data Model

Source

A Source defines the reminder template — what message to send, when to send it, and which campaign template to use.

ParameterTypeRequiredDescription
idintegerOptionalAuto-incrementing primary key
namestringRequiredSource name (unique per company)
company_idintegerRequiredCompany ID (auto-set from authenticated user)
time_offsetstringRequiredTime offset from the reservation date (e.g., "5 minutes", "1 day", "2 hours")
time_typestringRequiredUnit: <code>minutes</code>, <code>hours</code>, or <code>days</code>
campaign_idintegerRequiredID of the Wpbox campaign template to use

Reservation

A Reservation links a contact to a Source with a specific date/time. The system automatically calculates when the reminder is due.

ParameterTypeRequiredDescription
idintegerOptionalAuto-incrementing primary key
source_idintegerRequiredReference to the Source
contact_idintegerRequiredReference to the Wpbox Contact
start_datedatetimeRequiredWhen the reservation starts (when the time offset is calculated from)
end_datedatetimeOptionalOptional end date for the reservation
external_idstringOptionalOptional external reference ID
statusstringRequired<code>pending</code>, <code>sent</code>, <code>cancelled</code>

Reminder

A Reminder is an individual scheduled message created when a Reservation is processed. It tracks whether the message has been sent.

ParameterTypeRequiredDescription
idintegerOptionalAuto-incrementing primary key
reservation_idintegerRequiredReference to the Reservation
namestringRequiredReminder name (from Source)
typestringRequiredReminder type (from Source)
time_offset_minutesintegerRequiredCalculated offset in minutes from start_date
scheduled_atdatetimeRequiredWhen the reminder should fire (start_date + offset)
campaign_idintegerRequiredCampaign to use for message delivery
statusstringRequired<code>pending</code>, <code>sent</code>, <code>failed</code>
sent_atdatetimeOptionalWhen the message was actually sent

Flowmaker Events

The Reminders module dispatches two events that can trigger AI Flow Builder flows:

EVENT_REMINDER_DUE

Fired when a scheduled reminder reaches its due time. The CheckDueReminders job processes these every minute.

Available Variables:

ParameterTypeRequiredDescription
reminderJSONOptionalContains: reminder_id, name, type, time_offset_minutes, scheduled_at, source_name, reservation_id, reservation_start_date, reservation_end_date, reservation_external_id
reminder_dataJSONOptionalRaw event payload

EVENT_RESERVATION_CREATED

Fired when a new reservation is created via the dashboard. Use this to send confirmation messages or trigger onboarding flows.

Available Variables:

ParameterTypeRequiredDescription
reservationJSONOptionalContains: reservation_id, source_name, start_date, end_date, external_id
reservation_dataJSONOptionalRaw event payload

Negative Variables

When a reminder is sent via the campaign system, the following negative variables are available for template personalization:

ParameterTypeRequiredDescription
-4stringOptionalReservation start date (formatted)
-5stringOptionalReservation end date (formatted)
-6stringOptionalSource name
-7stringOptionalReservation external ID
-8stringOptionalReservation start date (raw)
-9stringOptionalReservation end date (raw)
-10stringOptionalSource name (alternative format)
Template Example
Hi {{1}},

This is a reminder for your appointment on {{-4}}.

Source: {{-6}}
External Reference: {{-7}}

See you soon!

Configuration

The Reminders module can be configured in modules/Reminders/Config/config.php:

ParameterTypeRequiredDescription
job_timeoutintegerOptionalTimeout for the CheckDueReminders job in seconds (default: 120)
job_triesintegerOptionalNumber of retry attempts on failure (default: 3)
dedup_cache_ttlintegerOptionalTTL in seconds for duplicate message prevention (default: 3600)
window_minutesintegerOptionalHow many minutes ahead to look for due reminders (default: 5)

How Messages Are Created

  1. Source Created — Admin creates a Source with a campaign template and time offset
  2. Reservation Created — Admin adds a Reservation with a contact and start date
  3. Messages Generated — The system creates individual Reminder records based on the Source time offset
  4. Messages Sent — The CheckDueReminders job runs every minute, finds reminders where scheduled_at < now(), and dispatches them via the campaign system
  5. Status Updated — After sending, the reminder status is updated to sent and the campaign message is created

Integration with Other Modules

Wpbox Campaigns

Reminders use the Wpbox campaign system for message delivery. Each Source is linked to a campaign template, and messages are created as campaign messages with negative variable substitution.

AI Flow Builder

Use the reminder_due and reservation_created trigger nodes to build automated flows that respond to reminder and reservation events.

  • reminder_due — Triggered when a reminder fires
  • reservation_created — Triggered when a new reservation is created

Contacts

Each reservation is linked to a Wpbox contact. The system looks up contacts by phone number when creating reservations via the API.

Related Documentation