xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField Sales & SFACRMRewardsClaimsInventoryProcurementWarehouse 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
Auto DMSConsumer Goods DMSSales Force Automation (SFA) 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/CRM/Opportunity lines
HOW-TO · Last reviewed

Opportunity lines

An opportunity line is one item or service on an opportunity: what the customer wants, how much of it, and at what price, discount and tax. It also records how much of that quantity has gone onto sales orders and service orders. The lines are what the opportunity's Quote, Order and Service Order buttons copy, and their amounts make up the opportunity's totals. You add lines after the opportunity is saved. A deal's lines are where it is priced, and they carry into the quote and orders that follow.

Overview

A line has three parts:

  • What is offered. The Item, with its SKU and Item Lot Type where the item has them, a Quantity, and an optional Description.
  • Its price. Unit Price, the Price List it came from, discounts and taxes. These roll up into the line's Amount and Gross Amount, and into the opportunity's totals and Amount Summary.
  • Its release. Order Quantity and Service Order Quantity count what has already gone onto sales orders and service orders. Pending Quantity is what is left to release.

Lines are opened from the opportunity's Lines tab. They have no list of their own in any app.

On service opportunities, a line can also carry service contract, campaign and recommendation details. Those details record why the line is there and how its cost is to be borne.

When to use it

Add a line for every item or service the customer is considering. Change lines freely while the deal is being negotiated: a different quantity, a negotiated price, another tax group. Before you raise a quote or an order, check that the lines are complete, because those buttons copy the lines as they are at that moment.

How xMatix handles it

Where lines come from

You can add lines yourself, and xMatix also adds them in these cases:

SourceWhat it adds
Converting a leadThe lead's interested item and SKU, quantity 1. Not on partner opportunities, and only when the opportunity has no lines yet.
Running a campaignOne line per campaign item, with the campaign and, where the campaign says so, the Campaign Mandatory flag.
Open campaign work on the asset (service)One line for each open maintenance item on the opportunity's asset whose campaign is running today and is not a manual-action campaign. Lines that are already on the opportunity are not added again.
The opportunity's Service Contract (service)One line for each contract line on the asset that still has quantity pending, when the asset contract is set to populate its lines. The line takes the contract's posting type.
Accepting a service recommendation (service)One line per accepted recommendation, with its item and quantity. The recommendation is then tied to the line. Rejecting the recommendation removes the line again.
A package itemThe package's components, as lines of their own under the package line. See Package lines.

A line created from an opportunity takes the opportunity's record type (Sales or Service), and that decides which line form opens.

What happens when you save a line

When a new line is saved, xMatix:

  1. checks that the item is active, and that it has a valid SKU where the item needs one;
  2. records the alias or alternate item you picked and keeps the requested item in Original Item;
  3. prices the line from the price list in force, unless you typed a unit price yourself (see How lines are priced);
  4. picks the tax group from the tax rules, applies the matching discount-group rule and works out the taxes;
  5. copies the opportunity's header Discount percentage onto the line, when there is one;
  6. adds the components of a package item as lines of their own;
  7. sets Posting Type from the service contract on the line, or to Generate Invoices when no contract treatment applies;
  8. numbers the line from the Opportunity Line Name Setting (series OPL).

When an existing line changes, only the affected steps run again:

You changexMatix
Price List or Price As On DateRe-prices the line
Tax Group, SKU, Quantity or the amountWorks out the taxes again
Discount Amount or Cash Discount AmountClears the matching percentage, so the amount is used
Quantity of a package lineRescales its component lines
Service ContractSets Posting Type again from the contract

After any line is added, changed or deleted, xMatix also spreads the opportunity's discounted-item lines over the remaining lines again (see Discounted items).

How lines are priced

The Unit Price comes from a sale price list rule for the item. xMatix uses the line's own Price List, then the opportunity's price list, then the default price list. The rule must be in force on the price date: the line's price-as-on date, else the opportunity's Price As On Date, else its Document Date, else today. Rules can be limited to the opportunity's Service Type.

  • A typed price is kept. If you enter a unit price on a new line, xMatix does not replace it with the list price.
  • Bundled components are never repriced. A component whose price is included in its package (Price Bundled) keeps its price.
  • Changing the item does not reprice. It cannot happen on a saved line anyway (see Business rules).

