Understanding Automation in Hiro
Hiro’s automation system is built around two core concepts:- RFM-Based Workflows: Automatically engage customers based on their Recency, Frequency, and Monetary value
- Behavioral Workflows: Trigger actions based on customer behavior (birthdays, reservations, feedback)
All workflows are pre-configured and optimized for hospitality. Simply enable the ones you need.
Automation Architecture
Hiro uses two automation engines:1. RFM Automation Engine
Pre-built workflows for customer lifecycle management:frontend/lib/automations/rfm-workflows.ts:9-23
2. Inngest Background Jobs
Scheduled tasks for data processing:- Sync Cover Manager: Every 30 minutes
- Sync Revo TPV: Every 15 minutes
- Calculate Loyalty: Daily at 2 AM
frontend/lib/inngest/functions.ts
Pre-Built RFM Workflows
Hiro includes 6 pre-configured RFM workflows:Champions VIP Experience
Trigger: Customer in Champions segment (RFM 555)Action: Offer exclusive VIP experience every 3 monthsPurpose: Maintain and maximize your best customers
At Risk Re-engagement
Trigger: Customer in At Risk segment (inactive 90+ days)Action: Send re-engagement campaign immediatelyPurpose: Win back customers before they churn
Cannot Lose Them Urgent
Trigger: High-value customer at risk (inactive 120+ days)Action: Urgent personalized campaign + team notificationPurpose: Emergency intervention for valuable customers
Hibernating Reawakening
Trigger: Customer hibernating (inactive 180+ days)Action: Reactivation campaign every 2 monthsPurpose: Last-ditch effort to recover lost customers
Loyal Customers Engagement
Trigger: Customer in Loyal segmentAction: Special offers every 60 daysPurpose: Keep loyal customers engaged
Potential Loyalists Onboarding
Trigger: New customer with high potential (2-5 visits)Action: Premium onboarding sequencePurpose: Convert new customers into loyal ones
frontend/lib/automations/rfm-workflows.ts:29-224
Behavioral Workflows
These workflows trigger based on customer actions:Birthday Celebration
Trigger: 7 days before customer’s birthday Action: Send birthday offerfrontend/lib/automations/rfm-workflows.ts:233-261
NPS Negative Escalation
Trigger: Customer gives NPS ≤ 6 Action: Alert team + send follow-upfrontend/lib/automations/rfm-workflows.ts:263-292
First Reservation Welcome
Trigger: Customer completes first reservation Action: Send welcome email 1 day laterfrontend/lib/automations/rfm-workflows.ts:294-322
Post-Visit Feedback Request
Trigger: 2 days after reservation completion Action: Request feedback (max once per 30 days)frontend/lib/automations/rfm-workflows.ts:324-352
Enabling Workflows
Browse Available Workflows
Review pre-built workflows organized by category:
- RFM Workflows
- Behavioral Workflows
- Temporal Workflows
Enable a Workflow
Toggle the switch next to the workflow you want to activate.The workflow will:
- Start monitoring for trigger conditions
- Execute actions when conditions are met
- Track execution history
Configure Workflow Settings (Optional)
Click the workflow to customize:
- Frequency limits
- Email templates
- Target segments
- Notification recipients
Workflow Execution Flow
Advanced Workflow Configuration
Frequency Limits
Prevent over-communication:Conditional Actions
Execute different actions based on conditions:- High Priority
- Medium Priority
- Low Priority
Cannot Lose Them workflow:
Background Jobs
Hiro runs scheduled jobs for data processing:Cover Manager Sync
Schedule: Every 30 minutes Purpose: Sync reservations from Cover Managerfrontend/lib/inngest/functions.ts:15-50
Revo TPV Sync
Schedule: Every 15 minutes Purpose: Sync orders and revenue from Revo POSfrontend/lib/inngest/functions.ts:56-91
Loyalty Calculation
Schedule: Daily at 2 AM Purpose: Calculate customer RFM scores and loyalty tiersfrontend/lib/inngest/functions.ts:97-130
Manual Workflow Triggers
You can manually trigger workflows via API:Monitoring Automation Performance
Automation Dashboard
View key metrics:- Active Workflows: How many workflows are running
- Executions Today: Total triggers today
- Success Rate: Percentage of successful executions
- Top Performing: Workflows with highest engagement
Execution History
Track individual workflow runs:Debugging Failed Workflows
Check logs when a workflow fails:- Navigate to Marketing > Automations
- Click on the workflow
- View Execution History
- Click on failed execution
- Review error details and customer data
Best Practices
Start with High-Priority Workflows
Enable these first:
- Cannot Lose Them (save high-value customers)
- At Risk Re-engagement (prevent churn)
- NPS Negative Escalation (fix issues fast)
Set Appropriate Frequency Limits
Avoid spam:
- Champions: Every 90 days
- At Risk: Every 30 days
- Hibernating: Every 60 days
- Feedback: Max once per 30 days
Personalize Email Templates
Customize templates with:
- Customer name
- Favorite dishes
- Last visit date
- Loyalty tier
Monitor and Optimize
Track metrics weekly:
- Open rates by workflow
- Conversion rates
- Customer responses
- Adjust templates and timing
Troubleshooting
Workflow not triggering
Workflow not triggering
Check:
- Workflow is enabled (toggle is ON)
- Trigger conditions are being met
- Frequency limits haven’t been hit
- Customer is in the correct segment
Customer receiving too many emails
Customer receiving too many emails
Review frequency settings:
Background job not running
Background job not running
Check Inngest dashboard:
- Navigate to
/api/inngest - Verify function is registered
- Check last execution time
- Review error logs
Template not rendering correctly
Template not rendering correctly
Verify template variables:
- All placeholders exist in customer data
- Date formats are correct
- Images are accessible
- Links are valid
Next Steps
View Analytics
Track automation performance in the analytics dashboard
Customer Segmentation
Learn how RFM segments power automation
Email Templates
Customize templates for your workflows
Automations API
Trigger workflows programmatically
