-
-
Problem-Solution
-
Current Architecture Diagram
-
Future Architecture Diagram
-
Customer Retention Workflow
-
Overview of System
-
Alert Centre
-
Customer List
-
Customer Details
-
AVO AI CHAT
-
AVO Recommendation
-
Retention Action
-
Recommendation from conversation
-
Action Plan from Recommendations
-
Marketing Intelligence
-
Campaign Studio
Inspiration
Many Malaysian B2B and MSME customer-facing teams manage customer relationships across spreadsheets, transaction exports, WhatsApp, email, support notes, and manual follow-up reminders.
Each source contains part of the customer story, but the evidence is rarely connected. A declining purchase pattern may exist in one file, a cancellation warning in a conversation, and a missed follow-up in someone’s notes. By the time these signals are assembled, the customer may already be leaving.
We also noticed that many AI-assisted workflows end when the model produces a summary or recommendation. They do not establish:
- Which evidence supports the conclusion
- Who owns the next action
- Whether approval and consent were enforced
- What happened after the action
- Whether the outcome changed the customer’s risk
That inspired CustomerPulse AI and its central principle:
Evidence before intervention.
We wanted AI to help teams understand customer evidence without becoming an unaccountable decision-maker. Every important conclusion should be explainable, every intervention should have a human owner, and every outcome should feed back into the operational record.
Try the live CustomerPulse AI application or review the GitHub repository.
What it does
CustomerPulse AI is a governed customer-retention and marketing workspace.
Users create isolated projects and import:
- Customer records
- Transactions
- Authorized customer conversations
- Product catalogues
- Customer-service guidelines
- Marketing policies
- Campaign results
The system validates and normalizes these records before updating the selected project. Customers, conversations, transactions, documents, alerts, actions, campaigns, analytics, and audit history remain isolated between projects.
Explainable churn-risk calculation
CustomerPulse calculates an operational churn-risk index:
$$ R = \operatorname{clamp} \left( 8 + R_{\text{recency}} + R_{\text{frequency}} + R_{\text{spending}} + \sum S_{\text{validated}} + \sum E_{\text{responses}} + \sum E_{\text{outcomes}}, 0, 100 \right) $$
The current risk bands are:
| Risk index | Classification |
|---|---|
| (0)–(34) | Low |
| (35)–(59) | Medium |
| (60)–(79) | High |
| (80)–(100) | Critical |
Before conversation analysis, the behavioral components include:
- An 8-point base
- Purchase recency deterioration
- Purchase-frequency deterioration
- Spending deterioration
For example, a frequency trend of (-20\%) contributes approximately (+10) points, while a spending trend of (-30\%) contributes approximately (+15) points.
The system also calculates estimated revenue at risk:
$$ \text{ERAR} = \text{Eligible 90-day revenue base} \times \frac{R}{100} $$
ERAR is a decision-support estimate. The current risk index is not presented as a statistically calibrated probability of guaranteed churn or revenue loss.
Evidence-linked AVO analysis
AVO analyzes authorized customer conversations and returns:
- An evidence-linked summary
- Sentiment and intent
- Complaints and unresolved issues
- Cancellation indicators
- Competitor mentions
- Price objections
- Missed commitments
- Confidence and uncertainty
- Exactly three operational action plans
- One separate editable customer-message draft
Every cited message ID must exist in that customer’s supplied conversation. Analyses with at least (70\%) confidence can produce validated signals for automatic scoring. Lower-confidence findings remain marked as Staff Review Required and are excluded from automatic scoring.
AVO does not:
- Set the authoritative risk index
- Select its own action plan
- Approve its own recommendation
- Bypass customer consent
- Claim an intervention succeeded
- Automatically reduce customer risk
Governed retention workflow
The retention workflow continues beyond recommendation generation:
Customer evidence
→ Behavioral risk calculation
→ AVO analysis
→ Evidence validation
→ Dynamic alert
→ Recommendation or Action Plan
→ Human review
→ Owner and deadline
→ Execution
→ Customer response
→ Supported outcome
→ Risk recalculation
→ Audit and analytics
Starting an action, sending a message, scheduling a campaign, or publishing a campaign does not automatically reduce risk.
Recorded customer responses may affect the index:
| Customer response | Effect |
|---|---|
| Positive | (-20) |
| Neutral | (0) |
| Negative | (+15) |
Supported outcomes have separate effects:
| Recorded outcome | Effect |
|---|---|
| Customer retained | (-60) |
| Complaint resolved | (-60) |
| Purchase completed | (-50) |
| Offer accepted | (-40) |
| Meeting scheduled | (-20) |
| No response | (+10) |
| Customer declined | (+20) |
| Customer churned | (+35) |
| Follow-up required | (+8) |
| Inconclusive | (+5) |
The final index is always constrained between (0) and (100).
Marketing Intelligence
CustomerPulse groups active customers by region and industry. A segment requires at least four customers.
A calculated marketing opportunity appears when at least one configured threshold is reached:
| Trigger | Default threshold |
|---|---|
| Customers affected | (\geq 20\%) |
| Revenue run-rate decline | (\geq 15\%) |
| Mean purchase-frequency decline | (\geq 20\%) |
| Engagement decline | (\geq 25\%) |
Campaign audiences are recalculated from:
- Segment membership
- Marketing consent
- Email availability
- WhatsApp availability
Withdrawn consent or missing contact information produces an explicit exclusion reason.
Campaign results support two evidence levels:
- Aggregate results update campaign analytics.
- Customer-linked responses or outcomes recalculate the identified customer’s risk, alert, estimated revenue at risk, and audit history.
Scheduling or publishing a campaign never automatically lowers customer risk.
How we built it
CustomerPulse AI was built as a Next.js App Router application using React and strict TypeScript.
The system separates responsibilities into domain modules for:
- Import validation and normalization
- Project and workspace isolation
- Customer tier calculation
- Churn-risk calculation
- Estimated revenue-at-risk calculation
- Dynamic alert evaluation
- AVO provider integration
- Evidence validation
- Approval and action-state transitions
- Marketing opportunity detection
- Consent-safe audience calculation
- Campaign lifecycle management
- Analytics and audit aggregation
The public no-login walkthrough uses versioned browser storage and IndexedDB. This allows judges to create projects, upload files, switch projects, refresh the application, and inspect imported records without creating an account.
The repository also contains Supabase persistence and private-file adapters for a future authenticated deployment. We do not present this optional path as the primary production-verified public workflow.
AVO uses Xiaomi MiMo through an OpenAI-compatible API. If the live provider fails, the application visibly identifies the deterministic Demo AVO fallback instead of silently presenting it as a live result.
The publishing layer contains:
- Demo Publisher for internal scheduling records
- A credential-gated Buffer adapter
Demo Publisher does not claim to post externally. Live Buffer publishing remains unavailable until credentials are configured and a credentialed production test is completed.
How Codex and GPT-5.6 were used
Codex, powered by GPT-5.6, was used throughout development to:
- Audit the existing repository
- Identify pre-seeded and contradictory workflows
- Design the operational architecture
- Implement project-isolated imports
- Build Customer 360 navigation
- Implement deterministic scoring
- Connect AVO analysis to customer-specific evidence
- Build approval and action lifecycles
- Correct consent and campaign-audience behavior
- Generate connected mock-data test packs
- Diagnose browser and production failures
- Build automated regression coverage
- Verify and deploy the application through GitHub and Vercel
GPT-5.6 powered the Codex development process. The deployed application does not claim GPT-5.6 as its runtime inference model; its configured live AVO provider is Xiaomi MiMo.
The final verified engineering baseline included:
- ESLint: passed
- TypeScript: passed
- Unit tests: 136 of 136 passed
- Playwright workflows: 49 of 49 passed
- Production build: passed
- Vercel production deployment: verified
These are engineering-verification results, not fabricated customer-impact metrics.
Challenges we ran into
One major challenge was replacing pre-seeded conclusions with operational calculations. A dashboard can look convincing while displaying values that do not change when the underlying data changes. We had to ensure that imports, AVO analysis, responses, outcomes, and customer-level campaign results mutated the authoritative dataset.
Another challenge was cross-page consistency. Customers, Customer 360, Alerts, Retention Actions, Marketing Intelligence, and Analytics originally risked presenting different versions of the same customer. We moved these views toward one shared operational source.
AI evidence validation was also difficult. A model-generated statement should not become a risk factor simply because it sounds plausible. We implemented:
- Message-ID validation
- Confidence thresholds
- Uncertainty handling
- Explicit provider and fallback labeling
The action lifecycle required careful separation. Starting an action is not the same as executing it, execution is not a customer response, and a response is not a verified outcome. Treating these as distinct transitions was necessary for an honest audit trail.
Campaign governance introduced additional challenges:
- Calculating opportunities from active project data
- Preventing withdrawn-consent customers from entering an audience
- Keeping approval history campaign-specific
- Separating aggregate analytics from customer-level evidence
- Ensuring scheduling does not manufacture a risk improvement
Finally, long cross-role workflows exposed navigation, persistence, timing, and state-management defects that were not visible in isolated tests. Full Playwright regression testing was essential.
Accomplishments that we're proud of
We are proud that CustomerPulse AI is more than a collection of dashboards.
The system now supports a complete evidence-to-outcome loop in which:
- Imported records update operational state.
- Customer rows open real Customer 360 routes.
- AVO analysis creates customer-specific evidence.
- Validated signals trigger recalculation.
- Alerts are created, updated, and resolved dynamically.
- Recommendations support Changes Requested and resubmission.
- Action Plans have owners, deadlines, reminders, and overdue handling.
- Execution, response, and outcome are separate transitions.
- Recorded outcomes update risk, alerts, estimated revenue at risk, analytics, and audit history.
- Marketing opportunities are calculated rather than always displayed.
- Campaign audiences exclude customers without consent or required contact details.
- Customer-linked campaign results can move different customers in different directions.
- Multiple imported projects remain isolated.
- Imported customers, transactions, conversations, and documents remain inspectable.
We are especially proud of the system’s governance boundary:
AI can propose and explain, but people remain responsible for selection, approval, execution, and outcome verification.
What we learned
We learned that trustworthy AI products need explicit ownership boundaries.
Confidence and uncertainty are not decorative labels. Evidence must resolve to real records, unsupported findings must be excluded, and provider fallback must be visible.
We also learned that a recommendation is not an outcome. A useful customer-retention system must continue through assignment, approval, execution, response, outcome, recalculation, and audit.
Data isolation matters as much as model quality. If records from two projects can mix, every downstream insight becomes unreliable.
Consent must be calculated from the selected audience and communication channel—not displayed as a fixed number.
We also learned the importance of honest product language:
- CustomerPulse currently produces an explainable operational risk index, not a statistically calibrated churn probability.
- Demo Publisher creates internal scheduling records, not external social posts.
- The public role selector demonstrates workflow permissions, not secure enterprise authentication.
- Supabase and Buffer adapters should not be described as fully production-verified integrations.
These boundaries make the product more credible, not less ambitious.
What's next for CustomerPulse AI
The next phase is to move from a controlled decision-support pilot toward a secure enterprise platform.
Planned development includes:
- Authenticated multi-user organizations
- Server-enforced roles and tenant isolation
- Production Supabase or managed PostgreSQL persistence
- Historical churn-label calibration
- Precision, recall, false-positive, and drift monitoring
- True period-over-period marketing analysis
- Seasonality-aware segment detection
- Signal expiry, decay, resolution, and supersession
- Replacement of ambiguous keyword-based signal mapping
- Always-on scheduled monitoring
- Delivery status and retry management
- Email and WhatsApp delivery integrations
- Inbound customer-response webhooks
- Credential-tested Buffer publishing
- Campaign attribution
The future enterprise architecture can integrate:
- SAP S/4HANA or SAP Sales Cloud for customers, transactions, ownership, and tasks
- AWS IAM Identity Center and Cognito for identity
- AWS IAM for least-privilege authorization
- AWS KMS for encryption
- AWS Secrets Manager for provider credentials
- AWS CloudTrail and CloudWatch for monitoring
- Amazon S3 for governed evidence storage
- Buffer for approved social-media publishing
The long-term operational loop is:
Enterprise customer evidence
→ Governed validation
→ Explainable risk
→ Evidence-linked AVO analysis
→ Human-approved intervention
→ External delivery
→ Verified customer response
→ Measurable outcome
→ Risk recalculation
→ Continuous learning
CustomerPulse AI is currently ready for hackathon evaluation, synthetic-data testing, and controlled decision-support pilots.
The next step is to make the same verified workflow secure, calibrated, shared, and fully integrated for real organizations.
Built With
- ai
- buffer
- codex
- eslint
- exceljs
- github
- indexeddb
- mammoth
- marketing
- next.js
- node.js
- openai
- openai-compatible
- pdf-parse
- playwright
- react
- recharts
- restapi
- supabase
- typescript
- vercel
- vitest
- zod
Log in or sign up for Devpost to join the conversation.