Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
DictionaryOOpportunity Line Item
SalesIntermediate

Opportunity Line Item

An Opportunity Line Item in Salesforce (OpportunityLineItem in the API) is a standard child object that represents a single Product included on an Opportunity, capturing the Quantity, UnitPrice, ListPrice, Discount, and TotalPrice for that line.

§ 01

Definition

An Opportunity Line Item in Salesforce (OpportunityLineItem in the API) is a standard child object that represents a single Product included on an Opportunity, capturing the Quantity, UnitPrice, ListPrice, Discount, and TotalPrice for that line. Each Opportunity Line Item links to a parent Opportunity through OpportunityId and to a Product through PricebookEntryId - meaning an Opportunity Line Item always sits on top of a specific Price Book Entry and inherits its currency, list price, and product reference. The sum of all Opportunity Line Items' TotalPrice values populates the Amount field on the parent Opportunity (when "Use Product-Based Pricing" is enabled), which then drives forecasts, pipeline reports, and territory roll-ups. Opportunity Line Items snapshot pricing at insert time - subsequent changes to the underlying Price Book Entry do not propagate, so historical pipeline values remain stable as price lists evolve.

§ 02

In plain English

👋 Study buddy

An Opportunity Line Item is one product line on a Salesforce deal. If a sales rep is selling three different products to the same customer, the Opportunity has three Opportunity Line Items - one per product - each with its own quantity, price, and total. Add them all up and you get the Opportunity's total deal value.

§ 03

Worked example

scenario · real-world use

A sales rep at a software company is working an Opportunity with prospect Acme Corp. The proposed deal includes 100 seats of Pro Plan ($99 each), 20 seats of Premium Add-On ($30 each), and one annual Onboarding Service ($2,500). The rep adds three Opportunity Line Items to the Opportunity: one for Pro Plan (Quantity 100, UnitPrice $99, TotalPrice $9,900), one for Premium Add-On (Quantity 20, UnitPrice $30, TotalPrice $600), and one for Onboarding (Quantity 1, UnitPrice $2,500, TotalPrice $2,500). The Opportunity's Amount field rolls up to $13,000 - the sum of the three line items. When the deal closes won, an Order is generated and each Opportunity Line Item becomes an Order Product on the new Order.

§ 04

Why Opportunity Line Item matters

The Opportunity Line Item depends on the Opportunity's selected Price Book - once an Opportunity has line items, its Pricebook2Id cannot be changed without removing them all first. This catches new admins who try to switch an Opportunity from Standard to a custom Price Book mid-deal. The workaround is to delete all Opportunity Line Items, change the Pricebook2Id, then re-add the lines from the new Price Book - or, in CPQ-enabled orgs, use the CPQ reprice action which automates this swap.

Discounts on Opportunity Line Items can be expressed two ways: as a percentage Discount value (e.g., 10%, which Salesforce uses to compute the discounted UnitPrice) or by directly setting the UnitPrice below the ListPrice. Reporting on discount depth typically uses the Discount field, but if a rep types a custom UnitPrice instead, that line shows Discount = 0 even though the customer is paying less. Many orgs add a formula field like (ListPrice - UnitPrice) / ListPrice to capture the effective discount regardless of how it was entered.

Schedules add another dimension to the Opportunity Line Item: with Quantity Schedules and Revenue Schedules enabled, a single line item can spread its TotalPrice across multiple periods (monthly, quarterly, etc.) for time-phased forecasting. Each period becomes an OpportunityLineItemSchedule child record. This is essential for subscription deals where a single Opportunity Line Item represents a 12-month or multi-year contract that should be recognized incrementally rather than all at once.

§ 05

How to create Opportunity Line Item

Opportunity Line Items (Opportunity Products) are the line-item details on an Opportunity — what you're selling, in what quantity, at what price. They roll up to the Opportunity Amount automatically. The most common stumble: forgetting to pick a Price Book first.

  1. Open the parent Opportunity

    Line items live under the Products related list on an Opportunity.

  2. Pick the Price Book (first time only)

    If this is the first product on the Opp, you'll be prompted to pick a Price Book. The Price Book gates which Products are available — pick wrong and the right Products won't appear in the picker.

  3. Open the Products related list → Add Products

    Multi-select picker. Filter by Product Family or Search.

  4. Set Quantity and Sales Price per product

    Quantity defaults to 1; Sales Price defaults to the Price Book's List Price. Override Sales Price for one-off discounting.

  5. (Optional) set Discount, Service Date, Description

    Discount applies as a percentage off Sales Price. Service Date is when the product is delivered — drives recurring revenue reporting.

  6. Save

    Line items are created. Opportunity Amount auto-recalculates from line items if Amount is not manually overridden.

Mandatory fields
Productrequired

Required. Must be in the Opportunity's Price Book.

Quantityrequired

Required. Defaults to 1.

Sales Pricerequired

Required. Defaults to Price Book List Price.

Gotchas
  • Once a Price Book is locked to an Opportunity, you can't change it without removing all line items first. Pick correctly upfront.
  • Opportunity Amount auto-rolls up from line items — but only if you haven't manually overridden Amount. If a user types a value into Amount, the rollup stops working until that value is cleared.
  • Deleting a line item cascades to anything referencing it (Quote Line Items synced from this Opp, etc.). Salesforce confirms with a dialog — pay attention to it.
§ 06

How organizations use Opportunity Line Item

B2B SaaS sales team

Adds Opportunity Line Items for every product and add-on on each deal. Sales managers use Opportunity Line Item reports broken out by Product Family to see which product mix is driving pipeline and which features are most often attached to closed-won deals.

Subscription business with multi-year contracts

Uses Revenue Schedules on Opportunity Line Items to spread a 36-month enterprise contract's $1.2M total across 36 monthly schedule rows, enabling time-phased forecasting and ASC 606 / IFRS 15 revenue recognition aligned to delivery rather than booking.

Manufacturing company with configurable products

Uses Salesforce CPQ on top of Opportunity Line Items, where a single CPQ Quote produces multiple Opportunity Line Items representing the bundle's configured options. Pricing logic, contracted prices, and approval workflows all run through CPQ but ultimately persist as Opportunity Line Items for native pipeline reporting.

§

Trust & references

Official documentation

Straight from the source - Salesforce's reference material on Opportunity Line Item.

Was this entry helpful?
Help us write better definitions. Quick reactions or detailed edit suggestions.

About the Author

Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.

§

Discussion

Loading…

Loading discussion…