Lead
Stored in the leads collection. createdAt and updatedAt are maintained automatically.
Returned by DELETE /lead, POST /lead, GET /lead/:id, PUT /lead/:id.
| Field | Type | Notes |
|---|---|---|
fields | object[] | default [] |
fields._id | ObjectId -> CustomField | required |
fields.value | any | |
customFieldsMap | map | default {} |
formId | ObjectId | |
pageId | ObjectId | |
leadId | string | |
source | string | one of Bulk Import, Offline, Facebook, Website, AI Generated, Instagram, Whatsapp, SMS and 5 more |
sourceId | ObjectId | |
importId | ObjectId[] -> Import | default [] |
importSnapshot | object[] | default [] |
importSnapshot.import | ObjectId | |
importSnapshot.fileName | string | |
contact | ObjectId -> Contact | required |
contactSnapshot | object | |
contactSnapshot.contact | ObjectId | |
contactSnapshot.name | string | |
contactSnapshot.email | string | |
contactSnapshot.contactNumber.countryCode | string | |
contactSnapshot.contactNumber.number | string | |
contactSnapshot.fullContactNumber | string | |
productServices | ObjectId[] -> ProductService | default [] |
productServicesSnapshot | object[] | default [] |
productServicesSnapshot.productService | ObjectId | |
productServicesSnapshot.name | string | |
status | string | default Warm · one of Hot, Warm, Cold |
stage | string | default New · one of New, Contacted, Follow-up Required, Qualified, Interested, Proposal Sent, Negotiation, Won and 3 more |
priority | string | default Low · one of High, Medium, Low |
enquiryAt | date | default now |
company | ObjectId -> Company | |
ad_id | string | |
ad_name | string | |
adset_id | string | |
adset_name | string | |
campaignName | string | |
campaignId | string | |
utmUrl | string | |
utmCampaignId | string | |
utmCampaignName | string | |
utmSource | string | |
utmMedium | string | |
utmCampaign | string | |
utmTerm | string | |
utmContent | string | |
notes | string | |
searchText | string | |
team | ObjectId -> Team | |
teamSnapshot | object | |
teamSnapshot.team | ObjectId | |
teamSnapshot.name | string | |
teamSnapshot.color | string | |
teamMember | ObjectId -> Member | |
teamMemberSnapshot | object | |
teamMemberSnapshot.member | ObjectId | |
teamMemberSnapshot.name | string | |
teamMemberSnapshot.email | string | |
contactCreatedBy | ObjectId -> Member | |
createdBy | ObjectId -> Member | |
createdBySnapshot | object | |
createdBySnapshot.member | ObjectId | |
createdBySnapshot.name | string | |
createdBySnapshot.email | string | |
updatedBy | ObjectId -> Member | |
updatedBySnapshot | object | |
updatedBySnapshot.member | ObjectId | |
updatedBySnapshot.name | string | |
updatedBySnapshot.email | string | |
isDeleted | boolean | default false |
isRestored | boolean | default false |
restoredAt | date | |
seperateDeleted | boolean | default false |
aiGenerated | boolean | default false |
leadGeneratorConfigId | ObjectId -> LeadGeneratorConfig | |
genieSchedulerId | ObjectId -> GenieScheduler | |
enrichmentStatus | string | one of queued, processing, completed, failed |
enrichmentRequestedAt | date | |
enrichmentDoneAt | date | |
enrichmentCount | number | default 0 |
enrichmentHistory | object[] | default [] |
enrichmentHistory.status | string | default queued · one of queued, processing, completed, failed |
enrichmentHistory.requestedAt | date | default now |
enrichmentHistory.startedAt | date | default null |
enrichmentHistory.doneAt | date | default null |
enrichmentHistory.contact | ObjectId -> Contact | default null |
enrichmentHistory.source | string | default manual |
enrichmentHistory.changedFields | string[] | default [] |
enrichmentHistory.error | string | default "" |
enrichmentHistory._id | ObjectId | default "6a95712f932657988a91c09c" |
enrichmentHistory.createdAt | date | set once |
enrichmentHistory.updatedAt | date | |
_id | ObjectId | default "6a95712f932657988a91c09d" |
createdAt | date | set once |
updatedAt | date |