Skip to main content
leadssnapshot The Sales Lead Management application is designed to allow multiple organizations (tenants) to manage their sales leads efficiently. This application includes advanced AI features to assist in adding leads, querying past leads, and suggesting future actions to increase conversion rates. Key functionalities include lead management, status tracking, lead quality assessment, conversation tracking, note-taking, and comprehensive search capabilities.
  1. Lead Management: Create, update, and manage sales leads.
  2. Status Tracking: Track the status of each lead (e.g., new, contacted, qualified, unqualified, closed).
  3. Lead Quality: Mark the quality of leads (e.g., hot, warm, cold).
  4. Search Leads: Search for past leads based on various criteria.
  5. Conversations and Notes: Track conversations and take notes for each lead.
  6. AI Co-Pilot: Assist in adding leads, asking questions about past leads, and suggesting best steps to take for future conversions.
  7. Search with AI: Utilize AI to search previous leads and provide insights.

Postgres Schemas

leads-schema-1

1. leads

Stores information about each sales lead. A sales person finds the right lead for a company and adds them to the system. Each lead goes through a pipeline from email reach out, phone conversation to deal closing or disqualified.

2. lead_notes

Stores notes related to each lead. These are notes taken by the sales rep as they go through the process of converting a lead to a potential customer. The embeddings of these notes are stored in the table to help RAG to the notes.

3. lead_conversations

Stores conversations related to each lead, with AI-generated summaries and vector embeddings for advanced search and analysis. There are multiple things to note here. The embeddings are stored per lead conversation here. These conversations can be long and having a single embedding may not be ideal. You may want to chunk them to get better contextual search.

4. lead_status_history

Tracks the status changes for each lead.

5. global_companies

Tracks the top 1500 companies in the world. This table is shared across all tenants. This is not a per tenant table. All the sales reps in all the tenants/customers can share this data.

Complete SQL Script

This script sets up the necessary tables and relationships for a comprehensive multitenant sales lead management application with advanced AI capabilities.