Line Item Tables
Line Item Tables
Updated on Dec 3, 2024
Published on Nov 9, 2023
2 minute(s) read
Line Item Tables are the most important component of a Quote. Quotes consist of one or more (at least one) Line Item Tables, in addition to information about the customer and the seller.
A line item table is a tabular representation of line items, organized by common column headers. Individual entries in a line items table are called "line items" and represent items being sold.
Each item in a line items table is a manifestation of a product (selected from the product catalog), together with other attributes such as SKU, quantity (being sold in the quote), description (of the product), price, discount, and other such columns. All the items in a line items table share the same set of column values (hence a table).
A quote may consist of multiple line items table. For instance a company might choose to organize quotes by (a) Products and (b) Services: each of which has its own line items table. Similarly, another company may choose to organize its quotes based on invoice frequency: so has a recurring items table for products invoiced annually vs another one time sales table for products sold on a one time basis.
Products sold via subscription pricing would necessitate a new table layout to capture the input parameters that drive the subscription price. Similarly, products sold via a usage model, might require a new table that captures (in an input column) the usage amounts that determine the pricing.
Suffice it to say that line items tables are very powerful and flexible in enabling the creation of complex quotes.
Note:
Line items table are read/write by default. If a user wants a read-only line item table, they would need to edit the UI layout to remove the add/delete actions for the table.
Hidden Fields in Line Items Table
Here are all the hidden fields that need to be declared in a line item table. They are typically included in the first column, which displays the product code. All new quotes should have these fields. But older quotes may be missing some of these fields. Some features may not work properly if they are missing.
<input name="cpq_id" type="hidden" value="0" />
<input name="cpq_uuid" type="hidden" value="" />
<input name="cpq_level" type="hidden" value="0" />
<input name="cpq_configurable" type="hidden" value="1" omit="1" />
<input name="cpq_quantity_readonly" type="hidden" value="0" omit="1" />
<input name="cpq_quantity_min" type="hidden" value="0" omit="1" />
<input name="cpq_quantity_max" type="hidden" value="1000000000" omit="1" />
<input name="cpq_user_discount_enabled" type="hidden" value="1" omit="1" />
<input name="cpq_user_discount_type_enabled" type="hidden" value="1" omit="1" />
<input name="cpq_cat_ids" type="hidden" value="" omit="1" />
<input name="cpq_external_id" type="hidden" value="" omit="1" />
<input name="cpq_price_book_item_id" type="hidden" value="" omit="1" />
<input name="cpq_price_book_item_desc" type="hidden" value="" omit="1" />
<input name="cpq_price_book_item_tag" type="hidden" value="" omit="1" />
<input name="cpq_price_book_item_external_id" type="hidden" value="" omit="1" />
<input name="cpq_index" type="hidden" value="" omit="1" />
<input name="cpq_parent_index" type="hidden" value="" omit="1" />
<input name="cpq_parent_id" type="hidden" value="" omit="1" />