The record page shows a second price field, also labelled Unit Price, in Price & Tax Details. That field is an override: when it is above zero, the line's value is worked out from it instead of from the list price. See how prices resolve.

How the amounts are worked out

  • Base Amount = Quantity × the unit price. The override Unit Price on the record page wins when it is above zero.
  • Net Discount adds up three discounts: the regular discount (a percentage, or Discount Amount), the cash discount (a percentage, or Cash Discount Amount) and the contract discount (a percentage, or Contract Discount Amount). In each pair, an amount above zero wins over the percentage.
  • Amount = Base Amount − Net Discount, less the line's share of any discounted-item lines (Additional Discount Share).
  • Gross Amount = Amount + Tax Amount.

With Apply Post Tax Discount ticked, the discounts are worked out on the base plus tax and come off after tax: Amount is then the base, and Gross Amount is base + tax − discounts.

Discounted items

A line whose item is of type Discounted Item takes value off the opportunity instead of adding to it, and is never taxed. The item's Discount Tax Treatment decides how:

  • Reduces Taxable Value — the line's value is spread over the opportunity's other lines in proportion to their value, into each line's Additional Discount Share. Those lines are taxed again on the lower value. The discounted-item line itself shows an amount of 0.
  • After Tax — the other lines keep their value and tax, and the discounted-item line's amount is negative, so the opportunity total drops by it after tax.

If the discounted-item lines are worth more than the rest of the opportunity, the save is refused.

Package lines

When you add a package item, its mandatory and selected components are added as lines under it, with quantities scaled to the package line. Each component line points to its package through Package Opportunity Line. Changing the package line's quantity rescales the components. Deleting the package line deletes its components with it. Component quantities must stay within the minimum and maximum set on the item's component definition. A mandatory component cannot be deleted on its own. To choose optional components, use Product Configurator on the opportunity; see Product configurator and demos.

What release means

Order and Service Order on the opportunity copy each line's Pending Quantity onto the new order:

  • Order Quantity is the total quantity of the sales order lines raised from this line. Service Order Quantity is the same for service order lines. Both are recalculated whenever those order lines are added, change quantity or are deleted.
  • Pending Quantity = Quantity − Order Quantity − Service Order Quantity.

Deleting an order line therefore gives the quantity back to the opportunity line. Cancelling part of an order line does not, because the counters add up the order line's Quantity.

Quote works differently. It copies every line at its full quantity, every time, and a quote line does not count as released. An order you later raise from that quote is not linked to the opportunity lines either. So a quote never changes Pending Quantity.

What is copied onto quotes and orders

RaisedCopied from each line
QuoteItem, SKU, Item Lot Type, quantity, unit price, tax group, discount amounts, price-as-on date, posting type, duration, alternate and original item, contract and recommendation details, and the package structure
Sales orderItem, SKU, Item Lot Type, the pending quantity, both unit prices, tax group, discount amounts, and the package structure
Service orderItem, SKU, the pending quantity, both unit prices, tax group, discount amounts, Duration In Hours (as the standard hours), contract, campaign, recommendation and posting type details

The line's Description is not copied onto any of them. A service order does not keep the package structure: component lines arrive as ordinary lines.

Prerequisites

  • A saved opportunity that you are allowed to edit.
  • The items you want to offer, active, with a price on a sale price list.
  • For contract-covered service work, an active service contract on the customer's asset.

Procedure

Step 1 — Open the lines

Open the opportunity and choose the Lines tab. The list shows the opportunity's lines. Open a line from the list to see its record page.

Step 2 — Add a line

  1. On the Lines tab, choose Quick Add. A short form opens in the list.
  2. Pick the Item. The SKU and Item Lot Type pickers then offer only that item's SKUs and lot types; fill them if the item has them.
  3. Enter the Quantity. It must be more than zero.
  4. Leave Unit Price empty to take the price list price, or type the negotiated price.
  5. Check the Tax Group, and add a Description if the customer needs more detail. The item's context panel beside the form shows its details.
  6. Save. The line gets its number (series OPL), its price, discounts and tax. The opportunity's totals and Amount Summary update. If the item is a package, its component lines appear too.

Step 3 — Change a line

  • From the list. Choose Edit on the line's row. The same short form opens with the line's values. Change Quantity, Unit Price, Tax Group, SKU, Item Lot Type or Description, and save.
  • On the record page. Open the line. Its fields can be edited in place: select a field, change it and save. Here you can also set the override Unit Price, Discount Amount, Price List and Duration In Hours. On a sales line, Edit in the header opens the short form.

