Message Reaction
Triggered when a user reacts to a message with an emoji.
Best practices
Use this for interactive polling or feedback logic in your bot.
Track which specific message ID the reaction belongs to using the payload.
The Micro-Engagement Signal: Harnessing Message Reactions (Emojis)
In the evolution of digital discourse, the traditional text reply is no longer the sole unit of engagement. The Message Reaction—the ability to attach a single emoji to a message—has become a fundamental method of low-friction, high-nuance communication. Within the Wawp platform, the [message.reaction] webhook provides your infrastructure with real-time visibility into these micro-moments of sentiment.
This guide provides an architectural overview of how to treat reactions as strategic data points, moving beyond "Simple Emoji Tracking" into the realm of Interactive Triage and Sentiment Analysis.
🏗️ Architectural Philosophy: Reactions as Low-Friction Content
To master the Reaction API, one must first recognize the psychology of the interface. A reaction is a "Zero-Typing" response. It allows a user to acknowledge, validate, or escalate a conversation without the cognitive effort of composing a sentence.
1. The Intent behind the Gesture
A reaction is a Contextual Modifier. It changes the meaning of the message it is attached to.
- The Acknowledgment (Checkmark/Thumbs Up): This confirms receipt and agreement. In a task-management or logistical context, this reaction is as binding as a "Yes" message.
- The Emotional Nuance (Heart/Fire/Laugh): These provide raw sentiment data. They tell your system how the customer feels about your support advice or marketing offer, providing a layer of emotional intelligence that text-based NLP (Natural Language Processing) often struggles to capture.
- The Removal Signal: A reaction event with an empty string or a "Revoked" state indicates the user has changed their mind. This "Correction" is a critical data point for long-term sentiment tracking, showing where a brand interaction may have moved from positive to neutral.
2. The Relationship Between Parent and Child
A reaction is technically a "Child Event" of a parent message. Your architecture must maintain a strong Referential Integrity between the [messageId] in the reaction payload and the original message stored in your database. This allows you to reconstruct the "Reaction Profile" of a specific interaction, identifying which agents or message types are generating the most positive engagement.
🚀 Strategic Use Cases: Powering Reactive Intelligence
Reactions transform passive chat monitoring into an active engine of engagement.
1. Interactive Polling and "Choose Your Own Adventure"
Instead of asking users to type "1" or "2", your bot can present a menu of options and ask users to "React with an emoji to vote." This reduces friction and increases completion rates for surveys or product selections.
- Strategic Workflow: A travel bot sends three hotel options. The user reacts to the second one with a "Star" emoji. The [
message.reaction] webhook triggers the booking flow for that specific ID. This creates a "Click-less" UI that feels modern and intuitive.
2. Real-Time Sentiment Triage for Support Teams
In a high-intensity support environment, time is of the essence. Your system can monitor the reaction stream in real-time. If a user reacts to a bot's message with a "Frown" or an "Angry" emoji, the system should treat this as a "Negative Sentiment Trigger." The Actionable Logic: The system automatically escalates the chat to a human supervisor and tags the interaction as "At Risk." Conversely, a "Heart" or "Thumbs Up" on a bot's resolution can automatically trigger a "CSAT" (Customer Satisfaction) score update in your CRM without the user ever filling out a form.
3. "Reaction-to-Reward" Marketing Funnels
Convert micro-engagement into tangible sales. When a user reacts to a broadcast marketing message (e.g., a "New Collection" announcement) with a "Fire" or "Heart" emoji, the [message.reaction] webhook can instantly trigger a personalized coupon code: "We love that you love the new collection! Here is a 10% discount code just for you." This "In-the-Moment" rewards system capitalizes on positive sentiment before it fades.
🛡️ Administrative Mandate: Scaling the Perception Layer
Handling reactions at scale requires a focus on "Data Density" and "Signal Filtering."
1. Filtering Noise from Insight
Not every reaction requires a business action. Your system should implement a "Strategic Reaction Map." Decide which emojis are "Actionable" (e.g., Thumbs Up = Confirm) and which are "Informational" (e.g., Laugh = Neutral Sentiment). This prevents your worker fleet from being overwhelmed by non-essential events while ensuring that every critical signal is processed with high priority.
2. The Idempotency of the Gesture
WhatsApp allows users to change their reaction multiple times. A user might move from a "Thumbs Up" to a "Heart" to "Nothing." Your architecture should handle this by treating each reaction event as a "State Overwrite". Maintain a "Latest Reaction" field in your database for each message ID to ensure your UI and reporting always reflect the user's final sentiment.
🛡️ Operational Best Practices: Optimizing the Interactive Loop
- The "Double Acknowledgement" Rule: For critical interactive polling (e.g., "React to Confirm Appointment"), your bot should send a follow-up text once the reaction is received: "Thanks for the thumbs up! Your appointment is confirmed for Tuesday at 3 PM." This ensures the user that their gesture was "Heard" by the automated system.
- Managing Reaction Latency: For a smooth user experience, your bot's response to a reaction should arrive within 2 seconds. Ensure your reaction webhook handler is optimized for high-speed lookup of the parent
messageIdin your database. - Privacy and Group Dynamics: In group chats, multiple users can react to the same message. The [
senderId] field is vital here. Your system should track the "Reaction Count" per emoji per message, allowing you to build "Consensus Monitoring" for internal team polls or community engagement.
⚙️ Engineering Best Practices: The Validation Loop
- Monitor "Reaction-to-Reply" Ratios: High numbers of reactions relative to text replies indicate a healthy, frictionless communication channel. If your users are reacting but not replying, it means your bot is providing clear, concise value that requires no further typing from them.
- Verify Parent Integrity: Before processing a reaction, verify that the [
messageId] belongs to an active, non-archived conversation. This prevents "Orphaned Reactions" from triggering legacy logic in your system. - Coordinate with Revocations: If the parent message is revoked by the sender, your system should logically decide if the reactions attached to it are still relevant for your historical sentiment analysis or if they should be purged from the dashboard.
🎯 Conclusion: Mastering the Art of the Subtle Gesture
The Message Reaction Webhook is the "Sentiment Sensor" of your digital brand. By building an architecture that listens to these subtle, high-nuance signals, you move your business from "Reading Text" to Understanding Emotion. You build systems that respond to gestures, reward engagement, and triage frustration before it escalates. In the world of Wawp, a reaction is not just an emoji; it is the strategic signal that turns a static message into a living, responsive conversation.
Expected Responses
Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.
Example
{
"id": "evt_01...",
"timestamp": 1634567890123,
"session": "default",
"metadata": {
"user.id": "123",
"user.email": "email@example.com"
},
"engine": "WEBJS",
"event": "message.reaction",
"payload": {
"id": "false_11111111111@c.us_...",
"reaction": "❤️",
"senderId": "11111111111@c.us",
"messageId": "false_11111111111@c.us_AAAAA"
},
"me": {
"id": "11111111111@c.us",
"lid": "123@lid",
"pushName": "Instance"
}
}Command Palette
Search for a command to run...