# Salesforce: Opportunity Line Item Enhanced

## Description

* Each record represents a line item belonging to a certain opportunity, with additional product details.

## Supported Data Sources

* <img src="https://fivetran.com/integrations/salesforce/resources/salesforce.svg" alt="" data-size="line"> Salesforce

## Columns

| Type     | Name                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| STRING   | opportunity\_line\_item\_id                 | Unique id for each record.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| STRING   | opportunity\_line\_item\_name               | The unique name for each opportunity line item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| INTEGER  | opportunity\_line\_item\_description        | Text description of the opportunity line item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| STRING   | opportunity\_id                             | ID of the associated Opportunity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| INTEGER  | line\_item\_index                           | The index number of the specific line item, relative to all line items in that opportunity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| INTEGER  | total\_line\_items                          | The total number of line items belonging to the same opportunity.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| DATETIME | created\_date                               | Created date.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| DATETIME | last\_modified\_date                        | Last Modified Date.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| DATETIME | service\_date                               | Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date—ServiceDate is ignored.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| STRING   | pricebook\_entry\_id                        | ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.                                                                                                                                                                                                                                                                                                                                                                                                                             |
| STRING   | product\_2\_id                              | The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later.Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| INTEGER  | list\_price                                 | Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| INTEGER  | quantity                                    | Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule.When updating these records:If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held constant.If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.                                                                                                                                                                                                                                                                                                                                        |
| DECIMAL  | unit\_price                                 | The unit price for the opportunity line item. In the Salesforce user interface, this field’s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price.This field or TotalPrice is required. You can’t specify both.If you specify Discount and Quantity, this field or TotalPrice is required.                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| DECIMAL  | total\_price                                | This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem.If you do not specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time.This field is nullable, but you can’t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item does not have a schedule or only has quantity schedule, this field can be updated. |
| INTEGER  | has\_quantity\_schedule                     | Indicates whether a quantity schedule has been created for this object (true) or not (false).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| INTEGER  | has\_revenue\_schedule                      | Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can’t be updated. In addition, the Quantity field can’t be updated if this object has a quantity schedule. Update requests aren’t rejected but the updated values are ignored.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| STRING   | product\_2\_name                            | Default name of the product.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| INTEGER  | product\_code                               | This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| INTEGER  | product\_2\_description                     | A text description of the product.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| INTEGER  | product\_external\_id                       | The unique identifier of the product in the linked external data source. For example, ID #123.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| STRING   | product\_family                             | Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| BOOLEAN  | product\_is\_active                         | Indicates whether product is active (true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| BOOLEAN  | product\_is\_archived                       | Describes whether the product is archived. The default value is false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| BOOLEAN  | product\_is\_deleted                        | Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| INTEGER  | product\_number\_of\_quantity\_installments | If the product has a quantity schedule, the number of installments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| INTEGER  | product\_quantity\_installment\_period      | If the product has a quantity schedule, the amount of time covered by the schedule.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| INTEGER  | product\_quantity\_schedule\_type           | The type of the quantity schedule, if the product has one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| INTEGER  | product\_quantity\_unit\_of\_measure        | Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The QuantityUnitOfMeasure field on ProductItem inherits this field’s values.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| INTEGER  | product\_number\_of\_revenue\_installments  | If the product has a revenue schedule, the number of installments.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| INTEGER  | product\_revenue\_installment\_period       | If the product has a revenue schedule, the time period covered by the schedule.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| INTEGER  | product\_revenue\_schedule\_type            | The type of the revenue schedule, if the product has one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://endash-guidance-docs.gitbook.io/cigro-data-templates/data-model-templates/salesforce-opportunity-line-item-enhanced.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