You cannot change the Item of a saved line. To offer a different item, delete the line and add a new one. A Campaign Mandatory line cannot have its item, quantity or service contract changed.

Step 4 — Delete a line

Choose Delete on the line's row, or Delete in the line's header, and confirm. The opportunity's totals update. Deleting a package line deletes its components. Two kinds of line cannot be deleted: a Campaign Mandatory line, and a mandatory package component on its own.

Delete lines only before anything has been released from them. xMatix does not stop you deleting a line that is already on an order. The order keeps its own lines, but they no longer point to a line on the opportunity.

Step 5 — Check what is left to release

Before running Order or Service Order on the opportunity, compare each line's Quantity with its Pending Quantity. A line with nothing pending is skipped. To release more of a line later, raise its Quantity and run the button again; only the increase is released. See Raising the sales order or service order.

Step 6 — Work with service lines

On a service opportunity, the line's record page has two extra panels:

  • Contract Details — the contract product, the asset's contract and contract line the work counts against, and two further contract slots with Service Contract Weightage for work split across contracts.
  • Service Details — the Service Contract, the Campaign that put the line there, the Posting Type and the Service Recommendation the line came from.

Setting a Service Contract on a line checks it against the asset: the asset must have an active contract of that kind, the item must be in the contract's scope, and the quantity must be within what the contract allows. The Posting Type then follows the contract's posting treatment.

Step 7 — Use lines on mobile

In the xMatix mobile app, the opportunity's lines use the same forms. A new line is priced from the sale price list, with discount group and tax defaults, even while you are offline. The server works out the final price and tax when the record syncs.

Fields

The short form used by Quick Add and row Edit:

FieldWhat it meansNotes
ItemThe product or service offeredMust be active. Cannot be changed after the line is saved.
SKUThe item variantOffers only the item's SKUs. Required when the item needs a SKU.
Item Lot TypeThe lot or batch categoryOffers only the item's lot types. Copied to quotes and sales orders.
QuantityHow much is offeredMust be more than zero. Changing it on a package line rescales the components.
Unit PriceThe price per unitFilled from the price list when left empty; a typed price is kept.
Tax GroupThe taxes that applyPicked from the tax rules when the line is created; changing it recalculates the tax.
DescriptionFree text about the lineNot copied onto quotes or orders.

The line's record page, in the order of its panels:

FieldWhat it meansNotes
Item Details
Item, SKU, Item Lot TypeAs above
Alternate ItemThe alternate that replaced the requested itemSet when an alternate was used; Original Item keeps the requested one
QuantityAs above
Duration In HoursEstimated labour timeDefault 0. Becomes the standard hours on a service order.
DescriptionAs above
Contract Details (service lines)
Service Contract ItemThe contract product this line relates toFilled from the asset contract for contract lines
Asset Service Contract, Asset Service Contract LineThe asset's contract and the entitlement line the work counts against
Service Contract Split 2, Service Contract Split 3Further contracts sharing the line
Service Contract WeightageThe share of the line borne by the first contractCalculated
Service Details (service lines)
Service ContractThe contract covering the lineChecked against the asset; decides Posting Type
CampaignThe campaign that added the lineSet by campaign runs
Posting TypeHow the line's cost is to be borneSet by xMatix from the contract; Generate Invoices when no contract treatment applies
Service RecommendationThe recommendation the line came fromSet when a recommendation is accepted
Price & Tax Details
Unit PriceThe override priceWhen above zero, used instead of the list price
Discount AmountA fixed discount on the lineWins over the discount percentage
Tax AmountTax on the lineCalculated from the tax group
AmountValue after discount, before taxCalculated
Tax GroupAs above
Price ListThe price list the price came fromChanging it re-prices the line
System Details
Created By, Created Date, Modified By, Modified DateWho created and last changed the line, and whenRead-only

The Amounts panel beside the form summarises the line's money figures.

Not on the shipped forms. Order Quantity, Service Order Quantity, Pending Quantity, Base Amount, Gross Amount, Net Discount, Cash Discount Amount, Contract Discount Amount, Apply Post Tax Discount, Price As On Date, Original Item, Campaign Mandatory, Price Bundled and the tax slots (Tax1–Tax6 with their names, rates and types) are kept on every line. An administrator can add them to the line form or the Lines list; see Configuration. The entity reference describes every field.

