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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Optional | Auto-incrementing primary key |
| name | string | Required | Source name (unique per company) |
| company_id | integer | Required | Company ID (auto-set from authenticated user) |
| time_offset | string | Required | Time offset from the reservation date (e.g., "5 minutes", "1 day", "2 hours") |
| time_type | string | Required | Unit: <code>minutes</code>, <code>hours</code>, or <code>days</code> |
| campaign_id | integer | Required | ID 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Optional | Auto-incrementing primary key |
| source_id | integer | Required | Reference to the Source |
| contact_id | integer | Required | Reference to the Wpbox Contact |
| start_date | datetime | Required | When the reservation starts (when the time offset is calculated from) |
| end_date | datetime | Optional | Optional end date for the reservation |
| external_id | string | Optional | Optional external reference ID |
| status | string | Required | <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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Optional | Auto-incrementing primary key |
| reservation_id | integer | Required | Reference to the Reservation |
| name | string | Required | Reminder name (from Source) |
| type | string | Required | Reminder type (from Source) |
| time_offset_minutes | integer | Required | Calculated offset in minutes from start_date |
| scheduled_at | datetime | Required | When the reminder should fire (start_date + offset) |
| campaign_id | integer | Required | Campaign to use for message delivery |
| status | string | Required | <code>pending</code>, <code>sent</code>, <code>failed</code> |
| sent_at | datetime | Optional | When 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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| reminder | JSON | Optional | Contains: reminder_id, name, type, time_offset_minutes, scheduled_at, source_name, reservation_id, reservation_start_date, reservation_end_date, reservation_external_id |
| reminder_data | JSON | Optional | Raw 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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| reservation | JSON | Optional | Contains: reservation_id, source_name, start_date, end_date, external_id |
| reservation_data | JSON | Optional | Raw event payload |
Negative Variables
When a reminder is sent via the campaign system, the following negative variables are available for template personalization:
| Parameter | Type | Required | Description |
|---|---|---|---|
| -4 | string | Optional | Reservation start date (formatted) |
| -5 | string | Optional | Reservation end date (formatted) |
| -6 | string | Optional | Source name |
| -7 | string | Optional | Reservation external ID |
| -8 | string | Optional | Reservation start date (raw) |
| -9 | string | Optional | Reservation end date (raw) |
| -10 | string | Optional | Source name (alternative format) |
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| job_timeout | integer | Optional | Timeout for the CheckDueReminders job in seconds (default: 120) |
| job_tries | integer | Optional | Number of retry attempts on failure (default: 3) |
| dedup_cache_ttl | integer | Optional | TTL in seconds for duplicate message prevention (default: 3600) |
| window_minutes | integer | Optional | How many minutes ahead to look for due reminders (default: 5) |
How Messages Are Created
- Source Created — Admin creates a Source with a campaign template and time offset
- Reservation Created — Admin adds a Reservation with a contact and start date
- Messages Generated — The system creates individual Reminder records based on the Source time offset
- Messages Sent — The
CheckDueRemindersjob runs every minute, finds reminders wherescheduled_at < now(), and dispatches them via the campaign system - Status Updated — After sending, the reminder status is updated to
sentand 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 firesreservation_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
- WhatsApp Business API — Campaign and message delivery
- Campaigns — Campaign creation and management
- AI Flow Builder — Build automation flows with reminder triggers
- AI Flow API — Generate flows programmatically