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