Business rules

  • Numbering. Lines are numbered from the Opportunity Line Name Setting: series OPL, the date as day, month and year, and a six-digit counter, joined by hyphens.
  • Quantity. "Quantity should not be less than 0" is shown when the quantity is zero or negative.
  • Item checks. The item must be active and, where it needs one, have a valid SKU of that item. Items marked as sold only in a package are not blocked on opportunity lines.
  • Item lock. Once a line is saved, its Item cannot change.
  • Parent lock. A line cannot be moved to another opportunity.
  • Campaign lines. A Campaign Mandatory line cannot have its item, quantity or service contract changed, and cannot be deleted.
  • Package components. Component quantities stay between the component's minimum and maximum. A mandatory component needs a quantity above zero and cannot be deleted on its own. Some components do not allow their quantity to change at all.
  • Service contracts. A line's service contract must be active on the asset, cover the item, have quantity left, and must not be a single-use contract already used.
  • Header discount. The opportunity's Discount percentage is copied onto lines when they are added. Changing it later does not change the discount on lines already saved.
  • Release tracking. Order Quantity and Service Order Quantity follow the order lines raised from the line. Order and Service Order take only Pending Quantity.
  • Deleting is not guarded by release. A line can be deleted after it has been released to an order.

Example

A service adviser at a tractor workshop opens a Service Opportunity for a customer's tractor. The tractor has an annual maintenance contract, so the adviser sets Service Contract on the opportunity. On save, the contract's two pending lines arrive: an engine oil change and a filter kit, each with Posting Type taken from the contract.

During inspection the technician recommends new brake pads, and the adviser accepts the recommendation. A brake-pad line appears with the recommendation linked. The adviser then chooses Quick Add for a pair of mirrors the customer asks about, quantity 2. The price comes from the workshop's price list, and the adviser types a lower negotiated price before saving.

The customer approves everything except one mirror. The adviser lowers the mirror line to quantity 1 and chooses Service Order. All four lines go onto the service order. Each line's Service Order Quantity now equals its quantity, and Pending Quantity is 0. A week later the customer wants the second mirror. The adviser raises the mirror line to 2 and runs Service Order again, and a second service order carries one mirror.

Training

Practice exercise

In a sandbox, as a user with the Sales Executive profile:

  1. Open a sales opportunity and choose Lines → Quick Add. Add an item with a price on your sale price list, quantity 4, leaving Unit Price empty. Expected: the line is numbered OPL-… and the list price is filled in.
  2. Add a second line and type a unit price lower than the list price. Expected: your price is kept.
  3. Open the first line and try to change its Item. Expected: the save is refused because the item is locked.
  4. Enter quantity 0 on the second line. Expected: "Quantity should not be less than 0".
  5. Choose Order on the opportunity and confirm. Expected: a sales order with both lines. Choosing Order again is refused with "Every line on this opportunity has already been released. There is nothing left to put on an order."
  6. Raise the first line to quantity 6 and choose Order again. Expected: a new order with quantity 2 of that item.

Quick reference

  • Add lines with Quick Add on the Lines tab; edit with the row's Edit.
  • Leave Unit Price empty to take the list price; a typed price is kept.
  • The item is locked once the line is saved — delete and re-add to change it.
  • Quantity must be more than zero.
  • Pending Quantity = Quantity − Order Quantity − Service Order Quantity.
  • Quotes copy every line in full and never reduce what is pending.
  • Description does not travel to quotes or orders.
  • Deleting a package line deletes its components.
  • Campaign-mandated lines cannot be changed or deleted.

Permissions

Access is set on security profiles:

  • Entity access. The shipped Sales, Service and System Admin profiles have full access to opportunity lines, including View All and Modify All. Sales Executive, Sales Manager and Standard User have Read, Create, Update, Delete, Share and Assign.
  • Actions. Quick Add, Edit and Delete on lines are granted on the shipped Sales Executive, Sales Manager, Standard User and System Admin profiles. A user without the grant does not see the button.
  • Record sharing. Lines are owned by a user and are read-only to other users by default. Access follows the role hierarchy, teams and manual shares, as for opportunities.
  • The opportunity matters too. Adding a line changes the opportunity's totals, so the user also needs to be able to edit the opportunity.

Configuration

