Skip to main content

Overview

The Message Buffer System groups messages from the same phone number during a configurable time period. This is optional and backwards compatible.

Quick Setup

Just add enableBuffer: true to your webhook processor:

Why Use It?

  • AI Bots: Get complete conversation context
  • Performance: Reduce handler calls for message bursts
  • Analysis: Process related messages together
Example: User sends 3 messages quickly
  • Without buffer: 3 separate handler calls
  • With buffer: 1 handler call with all 3 messages

Configuration

Basic Example

Without Buffer (Default)

Your existing code works unchanged:

All Message Types Supported

Works with all handlers: onTextMessage, onImageMessage, onButtonClick, etc.

Simple Pattern