xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField SalesCRMRewardsClaimsInventoryProcurementWarehouse ManagementField ServiceServiceSupportTelephony & MessagingFinance & AccountingPayrollExpense ManagementCommercePortalsAnalytics & ReportingData StudioMobile AppSee all products →
PLATFORM
Platform overviewApp BuilderAutomationIntegrationsSecurity & GovernanceChange ManagementDevelopers
SENSE AI
Sense AI overviewSense AssistSense ControlSense VisionAI StudioTrust & governanceIn Claude & ChatGPTUse cases
SOLUTIONS
FMCG & DistributionManufacturing & Dealer NetworksAutomotive & DealershipsPharma & HealthcareConsumer DurablesAgri-InputsBuilding MaterialsService NetworksWarehousing & 3PLFinancial AccountingERP SoftwareIndia GST ComplianceUAE VAT & e-InvoicingSaudi ZATCA & VATAll solutions →
RESOURCES
Knowledge CenterDeveloper & CLIBlogGuidesWhat is xMatix?Company facts
COMPANY
AboutCareersPartnersEventsContactAuthorsLegal
Sign in Request demo
Home/Docs/Entity Reference/Lead — entity reference
REFERENCE · Last reviewed

Lead — entity reference

A potential opportunity or customer inquiry - the entry point of the CRM funnel (Status: New, Contacted, Nurturing, Lost, Converted). Can be raised manually or generated from service origins, which it links back to: Asset, AssetMaintenance, ServiceCampaign/ServiceCampaignMember, Case, ItemServiceContract, ItemMaintenanceSchedule. On insert the handler auto-assigns PartnerAccountId and BranchId from PostalCode via the BranchPostalCode mapping and can auto-assign the owning Resource. Conversion actions create an Account (when accountId is empty), a Contact, and an Opportunity linked back via Lead.opportunityId - a lead with opportunityId set is already converted and cannot be converted again. Activity roll-ups (isEmailedOrCalled, eventTaskCount) are recomputed from Activity rows, not incremented.

Fields

