Skip to main content

Introduction

All Lovi notification endpoints support scheduling for future delivery. This feature allows you to send notifications at optimal times considering recipient timezones and business hours.

📅 Scheduling Parameters

Both WhatsApp and Voice notifications support the following scheduling parameters:

Parameters

Default Behavior: If datetime_sending is not provided, the notification is sent immediately.

🕐 Datetime Format

Supported ISO 8601 Formats

Alternative formats:

Important Notes

  • Future Date Required: The datetime must be in the future
  • ISO 8601 Strict: Use standard ISO 8601 format
  • Timezone Recommended: Always specify timezone for scheduled messages
  • UTC Default: If timezone is omitted, UTC is used

🌍 Supported Timezones

Common Business Timezones

European Timezones


📋 Examples

WhatsApp Scheduled Notification

Immediate sending (no scheduling):
Scheduled for specific time:

Voice Scheduled Notification

Flat Structure with Scheduling (unflatten=true)


⚙️ Validation Rules

Date Validation

  • ✅ Future dates only: Must be later than current time
  • ✅ Maximum advance: Up to 1 year in advance
  • ✅ Format strict: Must follow ISO 8601
  • ❌ Past dates: Will be rejected
  • ❌ Invalid format: Non-ISO dates rejected

Timezone Validation

  • ✅ Valid IANA codes: Use standard timezone database
  • ✅ Case sensitive: Exact format required
  • ❌ Abbreviations: Don’t use CET, EST, etc.
  • ❌ Invalid codes: Unknown timezones rejected

Examples of Valid/Invalid

✅ Valid:
❌ Invalid datetime:
❌ Invalid timezone:

🚀 Best Practices

Optimal Timing

WhatsApp Messages:
  • Business hours: 9:00 AM - 6:00 PM local time
  • Avoid early/late: Not before 8:00 AM or after 9:00 PM
  • Weekend consideration: Adjust for weekend preferences
  • Holiday awareness: Check local holidays
Voice Calls:
  • Business hours only: 9:00 AM - 5:00 PM local time
  • Workdays preferred: Monday through Friday
  • Lunch hours: Avoid 12:00 PM - 2:00 PM
  • Cultural sensitivity: Respect local customs

Timezone Strategy

  1. Store user timezones: Save preferred timezone per contact
  2. Local time display: Show times in user’s local timezone
  3. Business hour logic: Calculate optimal sending times
  4. Daylight saving: IANA codes handle DST automatically

Scheduling Workflow


📊 Response Examples

Successful Scheduling

Immediate Sending


⚠️ Common Errors

Past Date Error

Invalid Timezone Error

Invalid Format Error


🛠️ Development Tips

Testing Scheduling

  1. Use near future: Test with times 5-10 minutes ahead
  2. Timezone testing: Test different timezone scenarios
  3. Edge cases: Test daylight saving transitions
  4. Error handling: Test with invalid dates/timezones

Production Considerations

  • Buffer time: Add 2-3 minutes buffer for processing
  • Monitoring: Monitor scheduled vs actual send times
  • Retry logic: Handle temporary failures gracefully
  • Logs: Log scheduling details for debugging

Timezone Resources

  • IANA Database: Official timezone database
  • Online converter: Use tools to verify timezone codes
  • Documentation: Keep timezone reference for developers