Prerequisites
Before sending messages, ensure you have completed these steps:- App Registration: Register your app with Dialect (see the registration guide if you need to set this up)
- SDK Setup: Initialize the Dialect SDK (see our Setup & Configuration guide if you havenโt done this yet)
- User Subscriptions: Have users subscribed to your app (see our User Management guide for subscription setup)
Message Delivery Overview
Dialectโs messaging system provides flexible delivery options:- Channel Selection: Messages are sent according to user channel preferences (IN_APP, email, Telegram)
- User Targeting: Send to individual users, groups, or broadcast to all subscribers
- Rich Content: Support for titles, actions, images, and formatted content
- Topic-Based: Optional targeting based on notification types/topics
Step 1: Basic Message Sending
Send to a Single User
Send a notification to a specific userโs wallet address. This is the most common messaging pattern.Send to Multiple Users
Send the same notification to a specific set of users by providing multiple wallet addresses.Broadcast to All Users
Send notifications to all users subscribed to your app. When no recipient is specified, Dialect defaults to broadcasting to all subscribers.Step 2: Channel-Specific Delivery
Target Email and Telegram
Control which channels receive your message by specifyingaddressTypes
. Note that IN_APP notifications are always delivered, so you only need to specify additional channels like Email and Telegram.
Email-Optimized Messages
When sending to email channels, ensure you provide a clear title as it becomes the email subject line.Step 3: Interactive & Rich Messages
Actionable Notifications
Add buttons to your notifications that allow users to take immediate action. Currently supports one action button that can direct users to a website.Rich Content Messages
Include additional context and formatting to make your messages more engaging and informative. Email channels support full HTML formatting, while other channels use plain text.Step 4: Topic-Based Messaging
Send to Topic Subscribers
If youโve configured notification types/topics, you can send targeted messages to users who have subscribed to specific categories.Topic-Specific Content
Tailor your message content to match the expectations of users who subscribed to specific topics.Message Examples by Use Case
Welcome Message
Transaction Alert
Security Alert
Price Alert
Best Practices
๐ก Message Design Tips:- Keep titles concise and descriptive (especially important for email subjects)
- Structure longer messages with clear sections
- Always include clear calls-to-action when appropriate
- Test your messages across different channels (IN_APP vs email vs Telegram)
- Implement proper error handling and retry logic for critical notifications
- Consider user time zones when sending time-sensitive notifications
- Respect user preferences and subscription settings
- Provide context in your messages - users should understand why theyโre receiving the notification
- Use topic-based messaging to ensure relevance