Administrators tailor opportunity lines in these places:

  • Document numbering. Setup → Feature Hub → Platform → Document Settings: Opportunity Line Name Setting (series OPL, date part and six-digit counter). See Email templates and document numbering.
  • Line forms. The shipped line forms are tenant metadata you change in Design Studio: the short form (Opportunity Line QAP), and the record pages for sales lines (Sales Opportunity Line View) and service lines (Service Opportunity Line View). Add fields such as Pending Quantity, Order Quantity, Service Order Quantity, Cash Discount Amount or Price As On Date here if users need them. See Designing a form layout.
  • The Lines list. The Lines tab is a list on the opportunity's record page. Change its columns through the list view and its buttons in the opportunity layout.
  • Record types. Opportunity lines have Sales and Service record types. Generated lines take the one whose name matches the opportunity's record type, which decides the record page they open in.
  • Lookup filters. The shipped filters limit SKU and Item Lot Type to the line's item. The Item picker is not filtered.
  • Validations. The Quantity Rule Validation refuses a quantity of zero or less. A shipped Unit Price Rule Validation, which would refuse a zero price, is switched off. Switch it on if every line must carry a price.
  • Picklists. Package Classification ships with Packaged Item and Custom BOM Item.
  • Pricing, discounts and taxes. Sale price lists, discount groups and tax groups decide line prices and taxes — see Pricing, discounts and taxes. Item components, minimum and maximum quantities and bundled prices are set on the item; see Items.
  • Discounted items. The item's Item Type and Discount Tax Treatment decide how a discounted-item line affects the opportunity.

Common problems

"Quantity should not be less than 0"

The quantity is zero or negative. Enter a quantity greater than zero.

"The field … is locked and not editable as transactions have been made against this record."

You tried to change the Item of a saved line. Delete the line and add a new one with the right item.

"Item is Inactive."

The item has been deactivated. Pick another item, or ask an administrator to reactivate it.

"SKU is required for this item." or "Invalid SKU selected for this item."

The item is sold in variants. Pick one of the item's SKUs in SKU.

"Campaign mandated items cannot be modified." or "Campaign mandated items cannot be deleted."

The line came from a campaign that makes the item compulsory, such as a recall. It cannot be changed or removed.

"Mandatory package component cannot be removed."

You tried to delete a mandatory component of a package. Delete the package line instead, which deletes all its components.

"Quantity cannot be less than … for this component." or "Quantity cannot exceed … for this component."

The component's quantity is outside the range set on the package item. Enter a quantity within it.

"The Item is not in scope of active Service Contract!"

The line's Service Contract does not cover this item. Clear the contract on the line, or pick the contract that covers it. Related messages say the asset has no active contract of that kind, the contract is single-use and already used, or the quantity is more than the contract allows.

"Discounted Item lines exceed the document value."

The discounted-item lines take off more than the rest of the opportunity is worth. Lower the discounted-item line or add the lines it applies to.

The order has no description for my line

Description is not copied onto quotes or orders. Add the text on the new document.

Common questions

Why is Pending Quantity unchanged after I raised a quote?

A quote does not release anything. Quote copies every line at its full quantity, and the quote's lines are not counted against the opportunity lines. Only Order and Service Order on the opportunity reduce Pending Quantity. An order you raise from the quote is not linked back to the opportunity lines either. So if you raise an order from the quote and then choose Order on the opportunity, the same quantity goes onto two orders. Pick one path for each deal.

Can I release only some lines, or part of a line?

The shipped Order and Service Order buttons release every line's full pending quantity. To hold part of a line back, lower its quantity before you release, then raise it again when the customer is ready and release once more. Only the increase goes onto the next order.

Why did lines appear that I did not add?

xMatix adds lines from a converted lead's interested item, a campaign run, open campaign work on the asset, the opportunity's service contract, accepted service recommendations and package components. Campaign, Service Recommendation, Asset Service Contract Line and Package Opportunity Line show where a line came from.

I changed the price list but some prices stayed the same

A component whose price is bundled into its package is never repriced. Also check whether the line has an override Unit Price in Price & Tax Details: when it is above zero, the line's value is worked out from it, whatever the list price.

What happens to an order if I delete the opportunity line?

Nothing changes on the order: it keeps its lines, quantities and prices. The order line simply no longer points to an opportunity line. Delete lines only before they are released, so the opportunity stays a true record of the deal.