Newer Version Available
Sample Lead Management Formulas
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: All Editions |
For details about using the functions included in these samples, see Formula Operators and Functions.
Lead Aging (for open leads)
This formula checks to see if a lead is open and if so, calculates the number of days it has been open by subtracting the date and time created from the current date and time. The result is the number of days open rounded to zero decimal places. If the lead is not open, this field is blank.
1IF(ISPICKVAL(Status,
2 "Open"), ROUND(NOW()-CreatedDate, 0), null)Lead Data Completeness
This formula calculates the percent of certain lead fields that your sales personnel enter. The formula field checks the values of two custom number fields: Phone and Email. If the fields are empty, the formula returns the value “0.” The formula returns a value of “1” for each field that contains a value and multiplies this total by fifty to give you the percentage of fields that contain data.
1(IF(Phone = "", 0, 1) + IF(Email = "", 0, 1) ) * 50Lead Numbering
This formula returns a number value for the text value in the auto-number field Lead Number. This can be useful if you want to use the Lead Number field in a calculation, such as round-robin or other routing purposes. Note that auto-number fields are text fields and must be converted to a number for numeric calculations.
1VALUE(Lead_Number__c)Round-Robin Assignment of Cases or Leads
The following formula example for leads assumes you have three lead queues and you want to assign an equal number of incoming leads to each queue. You can also assign cases using a similar formula.
1MOD(VALUE(Lead_Number__c),
2 3)- Round_Robin_ID = 0 is assigned to Queue A
- Round_Robin_ID = 1 is assigned to Queue B
- Round_Robin_ID = 2 is assigned to Queue C