🧠 Project Story

Inspiration

Contracts are everywhere in Salesforce — NDAs, MSAs, SOWs, partner/vendor agreements — yet contract compliance checks are often slow, manual, and inconsistent. We wanted to automate this tedious yet critical step using the power of AI + Slack + Salesforce.

What it does

Compliance Copilot is an AI-powered assistant built natively on Salesforce that: Automatically extracts the text, Identifies missing or risky clauses (like Indemnity, Termination, Payment Terms, etc.), Calculates a risk score, Sends a real-time Slack alert to the Legal team with a summary and link to full report.

How we built it

Used Apex and Salesforce Flows to process the text. Used OpenAI (GPT-4) to: Classify legal clauses, Detect clause gaps or unfavorable terms, Generate risk score based on presence/absence and policy fit, Triggered Slack messages via Slack API.

Challenges we ran into

Extracting structured text from scanned contracts (OCR quality varies), Creating consistent clause classification without fine-tuned models, Matching extracted clause text against our legal fallback templates, Slack API rate limits during test alerts.

Accomplishments

Built and deployed fully working Salesforce-native tool, Seamless Slack integration, Clause detection works even on scanned contracts.

What we learned

How to combine OCR, AI models, and Salesforce Flows for real-world automation, Slack integration from Apex, Legal domain insights: how contracts are reviewed and why consistency matters.

What's next

File Upload and OCR, Add support for more languages and contract types (vendor, marketing, data protection), Train clause classifier using real contract data, Add “one-click redline” for suggested clause replacements, Build a dashboard for tracking high-risk contracts across org.

Built With

Share this project:

Updates