| name | extract-whatsapp-sales |
| description | Turn copied WhatsApp Web or WhatsApp Business sales conversations, chat exports, or pasted buyer and seller messages into structured CRM-ready sales records for small businesses and ecommerce sellers. Use when Codex needs to extract customer identity, company, need, product, quantity, budget, deadline, location, objections, questions, promises, order details, buying stage, payment, delivery, unresolved issues, follow-up tasks, urgency and opportunity scores, conversation risks, evidence, missing data, or a recommended reply from WhatsApp conversations. |
Extract WhatsApp Sales
Objective
Convert copied WhatsApp sales conversations into structured, CRM-ready records. Preserve what the chat actually proves, separate explicit facts from inferences, and make the next sales action obvious.
Workflow
-
Ingest the conversation:
- Accept copied WhatsApp Web text, WhatsApp Business text, exported chat text, or user-pasted message snippets.
- Keep message order chronological when possible.
- Identify speaker roles as
customer, seller, team_member, or unknown.
- Preserve timestamps, phone numbers, display names, and quoted product/order details when present.
-
Classify the sales context:
- Determine whether the chat is a new lead, qualification, quotation, negotiation, active order, payment coordination, fulfillment, post-sale issue, lost sale, or mixed thread.
- If one conversation contains multiple buyers or unrelated opportunities, produce one record per customer or opportunity and explain the split.
-
Extract facts using the schema:
- Read
references/crm-record-schema.md before producing the final record.
- Fill unknown or unavailable fields with
null, unknown, or empty arrays as appropriate.
- Never invent prices, addresses, payment status, delivery promises, company names, or order commitments.
- Mark inferred values with
confidence lower than explicit values and include evidence for the inference.
-
Score and flag risk:
- Assign
urgency_score and opportunity_score from 1 to 5 using the rubric in references/crm-record-schema.md.
- Flag conversation risks such as missing price confirmation, unclear quantity, payment uncertainty, address gaps, delivery deadline pressure, complaint language, or unanswered buyer questions.
- Treat payment as confirmed only when the conversation clearly confirms receipt or proof that the seller accepted.
-
Produce the CRM-ready output:
- Default to valid JSON unless the user asks for a table, CSV, spreadsheet-ready rows, or another CRM format.
- Include short evidence snippets for important fields, especially identity, product, quantity, price, deadline, payment, delivery, objections, promises, and follow-up tasks.
- Include a recommended seller reply in the chat's primary language unless the user asks for another language.
- Keep the reply practical: answer open questions, confirm known order details, ask only for missing required information, and propose the next step.
Output Rules
- Use exact values from the chat when available.
- Use
null for unknown scalar values and [] for unknown lists.
- Include currency codes or symbols exactly as written, and normalize only when the chat makes the currency clear.
- Keep phone numbers, names, and addresses as written unless the user requests cleaning or normalization.
- If the user wants CRM import rows, flatten nested objects into columns while retaining evidence and missing-data fields.
- If the source text is too short or not a sales conversation, explain the limitation and provide the smallest useful extraction instead of forcing a full opportunity record.
Out Of Scope
Do not claim to log into WhatsApp, scrape WhatsApp, bypass WhatsApp protections, or send messages through unofficial automation. Work from copied text, authorized exports, user-provided screenshots transcribed to text, or authorized CRM data.