Lead capture
Leads, LeadSources, LeadNotes, DuplicateClusters. Bring incoming prospects into a consistent qualification queue.
- Leads
- LeadSources
- LeadNotes
- DuplicateClusters
Understand data model for CRM with Lead Scoring.
25 tables · 59 relationships
Leads, LeadSources, LeadNotes, DuplicateClusters. Bring incoming prospects into a consistent qualification queue.
ScoringRules, ScoringRuleValues, ScoringModels, ScoringRuns, ScoringEvents. Explain why a lead deserves attention before the team acts.
Territories, RoutingRules, LeadAssignments, PriorityAlerts. Put the next lead with someone who can act on it.
LeadActivities, LeadNotes, Lists, ListMemberships, ConsentEvents. Coordinate useful follow-up while respecting contact preferences.
Leads, LeadConversions, IntegrationEvents. Give account executives the context to accept a qualified lead.
ScoringRuns, ScoringEvents, LeadAssignments, LeadConversions, PriorityAlerts. Learn which sources and signals lead to accepted opportunities.
Preserve workspace-scoped identities, source references and current record revisions. Child records inherit parent scope. Retried commands and provider events resolve to their original occurrence.
| Field | Type | Required | Details |
|---|---|---|---|
UserID | text | yes | |
FullName | text | yes | |
Email | text | yes | |
Role | select | yes | Admin, Marketing Operations, Sales Manager, Sales Development Rep, Account Executive, Viewer |
Territory | reference | → Territories | |
Manager | reference | → Users (self) | |
RoundRobinEligible | boolean | yes | When true, eligible for round-robin routing |
OutOfOffice | boolean | Skip in routing while true | |
Active | boolean | yes | |
PrincipalId | text | yes | Unique authenticated subject within WorkspaceKey; not inferred from Email. |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
TerritoryCode | text | yes | |
Name | text | yes | |
Type | select | yes | State, Region, NamedAccount, Industry, Segment |
Manager | reference | → Users | |
Active | boolean | yes | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
RoutingCursor | reference | → Users; Server-maintained cursor for atomic eligible-owner rotation. |
| Field | Type | Required | Details |
|---|---|---|---|
Territory | reference | yes | → Territories |
State | select | yes | Two-letter US state code (AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY, DC) |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
SourceCode | text | yes | |
Name | text | yes | e.g. WebForm, Webinar, TradeShow, ContentDownload |
Category | select | yes | Inbound, Outbound, Referral, Partner, Event, Content |
Channel | select | yes | WebForm, Webinar, TradeShow, ContentDownload, ColdOutbound, Referral, Partner, ChatBot, PaidAd, Other |
BaseScore | number | Default contribution to Lead score on capture (0–100) | |
RequireDoubleOptIn | boolean | If true, Subscribable defaults false until confirmed | |
Active | boolean | yes | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
RuleCode | text | yes | |
Name | text | yes | |
Category | select | yes | Firmographic, Demographic, Behavioral, Engagement, Negative |
AttributeOrEvent | select | yes | Title, Industry, EmployeeCount, AnnualRevenue, Source, PageVisit, EmailOpen, EmailClick, FormFill, ContentDownload, MeetingBooked, Unsubscribe |
Operator | select | yes | Equals, NotEquals, Contains, NotContains, GreaterThan, LessThan, Between, In, NotIn |
ComparisonValue | text | Single value as text; for In/NotIn list operators use child ScoringRuleValues table | |
Points | number | yes | +/- contribution |
AppliesToSource | reference | → LeadSources (null = all sources) | |
Priority | number | yes | Lower fires first |
Active | boolean | yes | |
Version | number | yes | |
Status | select | yes | Draft, Submitted, Approved, Retired |
PreparedBy | reference | yes | → Users |
ApprovedBy | reference | → Users | |
EffectiveFrom | datetime | yes | |
EffectiveUntil | datetime | ||
MaximumOccurrences | number | yes | Per lead and configured time window. |
WindowDays | number | yes | Explicit scoring window; zero means once per lead. |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
Rule | reference | yes | → ScoringRules |
Value | text | yes | One member of the In / NotIn comparison list |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
Lead | reference | yes | → Leads |
Rule | reference | yes | → ScoringRules |
Points | number | yes | Snapshot of Rule.Points at fire time |
MatchedValue | text | The actual value that matched (e.g. "VP of Engineering") | |
FiredAt | date | yes | |
TriggerActivity | reference | → LeadActivities (when fire was an activity event) | |
Reversed | boolean | Set when a compensating event neutralizes this one | |
EventNumber | text | yes | |
Run | reference | yes | → ScoringRuns |
SourceEventId | text | yes | Unique per lead, rule version and upstream occurrence. |
RuleVersion | number | yes | |
ExpiresAt | datetime | ||
Status | select | yes | Recorded, Reversed, Expired |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
RuleCode | text | yes | |
Name | text | yes | |
MatchType | select | yes | Territory, Industry, CompanySize, AccountOwner, Source, ScoreThreshold, RoundRobin |
MatchValue | text | Comparison anchor (e.g. "Healthcare", ">=500", state code) | |
Territory | reference | → Territories (when MatchType = Territory) | |
AssignToType | select | yes | SpecificUser, RoundRobinPool, Manager, AccountOwner, UnassignedQueue |
AssignToUser | reference | → Users (when AssignToType = SpecificUser) | |
RoundRobinPoolTerritory | reference | → Territories (pool = users with this Territory + RoundRobinEligible) | |
FallbackOwner | reference | → Users (used when no matching round-robin user is available) | |
Priority | number | yes | Lower fires first |
Active | boolean | yes | |
Status | select | yes | Draft, Submitted, Approved, Retired |
PreparedBy | reference | yes | → Users |
ApprovedBy | reference | → Users | |
EffectiveFrom | datetime | yes | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
LeadNumber | text | yes | |
FirstName | text | yes | |
LastName | text | yes | |
Email | text | yes | Masked for Viewer role |
Phone | text | Masked for Viewer role | |
Mobile | text | ||
Company | text | Pre-account text; conversion resolves to an Account | |
Title | text | ||
Industry | select | Technology, Financial Services, Healthcare, Retail, Manufacturing, Professional Services, Education, Government, Nonprofit, Energy, Real Estate, Media, Other | |
EmployeeCount | number | Enriched on capture when possible | |
AnnualRevenue | decimal | Decimal amount in the parent currency. Enriched on capture when possible | |
State | select | Two-letter US state code | |
Source | reference | yes | → LeadSources |
Territory | reference | → Territories (resolved by routing) | |
Status | select | yes | New, Working, MQL, Submitted, SQL, Converted, Recycled, Disqualified |
Owner | reference | → Users (null while in unassigned queue) | |
Score | number | yes | Derived 0–100 from the latest completed ScoringRuns; direct edits rejected. |
Subscribable | boolean | yes | Email opt-in flag, honored across outbound |
DoNotCall | boolean | yes | TCPA flag, honored across SDR dialer |
DisqualifyReason | select | BadFit, NoBudget, NotNow, NoResponse, Duplicate, Unsubscribed, BadData | |
DuplicateOf | reference | → Leads (self) — set by duplicate-detection workflow | |
ConvertedAt | date | Stamped by conversion workflow | |
CreatedAt | datetime | yes | Server creation timestamp. |
LastActivityAt | date | Rolled from LeadActivities | |
AssignedAE | reference | → Users | |
QualificationReason | longtext | ||
QualifiedBy | reference | → Users | |
QualifiedAt | datetime | ||
LatestScoringRun | reference | → ScoringRuns | |
ContactPolicy | select | yes | Unknown, Permitted, Restricted, Withdrawn |
ContactPolicyEvidence | attachment | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
QualificationSubmittedBy | reference | → Users |
| Field | Type | Required | Details |
|---|---|---|---|
Lead | reference | yes | → Leads |
Type | select | yes | Call, Email, Meeting, Task, PageVisit, EmailOpen, EmailClick, FormFill, ContentDownload, ChatTranscript, Unsubscribe |
Subject | text | ||
Owner | reference | → Users (null for machine-logged events) | |
StartAt | date | For meetings, calls | |
DurationMinutes | number | ||
DueDate | date | For tasks | |
CompletedAt | date | ||
Status | select | yes | Planned, InProgress, Completed, Cancelled |
Outcome | select | Connected, NoAnswer, LeftVoicemail, MeetingBooked, Bounced, Replied, OptedOut | |
ContentURL | text | The page URL or content asset for web-tracked rows | |
ActivityNumber | text | yes | |
StartTime | datetime | Planned meeting start in UTC. | |
EndTime | datetime | Planned meeting end after StartTime. | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
Lead | reference | yes | → Leads |
Body | text | yes | Markdown-friendly |
Author | reference | yes | → Users |
CreatedAt | datetime | yes | Server creation timestamp. |
Pinned | boolean | Pin to top of Lead page | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
RecordNumber | text | yes | |
Status | select | yes | Recorded, Superseded |
| Field | Type | Required | Details |
|---|---|---|---|
Lead | reference | yes | → Leads |
AssignedTo | reference | → Users (null when assigned to UnassignedQueue) | |
AssignedBy | reference | → Users (system actor for workflow assignments) | |
AssignedFrom | reference | → Users (prior Owner; null on initial routing) | |
Rule | reference | → RoutingRules (null on manual reassignment) | |
Reason | select | yes | InitialRouting, MQLHandoff, ManualReassign, StaleRecycle, OutOfOffice, TerritoryRealignment, DuplicateMerge |
AssignedAt | date | yes | |
Notes | text | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
RecordNumber | text | yes | |
Status | select | yes | Recorded, Superseded |
| Field | Type | Required | Details |
|---|---|---|---|
ListCode | text | yes | |
Name | text | yes | |
Purpose | select | yes | OutboundCadence, EventInvite, NurtureSync, AdAudience, Suppression, Other |
Owner | reference | yes | → Users |
MemberCount | decimal | yes | Server-derived; fx: COUNT(ListMemberships where List = self AND Active = true) |
Description | text | ||
Active | boolean | yes | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
List | reference | yes | → Lists |
Lead | reference | yes | → Leads |
AddedAt | date | yes | |
AddedBy | reference | → Users | |
CadenceStep | number | For OutboundCadence purpose Lists | |
Active | boolean | yes | Set false when removed without deleting the row |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
ClusterCode | text | yes | |
MatchKey | select | yes | EmailExact, EmailDomain, PhoneExact, CompanyFuzzy, NameAndCompany, EnrichmentMatch |
MatchScore | number | yes | 0–100 confidence |
LeadCount | number | yes | Number of Leads in the cluster |
Status | select | yes | Detected, Submitted, Resolved, Rejected |
ResolvedBy | reference | → Users | |
ResolvedAt | date | ||
SurvivorLead | reference | → Leads (set on Merged) | |
DetectedAt | date | yes | |
PreparedBy | reference | → Users | |
ResolutionReason | longtext | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
RecordNumber | text | yes |
| Field | Type | Required | Details |
|---|---|---|---|
Lead | reference | yes | → Leads |
ConvertedBy | reference | yes | → Users; Account executive who created the intent; identifies initiator before completion. |
ConvertedAt | datetime | Required only when Status is Succeeded; server records the verified success time. | |
AccountRef | text | Acknowledged target account ID; required for Succeeded. | |
AccountAction | select | MatchedExisting, CreatedNew; required only when Status is Succeeded after target acknowledgement. | |
ContactRef | text | Acknowledged target contact ID; required for Succeeded. | |
OpportunityRef | text | Acknowledged target opportunity ID; required for Succeeded. | |
OpportunityName | text | ||
OpportunityAmount | decimal | Decimal amount in the parent currency. Initial estimated amount on conversion | |
Notes | text | ||
Status | select | yes | Draft, Pending, Succeeded, Failed, Unknown |
FailureReason | text | Set when Status = Failed | |
ConversionNumber | text | yes | |
CommandKey | text | yes | One durable conversion intent per lead; retries reuse it. |
TargetWorkspace | text | yes | |
TargetConnection | reference | yes | → IntegrationConnections |
AcknowledgedAt | datetime | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
RequestedAt | datetime | yes | Server timestamp when the authorized conversion intent is created. |
| Field | Type | Required | Details |
|---|---|---|---|
MQLThreshold | number | yes | Lead score crossing this triggers MQL promotion |
RecycleAfterDays | number | yes | Days before stale-lead-recycle fires (default 30) |
DuplicateMatchScore | number | yes | 0–100 threshold for dedup (default 85) |
Active | boolean | yes | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
RunNumber | text | yes | |
Lead | reference | yes | → Leads |
InputRevision | number | yes | |
RuleSetDigest | text | yes | |
Model | reference | → ScoringModels | |
Status | select | yes | Queued, Running, Completed, Failed, Superseded |
RuleScore | number | yes | |
SuggestedScore | number | Optional model suggestion; does not override policy. | |
AppliedScore | number | yes | |
Explanation | longtext | yes | |
StartedAt | datetime | yes | |
CompletedAt | datetime | ||
FailureReason | longtext | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
ModelNumber | text | yes | |
Name | text | yes | |
ProviderReference | text | yes | |
Version | text | yes | |
AllowedFeatures | longtext | yes | |
ExcludedFeatures | longtext | yes | |
ScoreUse | select | yes | ExplanationOnly, BoundedContribution |
MaximumContribution | number | yes | |
PreparedBy | reference | yes | → Users |
ApprovedBy | reference | → Users | |
Status | select | yes | Draft, Submitted, Approved, Retired |
EffectiveFrom | datetime | yes | |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
AlertNumber | text | yes | |
Lead | reference | yes | → Leads |
Run | reference | yes | → ScoringRuns |
Owner | reference | yes | → Users |
AlertType | select | yes | ThresholdCrossed, FollowUpDue, ConversionFailure |
Status | select | yes | Open, Acknowledged, Resolved |
DueDate | date | yes | |
AcknowledgedAt | datetime | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
ConsentNumber | text | yes | |
Lead | reference | yes | → Leads |
Channel | select | yes | Email, Phone |
Decision | select | yes | Permitted, Restricted, Withdrawn |
Purpose | text | yes | |
Evidence | attachment | ||
OccurredAt | datetime | yes | |
SourceEventId | text | yes | |
Status | select | yes | Recorded, Superseded |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
EventNumber | text | yes | |
CommandKey | text | yes | Unique workspace/action replay key. |
RecordType | text | yes | |
RecordId | text | yes | |
Action | text | yes | |
Actor | reference | yes | → Users |
OccurredAt | datetime | yes | |
BeforeState | longtext | yes | |
AfterState | longtext | yes | |
Status | select | yes | Recorded, Superseded |
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
ConnectionNumber | text | yes | |
Name | text | yes | |
Provider | text | yes | |
SecretReference | text | yes | |
Status | select | yes | Disabled, Configured, Paused |
Owner | reference | yes | → Users |
LastCheckedAt | datetime | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
EventNumber | text | yes | |
Connection | reference | yes | → IntegrationConnections |
ProviderEventId | text | yes | Unique per connection when supplied. |
CommandKey | text | yes | |
RecordType | text | yes | |
RecordId | text | yes | |
ExternalReference | text | ||
Status | select | yes | Pending, Accepted, Confirmed, Failed, Unknown |
OccurredAt | datetime | yes | |
FailureReason | longtext | ||
WorkspaceKey | text | yes | Server-enforced workspace scope. |
Revision | number | yes | Compare-and-swap version; never client incremented. |
CreatedAt | datetime | yes | Server creation timestamp. |
| Field | Type | Required | Details |
|---|---|---|---|
Cluster | reference | yes | → DuplicateClusters |
Lead | reference | yes | → Leads |
CandidateRevision | number | yes | |
ProposedSurvivor | boolean | yes | |
WorkspaceKey | text | yes | |
Revision | number | yes | |
CreatedAt | datetime | yes |
Create your ERP.AI account and get started with Proto.
We use essential cookies to run the site and optional cookies for features, analytics, and relevant content. See Cookie policy
We use cookies to enhance your experience, analyze site traffic, and serve relevant content. By clicking "Accept All," you agree to our use of cookies. You can customize your preferences at any time.
Learn more about how we use cookiesThese cookies are required for the website to function properly. They ensure security, enable basic features like page navigation, and store user session data. You cannot disable these cookies.
These cookies enable additional features that enhance your experience, such as live chat, video playback, personalized content recommendations, and remembering user preferences.
These cookies help us understand how visitors interact with our site by collecting anonymous usage data. This allows us to measure performance, detect issues, and continuously improve the user experience.
These cookies allow us and advertising partners, including X, to deliver ads tailored to your interests. They track browsing habits across sites to provide relevant advertising and measure ad effectiveness.