FieldLabelTypeRequiredWhat it does
AccountIdAccountLookup → Account
AccountNameAccount NameCalculated (calculated)
AssetIdAssetLookup → Asset
AssetMaintenanceIdAsset MaintenanceLookup → AssetMaintenance
BranchIdBranchLookup → Branch
CaseIdCaseLookup → Case
CityCityPickListValues: Mumbai, Pune, Kolkata, Delhi.
ContactIdContactLookup → Contact
ContactNameContact NameText
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DateTimeOpenedDate Time OpenedDateAndTime
DocumentDateDocument DateDate
DocumentSeriesFieldDocument Series FieldCalculated (calculated)series
EmailEmailText
EventTaskCountEvent Task CountBooleanActivity roll-up, recomputed from Activity rows: the number of Task/Event/Meeting activities on the lead. Like IsEmailedOrCalled it is set-based and never hand-maintained.
FirstNameFirst NameText
IdIdGuidYes
InterestedItemIdInterested ItemLookup → Item
IsEmailedOrCalledIs Emailed Or CallBooleanActivity roll-up, recomputed (not incremented) from Activity rows: true when a Call or Email activity exists for the lead. Stays correct across activity edits and deletes; intended to be read by Business Rules that derive Status.
ItemMaintenanceScheduleIdItem Maintenance ScheduleLookup → ItemMaintenanceSchedule
ItemServiceContractIdItem Service ContractLookup → ItemServiceContract
LastNameLast NameText
LeadDueDateLead Due DateDate
LeadRatingLead RatingPickListValues: Hot, Warm, Cold.
LeadSourceLead SourcePickListValues: Dealer, Campaign, Visit based, Web, AMC, Scheduled Maintenance, Employee Referal, Social Media.
LeadTypeLead TypePickListValues: Recall, Maintenance Schedule, Manual, Contract Schedule.
LostReasonLost ReasonPickListValues: Others.
ModifiedByIdModified ByLookup → UserAccountYes
NameDocument NumberTextYes
OpportunityIdOpportunityLookup → OpportunityThe Opportunity created from this lead by a convert action. Doubles as the conversion guard: convert validation rejects any lead whose OpportunityId is already set ("an opportunity has already been created for this lead").
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountIdPartner AccountLookup → Account
PhoneNumberPhone NumberText
PostalCodePostal CodeTextDrives dealer assignment on insert: the handler resolves the code through PostalCode and BranchPostalCode rows and stamps the lead's BranchId and PartnerAccountId from the mapping. When PostalCode is present, the convert-time partner/branch mandatory validation is bypassed.
PotentialRevenuePotential RevenueCurrency
RecordTypeIdRecord TypeGuid, hidden
RemarksRemarksText
ReminderOffsetNumberReminder Offset NumberNumber
ResourceIdExecutiveLookup → Resource
ServiceCampaignBatchInstanceIdService Campaign Batch InstanceText
ServiceCampaignIdService CampaignLookup → ServiceCampaign
ServiceCampaignMemberIdService Campaign MemberLookup → ServiceCampaignMember
ServiceContractItemIdServiceContractItemLookup → Item
SKUIdSKULookup → SKU
StateStatePickListValues: Maharashtra.
StatusStatusPickListLifecycle picklist: New, Contacted, Nurturing, Lost, Converted. The LeadLost server action sets Lost; conversion flows set Converted. Business Rules reading the activity roll-up fields may also move it - the roll-up recompute itself never writes Status. Values: New, Contacted, Nurturing, Lost, Converted.
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDeleteDelete
CloneCloneServerAction (Clone)Create a copy of this record
ConvertLeadLeadServerAction (ConvertLead)Full lead conversion in one step: when the lead has no account it creates a new customer Account named from the lead's AccountName plus a Contact for it; when an existing account is linked but has no primary contact it creates that contact; then it always creates an Opportunity carrying the lead's account/partner/branch/asset/contract links and stamps Lead.OpportunityId. Refused when OpportunityId is already set (already converted). Record types are mapped from the lead's record type to the Opportunity equivalent.
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete
EditEditEditEdit
EditInLineEditEditEdit
EditInLine2EditEditInlineEdit
EditRowEditEditInlineEdit
LeadLostLead LostServerAction (LeadLost)Lead Lost
NewNewNewNew
NewSalesNewNewNew
PerformLeadToOpportunityPerform Lead To OpportunityServerAction (PerformLeadToOpportunity)Dialog-driven convert: arguments choose per record whether to create or reuse - CreateNewAccount/CreateNewContact/CreateNewOpportunity flags, explicit AccountId/ContactId/OpportunityId picks, AccountFields/ContactFields/OpportunityFields value arrays typed in the dialog, and an optional ConvertedStatus for the lead. ContactFields are applied for both new and existing accounts, and the created/selected account always wins over the lead's old account on the resulting Opportunity. Same preconditions as ConvertLead (no existing OpportunityId; partner/branch resolved).
PerformReleaseOpportunityOpportunityServerAction (PerformReleaseOpportunity)Creates an Opportunity from the lead (OpportunityService.CreateOpportunityFromLead). Preconditions: the lead must not already have an OpportunityId, and PartnerAccountId + BranchId are mandatory unless the lead carries a PostalCode (which auto-resolves them).
PerformReleaseOrderOrderServerAction (PerformReleaseOrder)Creates a sales Order directly from the lead (OrderService.CreateOrderFromLead), skipping the opportunity/quote stages. PartnerAccountId and BranchId are mandatory unless PostalCode is set.
RunMacroRun MacroServerAction (RunMacro)Runs a Macro's steps against this lead through the generic macro engine (IMacroRunner) - the same entity-agnostic RunMacro handler used on cases; no lead-specific behavior.
testLeadConvertOpportunityServerActionconvert Lead

Validations

ValidationApplies toError messageNotes
AccountNamerequiredAccountName, ErrorAccount Name is mandatory.Account Name is mandatory.
Email Validation RuleEmail, ErrorEnter Valid Email.Enter Valid Email.
Mobile Validation RulePhoneNumber, ErrorEnter Valid No.Enter Valid No.

Lookup filters

FilterLookup fieldNotes
Branch For Partner AccountBranchIdBranch For Partner Account - Service
Branch For Partner AccountBranchId
Customer Account FilterAccountId
Customer Account FilterAccountIdCustomer Account
Executive FilterResourceIdExecutive Filter
Executive FilterResourceId
Partner Account FilterPartnerAccountIdPartnerAccountFilter
Partner Account Filter ServicePartnerAccountIdPartner Account