Skip to content

tncSean/account-intelligence-platform

Repository files navigation

Account Intelligence Platform

AI-powered account research and analysis platform for Salesforce Strategic SEs. Uses Agentforce + Node.js middleware + Google Apps Script to deliver comprehensive account intelligence via natural language in Slack.

Architecture

  • Salesforce: Agentforce Agent, 6 Custom Objects, Apex Invocable Actions
  • Middleware: Express/TypeScript on GCP Cloud Run, 7 data connectors, 5-layer LLM pipeline
  • Apps Script: Google Workspace doc generation (briefings, POV decks)
  • Data: AlloyDB + pgvector (RAG), Redis (cache + job queue)

Project Structure

├── salesforce/          # SFDX project (custom objects, Apex, metadata)
├── middleware/          # Node.js/TypeScript API server
│   └── src/
│       ├── connectors/  # Data source connectors (MCP-ready)
│       ├── llm/         # LLM router, clients, prompt cache
│       ├── orchestration/ # BullMQ job queue, pipeline
│       ├── rag/         # Vector store, embedding pipeline
│       ├── security/    # Prompt sanitizer, output validator
│       ├── routes/      # API routes (v1)
│       ├── middleware/  # Express middleware (auth, logging)
│       └── utils/       # Logger, Redis, errors
├── apps-script/         # Google Apps Script (doc generation)
├── config/              # Seed data (customer stories, product catalog)
└── docker-compose.yml   # Local dev (Node.js + Redis + PostgreSQL/pgvector)

Quick Start

# Start local infrastructure
docker compose up -d redis postgres

# Set up middleware
cd middleware
cp .env.example .env    # Edit with your keys
npm install
npm run dev             # Runs on http://localhost:3000

# Health check
curl http://localhost:3000/api/health

API

All endpoints (except health) require X-API-Key header.

  • GET /api/health — Health check
  • POST /api/v1/intelligence/analyze — Start account analysis
  • GET /api/v1/intelligence/status/:jobId — Check job status
  • GET /api/v1/connectors — List available connectors

Testing

cd middleware
npm test            # Run all tests
npm run lint        # Type check

Build Phases

  • Phase 1A: Repo & scaffold (complete)
  • Phase 1B: Salesforce object model
  • Phase 1C-D: Apex actions
  • Phase 1E: Middleware connectors
  • Phase 1F: LLM layer
  • Phase 1G: Job queue & RAG
  • Phase 1H: Integration testing

About

AI-powered Account Intelligence Platform for Salesforce Strategic SEs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors