Introduction
Appointment Automation owns appointment WhatsApp messages, email cards, customer confirmation, reminders, retries, and run history for each appointment. Scheduled work runs through the centralized Settings / Cron Worker hub.
Do not add a separate appointment cron command. Keep the appointment job enabled in Settings / Cron Worker and use the single central hub cron command shown there.
Automation Cards
| Control | What it does | Practical guidance |
|---|---|---|
| Enabled | Turns one card on or off. | Enable only the messages, emails, and reminders needed for that appointment. |
| Automation card layout | Cards use content-height columns, so short cards stay compact and longer cards continue naturally below them. | Save each card independently after changing its fields. On mobile, cards stack in a single column. |
| Booking Launch Message | Controls the first WhatsApp Flow button message that opens the appointment booking form, including the button label such as Start Booking. | This card sends immediately because the customer needs it to open the form. It does not use delay, retry, or template settings. |
| Send Mode | Chooses Smart, Text Only, Template Only, or Email depending on the card channel. | Use templates when WhatsApp may be outside the 24-hour service window. |
| Template dropdown | Selects the approved WhatsApp template used for WhatsApp cards. | Use clear appointment templates with date/time variables. |
| Manage Variables | Appears beside the template field only when the selected template has body variables. It maps each WhatsApp template slot such as {{1}} or {{2}} to a real appointment token or questionnaire field key. | Map variables before saving template-based cards so sends do not rely on guessing. |
| Add token | Opens a token picker beside the message editor and inserts the selected token into the current card message. | Use it for appointment name, customer name, date, time, payment, Google Meet, and custom questionnaire values. |
| Country Code dropdown | Controls how customer phone numbers are normalized for reminder sending. | Use only when your contact numbers need a consistent country prefix. |
| Lead Minutes | Controls how long before appointment time reminder cards become due. | Example: 60 sends about one hour before appointment time. |
| Delay Minutes | Controls how long after a lifecycle event the card should wait before sending. | Example: 10 on a cancellation/status card sends about 10 minutes after that event. Reminder cards use Lead Minutes for before-appointment timing. |
| Send immediately when delay is 0 | Allows a zero-delay automation card to send inline instead of waiting for a scheduled worker pass where that card supports immediate sending. | Use for booking/payment lifecycle messages that should reach the customer right away. Reminder cards still use reminder timing. |
| Button Label | Controls the visible WhatsApp button text for cards that send buttons, such as Start Booking, Confirm, or Pay Now. | Keep labels short, clear, and action-focused. |
| Retry Limit and Retry Delay | Controls retry behavior for failed automation runs. | Use Recent Runs to see failures and retry manually when needed. Final confirmation/action-button messages are not blindly retried when the button send result is uncertain, so customers do not receive duplicate final confirmation text. |
| Recent Runs filters | Filter run history by journey, status, channel, date range, and row count. | Use this table to review delivery status, retry failed/skipped runs, delete selected logs, or clear logs matching current filters. |
Central Cron Worker Path
Open Settings / Cron Worker. Use the single hub cron command shown there, keep the appointment automation job enabled, and avoid separate appointment-only cron entries.
- Run the hub every minute so reminder windows stay accurate.
- Use CLI PHP, not a browser URL, unless your installation later adds a URL-based bridge for the single hub entry.
- Keep the central job log enabled so failed runs can be reviewed from one place.
- The appointment job inside Cron Worker is the module-specific toggle for Appointment Automation scheduled work.
* * * * * php /home/your-user/domains/your-domain/public_html/your-app/app/Modules/Settings/Workers/cron_hub.php >> /path/to/logs/cron_hub.log 2>&1 Lifecycle And Email Cards
Appointment Automation cards control the booking launch Flow button message, booking flow start follow-up, booking confirmation, customer confirm button, status update, cancellation, reschedule, reminder, advance payment, payment success, and appointment email notifications.
| Field | Purpose |
|---|---|
| Message Template | The approved WhatsApp template to send for the selected event. |
| Template Variable Mapping | Explicitly maps WhatsApp body placeholders to appointment tokens or questionnaire keys so sending does not rely on automatic guessing. |
| Country Code | Optional number normalization for the recipient. |
| Enabled checkbox | Controls whether the card is active. |
| Auto variables | Values such as appointment name, buyer name, phone, email, status, appointment date/time, booking ID, invoice, fees, currency, payment method/status, and Google Meet link. |
| Questionnaire keys | Any extra customer question key such as city, reason, age, vehicle model, or preferred branch can be available after booking confirmation. |
| Email cards | Send through the default SMTP profile only when the booking has a valid customer email address. Missing email appears as a skipped run. Advance Payment Required Email and Payment Success Email are available for payment workflows. |
Example Reminder
A service appointment is scheduled for 4:00 PM.
Reminder is enabled with `Send Reminder Before = 1 hour` and a template containing customer name, appointment date, appointment time, and Google Meet link.
The cron worker runs every minute.
At about 3:00 PM, the worker finds the due booking and sends the reminder template to the customer.
Common Problems
| Problem | Likely cause | Fix |
|---|---|---|
| Reminder saved but not sent | Central Cron Worker is disabled, the appointment automation job is off, or the live hub cron command is missing. | Open Settings > Cron Worker, verify hub status, keep the appointment job enabled, and check Recent Runs. |
| Template not available | Templates were not synced or approved. | Go to Templates, sync approved templates, then reopen reminder setup. |
| Wrong customer phone | Country code or contact number format is incorrect. | Review contact phone and Country Code setting. |
| Missing Google Meet link | Calendar/Meet link generation was not configured or available for that booking. | Check Google Calendar selection and Create Google Meet Link setting. |
| Email card enabled but no email sent | No customer email exists, no default SMTP profile is available, or the run failed/skipped. | Open Appointment Automation > Recent Runs and filter the email card to see whether it was sent, skipped, or failed. |
| Reminder template cannot be saved | One or more WhatsApp body variables are still unmapped. | Map every reminder template variable in Appointment Automation, then save again. |
| Reminder sent with blank variables | Template variables do not match available booking/questionnaire values. | Review lifecycle variable mapping and test with a real booking. |
FAQs & Troubleshooting
Can reminders send without an approved WhatsApp template?
Use an approved template when the reminder may be outside the active customer session. Text Only is useful only inside an active customer service window.
Does disabling a card delete its setup?
No. It pauses that journey while preserving message text, template, variables, and timing.
Why is there no separate appointment cron?
Appointment Automation runs through the centralized Cron Worker hub in Settings. Use only the single hub cron command.
Troubleshooting Checklist
- Verify the appointment is active and the booking time is in the future.
- Verify reminder timing, template, country code, and Reminder Enabled checkbox.
- Verify the single hub cron command runs every minute and the central hub log path is writable.
- Test with one booking before enabling reminders for many appointment campaigns.