Exodus Salesforce Docs
Technical Reference

Task and Activity Architecture

Technical reference for the expanded Task/Activity model, validation, lead rollups, reports, permissions, and best practices

Salesforce stores custom Task fields under the shared Activity metadata object. In this repo, Activity fields extend Task/Event, while Task-specific validation rules, list views, reports, quick actions, triggers, and permissions make Lead activity a first-class data model.

Source Map

SurfaceSource path
Custom Activity fieldsfeatures-crm/main/default/objects/Activity/fields/*
Task list viewsfeatures-crm/main/default/objects/Task/listViews/*
Task validation rulesfeatures-crm/main/default/objects/Task/validationRules/*
Task triggerfeatures-crm/main/default/triggers/TaskTrigger.trigger
Lead conversion triggerfeatures-crm/main/default/triggers/LeadTrigger.trigger
Lead activity servicefeatures-crm/main/default/classes/lead_activity/LeadActivityQualityService.cls
Quick actionsfeatures-crm/main/default/quickActions/NewTask.quickAction-meta.xml, LogACall.quickAction-meta.xml, Follow_Up.quickAction-meta.xml
Reportsfeatures-crm/main/default/reports/CRM_Performance_Reports/*
Dashboardfeatures-crm/main/default/dashboards/CRM_Performance_Dashboards/LeadPerformanceExecutive.dashboard-meta.xml

Data Flow

Custom Activity Fields

FieldTypeTechnical purpose
Task_Type__cPicklistCanonical task category for reporting and validation. Values include Call, Follow-up, Email, Research, Quote Review, Transfer Handoff, Other.
Call_Type__cPicklistCall subcategory: Prospecting, Discovery, Follow-up, Quote Review, Re-engagement, Transfer Handoff, Other.
Call_Disposition__cPicklistCall outcome. Connected, Qualified, Follow-up Needed, and Converted require deeper buyer intelligence.
Lead_Activity_Quality_Status__cPicklistSystem-maintained quality status used by reports and Lead rollups.
Contact_Role__cPicklistRole of the person reached: Decision Maker, Influencer, Gatekeeper, Procurement, Owner, Unknown, Other.
Lead_Interest_Level__cPicklistRep-assessed interest level: High, Medium, Low, Not Interested, Unknown.
Call_Summary__cText AreaNarrative summary required for completed Lead calls.
Next_Step__cText AreaConcrete next action. Required for useful handoff and follow-up reporting.
Product_Group__cLookup to Item_Group__cProduct family discussed. Required by lead activity quality rules.
Discussed_Item__cLookup to Item__cOptional exact catalog item discussed.
Product_Interest__cTextProduct/category/service interest captured from the buyer.
Buyer_Business_Type__cPicklistBusiness model or buyer type.
Buying_Stage__cPicklistRep-assessed stage: New Inquiry, Education, Sampling, Pricing, Compliance Review, Ready to Order, Reorder, At Risk, Not a Fit, Unknown.
Decision_Timeframe__cPicklistExpected timing: Today, This Week, This Month, 30-60 Days, 60+ Days, No Timeline, Unknown.
Primary_Buying_Signal__cPicklistConcrete buying signal such as pricing, quote, samples, availability, shipping, payment terms, competitor comparison, ready to order, reorder interest.
Decision_Criteria__cPicklistDriver such as price, margin, product quality, compliance, availability, shipping speed, payment terms, brand recognition, assortment.
Use_Case__cPicklistRetail resale, wholesale distribution, store launch, replenishment, private label, ecommerce, promotion/event, sampling/trial, new category test.
License_Status__cPicklistRestricted-product/compliance state. Non-clean statuses need Compliance Notes.
Compliance_Notes__cText AreaRequired context when license status needs review or follow-up.
Pain_Need__cText AreaBusiness pain, need, or buying driver.
Objection__cText AreaObjection or hesitation.
Current_Supplier__cTextCurrent supplier or competitor context.
Competitor__cTextCompetitor or alternate brand mentioned.
Risk_Red_Flags__cText AreaRisk, credibility, or compliance flags.
Follow_Up_Required__cCheckboxIndicates the activity requires a future follow-up.
Follow_Up_Due_Date__cDateRequired when follow-up is required.
Estimated_Monthly_Order_Value__cCurrencyBuyer-level estimated monthly value.
Sample_Requested__cCheckboxProspect requested samples or a trial.
Quote_Requested__cCheckboxProspect requested pricing or quote.

Lead Rollup Fields

LeadActivityQualityService.refreshLeadSummaries writes these Lead fields from Task state:

Lead fieldSource logic
Last_Sales_Touch_Date__cLatest completed structured sales touch by CompletedDateTime, ActivityDate, or CreatedDate.
Last_Sales_Touch_By__cOwner of that latest completed sales touch.
Last_Sales_Touch_Disposition__cCall disposition or Task status from that latest touch.
Last_Sales_Touch_Quality__cTask quality status from that latest touch.
Next_Follow_Up_Date__cEarliest open follow-up Task date.
Open_Follow_Up_Task_Count__cCount of open follow-up Tasks tied to the Lead.
Lead_Activity_Compliance_Status__cCalculated summary: Converted, No Sales Touch, Incomplete Last Touch, No Open Follow-up, Follow-up Overdue, or Current.

Enforcement Model

PermissionAssigned toBehavior
Enforce_Lead_Activity_QualitySales performance user/manager pathsEnables structured Lead Task validation.
Bypass_Lead_Activity_QualitySales performance admin/admin cleanup pathsAllows administrative cleanup, imports, and repairs without blocking on rep-entry validation.

Validation is scoped to Tasks whose WhoId points to a Lead. Non-Lead Tasks should not be blocked by Lead activity quality rules.

Validation Rules

RulePurpose
Lead_Call_Core_Details_RequiredCompleted Lead calls require core structured call details and meaningful narrative.
Lead_Call_Buyer_Intelligence_RequiredConnected/qualified/follow-up/converted calls require deeper buyer intelligence.
Lead_Call_Follow_Up_Due_Date_RequiredFollow-up-required calls need a current or future follow-up due date.
Lead_Call_Compliance_Notes_RequiredLicense statuses that need review require meaningful compliance notes.
Lead_Task_Open_Core_Details_RequiredOpen Lead Tasks need task type, due date, product group, and next step.
Lead_Task_Completed_Core_RequiredCompleted non-call Lead Tasks need task type, product group, and next step.

Conversion Gate

Lead conversion calls LeadActivityQualityService.validateLeadConversion. For enforced users, conversion requires a complete structured sales touch in the last 14 days.

The latest structured touch must have quality Complete or Follow-up Scheduled. This prevents converting stale or low-quality lead records into Account/Contact/Opportunity pipeline.

Reporting Surfaces

Report/list viewPurpose
Completed_Lead_CallsCompleted calls and captured intelligence.
Incomplete_Lead_Call_TasksCompleted call Tasks where quality status is not complete/scheduled.
Lead_Call_Quality_ReviewManager review for call quality and missing fields.
Lead_Calls_Missing_Follow_UpCalls marked follow-up missing.
Lead_Product_Interest_CallsProduct and buyer-interest review.
My_Lead_Work_TodayRep work queue for due follow-ups.
Lead Tasks Created by RepTask volume by creator and status.
Lead Open Follow-up Tasks by RepOpen follow-up ownership.
Leads Without Future Follow-upOpen leads with no structured follow-up.
Lead Calls Missing IntelligenceIncomplete completed calls.

Implementation Best Practices

  1. Add new sales activity data as Activity fields when the data belongs on Task/Event.
  2. Use validation rules for simple save-time requirements when Apex budget is tight.
  3. Keep Apex responsible for derived statuses and rollups that must remain consistent across UI, API, delete, undelete, and bulk updates.
  4. Keep enforcement behind custom permissions. Sales users get enforcement; admins and integrations get explicit bypass.
  5. Update quick actions and layout requiredness with any new required field so reps see the requirement before save.
  6. Never build a second custom Task object for lead activity. Use Task/Activity so native activity timeline, reports, ownership, and mobile behavior still work.
  7. Keep reports visible to sales managers and operators. Hidden admin-only reports defeat the purpose of activity quality work.
  8. Do not manually edit Lead rollup fields unless performing controlled data repair. They are system-maintained by Task changes.
  9. If imports create Lead Tasks, populate required structured fields or run through a controlled bypass user and then backfill quality data.
  10. Before changing conversion rules, test Lead conversion, task save, task delete, undelete, reports, and permission behavior together.

Last updated on

On this page