> ## Documentation Index
> Fetch the complete documentation index at: https://docs.woopilot.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Smart Queries & Interactive Web Tables

> Instant multi-dimensional search across your entire store catalog, customer segments, and order history

# Deep Reconnaissance & Interactive Web Tables 🔍

When your query returns more than a few rows, text messages in chat become unreadable. WooPilot AI solves this by generating **Interactive Web Table Artifacts** inside the Telegram Mini App (TMA).

With zero app installations required, you get a desktop-grade data exploration experience right inside Telegram.

```text theme={null}
┌─────────────────────────────────────────────────────────────────────────────┐
│ 💬 TELEGRAM CHAT PROMPT:                                                    │
│ "Find all customers who bought in Electronics 2+ times, have had no orders  │
│ in 60 days, and have spent over $300 in total"                              │
├─────────────────────────────────────────────────────────────────────────────┤
│ 🤖 WOOPILOT AI RESPONSE:                                                    │
│ 📦 Found 42 customers matching your criteria (Total LTV: $18,450.00).       │
│ [ 📊 Open Interactive Table (42 customers) ]  <-- (Opens Mini App)          │
└─────────────────────────────────────────────────────────────────────────────┘
```

***

## ⚡ Interactive Web Table Features (TMA)

Inside the Telegram Mini App, every generated table comes loaded with powerful analytical capabilities:

* **Global Search with Mark Highlighting:** Type any keyword, SKU, or email to instantly filter rows with live `<mark>` token highlights.
* **3-Phase Column Sorting:** Tap any column header to sort ascending ($\uparrow$), descending ($\downarrow$), or reset to default order.
* **Tap-to-Copy Cell Values:** Tap any SKU, order ID, or customer phone to copy it directly to your clipboard with tactile haptic feedback.
* **Client-Side Smart Charts:** Switch between Table View and Visual Charts (Line, Bar, Pie/Donut, Area) to visualize trends across any columns.
* **1-Click Export:** Export your exact filtered table view as a `.csv` file or tap **Send to Chat** to receive the document directly in Telegram.

***

## 💬 Example Deep-Dive Queries

### 1. Customer Segmentation & LTV Mining

```text theme={null}
"Find customers with 3+ completed orders whose last purchase was over 90 days ago"
"Show top 20 VIP buyers ranked by total lifetime spend with average check"
"List all customers who used coupon SUMMER2026 and calculate their repeat purchase rate"
```

### 2. Inventory Health & Frozen Capital Audits

```text theme={null}
"Find all products in 'Apparel' with stock > 20 units and zero sales in the last 90 days, and calculate our frozen capital"
"Show products with low stock (<= 3 units) sorted by weekly sales velocity"
"List products missing featured images or SKU numbers"
```

### 3. Order Operations & Gateway Troubleshooting

```text theme={null}
"Show all orders in pending payment status for the last 48 hours with customer country"
"List refunded orders over $100 for the last month with refund reasons"
"Find orders where shipping cost exceeded 20% of the total order value"
```

<Note>
  Interactive table snapshots are preserved in your secure PostgreSQL vault for **7 days**. You can revisit, re-filter, and re-export them anytime from your Telegram chat history.
</Note>


## Related topics

- [System Architecture](/architecture.md)
- [Introduction](/introduction.md)
- [Team Access & Multi-Store Management](/tma/team-access.md)
- [Telegram Mini App (TMA) Suite](/tma/overview.md)
- [Visual Diff Staging Table](/tma/diff-table-staging.md)
