Skip to main content

Overview

Once storage is enabled, the SDK provides powerful methods to query and analyze your WhatsApp messages. This guide covers all available query methods with practical examples.
Make sure you’ve completed the Supabase Integration setup before using these methods.

Get Conversation History

Retrieve all messages from a conversation with a specific phone number.

Method Signature

Basic Usage

With Date Range

Pagination

Response Structure


Search Messages

Search for messages containing specific text across all conversations or within a specific conversation.

Method Signature

Search Within Conversation

Search by Message Type

Search with Date Range

Advanced Search Example


Get Message Thread

Retrieve all replies to a specific message, useful for tracking conversation context.

Method Signature

Basic Usage

Track Support Tickets


Get Conversation Analytics

Analyze conversation patterns, response rates, and engagement metrics.

Method Signature

Basic Usage

Response Structure

Calculate Customer Satisfaction

Team Performance Dashboard


Export Conversation

Export conversation data for backup, compliance, or analysis purposes.

Method Signature

JSON Export

CSV Export

Export with Date Range

Automated Daily Backups


Advanced Query Patterns

Time-Based Analysis

Customer Segmentation


Performance Tips

1. Use Pagination

Always paginate large result sets:

2. Filter by Date

Narrow down queries with date ranges:

3. Cache Frequent Queries


Next Steps

Supabase Setup

Set up Supabase storage integration

Best Practices

Learn storage best practices

Custom Adapters

Build custom storage adapters

Webhook System

Understand webhook integration