DEV Community

Ujjwal Dubey
Ujjwal Dubey

Posted on

Measure Your Reply Times From a WhatsApp Chat Export Before You Buy an AI Tool

Every AI tool pitch promises faster replies. Few owners know how fast they reply today, so there is nothing to compare against after launch. If the business runs on WhatsApp, you can get a rough baseline from a chat export in an afternoon.

This is a small, practical part of auditing a workflow with real history before buying AI: measure the waits first, then decide what to automate.

1. Export a few chats

From the business phone, export a handful of customer chats as text, without media. The export is a plain text file with one message per line, starting with a date and time. The exact format varies by phone, app version and locale, so look at your file before writing the parser.

Two common shapes look like this:

19/10/2026, 09:14 - Customer: Hi, is the blue kurta available in M?
[19/10/2026, 09:14:05] Customer: Hi, is the blue kurta available in M?
Enter fullscreen mode Exit fullscreen mode

2. Parse it

import re
from datetime import datetime

LINE = re.compile(
    r"^\[?(\d{1,2}/\d{1,2}/\d{2,4}),? (\d{1,2}:\d{2}(?::\d{2})?)\]?(?: -)? ([^:]+): (.*)$"
)

def parse(path, fmt_date="%d/%m/%Y"):
    msgs = []
    for raw in open(path, encoding="utf-8"):
        m = LINE.match(raw.strip())
        if not m:
            if msgs:                       # continuation of a multi-line message
                msgs[-1]["text"] += "\n" + raw.strip()
            continue
        d, t, who, text = m.groups()
        tfmt = "%H:%M:%S" if t.count(":") == 2 else "%H:%M"
        ts = datetime.strptime(f"{d} {t}", f"{fmt_date} {tfmt}")
        msgs.append({"ts": ts, "who": who.strip(), "text": text})
    return msgs
Enter fullscreen mode Exit fullscreen mode

Adjust fmt_date (for example %m/%d/%y) and the time format if your export uses 12-hour times with AM/PM.

3. Compute first-reply waits

A "wait" starts when the customer sends a message after the business has gone quiet, and ends at the next business message.

def waits(msgs, business_names):
    out, open_at = [], None
    for m in msgs:
        is_business = m["who"] in business_names
        if not is_business and open_at is None:
            open_at = m["ts"]
        elif is_business and open_at is not None:
            out.append((open_at, (m["ts"] - open_at).total_seconds() / 60))
            open_at = None
    return out
Enter fullscreen mode Exit fullscreen mode

Group the results by hour of day and by weekday. The pattern usually matters more than the average: replies may be quick at noon and slow after 7 p.m., or slow every Monday morning.

4. Keep it private

Run this on the owner's machine. Do not upload chat exports to random online tools. Delete the raw exports when you are done, and keep only the computed waits.

What to do with the numbers

Write down two or three of them in plain words: "evening enquiries wait the longest", "Monday mornings are slow". Those sentences become the success measure for whatever you build or buy. If a vendor cannot say how their tool would change them, keep looking.

Disclosure: I run NxFlowAI, an AI automation agency. We measure a baseline like this in our first audit, which takes 72 hours for one workflow.

Top comments (0)