Loading
Prepare for Email to Become the Default Login ExperienceRead More
Extend Salesforce with Clicks, Not Code
Find Examples of Advanced Formulas

Find Examples of Advanced Formulas

Review sample formulas for sales, service, financial, employee-services, and integration scenarios. Examples cover commissions and discounts, cross-object references, date and time calculations, image links, data completeness, and more. Adapt the formulas to your fields and business requirements.

Required Editions

Available in: both Salesforce Classic and Lightning Experience
Available in: Essentials, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To view formula field details: View Setup and Configuration
To create, change, or delete formula fields: Customize Application

Browse these categories to find relevant formula examples. For details about the operators and functions used in these formulas, see Formula Operators and Functions by Context.

  • Sample Account Management Formulas
    Rate an account, assign sales regions based on billing state, and track the age of active contracts.
  • Sample Account Media Service Formulas
    Create formula links to web and news services, such as Bloomberg, Google, or Yahoo, based on account names or financial ticker symbols.
  • Sample Case Management Formulas
    Create autodial links, categorize cases by age, measure data completeness, and suggest agent prompts or offers based on purchase and support information.
  • Sample Commission Calculations Formulas
    Calculate commissions, assign rates by deal size, identify commissions that meet a threshold, and return the highest asset commission.
  • Sample Contact Management Formulas
    Display account details on contact pages, create profile and website links, assign contact identifiers and priorities, and format addresses and phone numbers.
  • Sample Data Categorization Formulas
    Categorize deals and assets by size and classify products by a keyword in a custom text field.
  • Sample Date Formulas
    Use Date, Date/Time, and Date formulas for many common business needs. For example, extract and format parts of a date or time, such as quarter, week, weekday, month name, or the hour, minute, and second. Calculate durations in days, business days, or business hours. Project future and relative dates, and handle issues such as leap years, the last day of the month, and time zone conversions.
  • Sample Discounting Formulas
    Identify discounted opportunities and calculate discount-adjusted amounts. Examples use custom currency amounts, percentages, rounding, and approval status.
  • Sample Employee Services Formulas
    Calculate bonuses, 401(k) matching, weekly hours worked, and regular and overtime pay.
  • Sample Expense Tracking Formulas
    Create identifiers from trip and expense information and calculate mileage reimbursement at a set rate per mile.
  • Sample Financial Calculations Formulas
    Calculate compound interest, consultant costs, gross margin, and contract payments. Other examples supply missing payment due dates and identify overdue unpaid payments.
  • Sample Image Link Formulas
    Visualize case priority, case age, project status, ratings, and scores with images such as flags, colored indicators, star ratings, and proportional bars.
  • Sample Integration Link Formulas
    Create links that connect records to external systems for API integrations, carrier shipment tracking (FedEx, UPS, or DHL), and Skype auto-dialing. Review session-context restrictions and picklist-driven links.
  • Sample Lead Management Formulas
    Track how long leads have been open, measure lead data completeness, convert lead numbers for calculations, and distribute leads or cases across queues.
  • Sample Metric Conversion Formulas
    Convert temperatures from Celsius to Fahrenheit and distances from miles to kilometers.
  • Sample Opportunity Management Formulas
    Calculate opportunity revenue, costs, pricing, commissions, shipping, and contract value. Other examples categorize opportunities, measure data completeness, format revenue, and link to stage-specific sales documents.
  • Sample Pricing Formulas
    Calculate a total amount from unit price and quantity, and derive a per-user price from total license revenue.
  • Sample Scoring Calculations Formulas
    Score leads by source or rating, and rank customers based on survey results.
 
Loading
Salesforce Help | Article