Line Item Setup
In this article we cover setting up line items for a module: which module the products come from, which product values fill in when someone picks a product, and which columns the table shows. How people add line items and how the amounts are calculated is covered in Line Items.
Turning line items on
Quotes and Orders come with line items. For a module you build yourself, turn on Has Line Items in the Module Builder. It can't be turned on or off once the module is deployed.
Which module the products come from
Line items pick their products from a line item source module, normally Products. Another module can be made a line item source with the Line Item Source option when building it, and then chosen under Line Items Come From on a module with line items. A clinic could, for example, keep its treatments and vaccines in a Services module and pick from that.
The source can only be changed until the module has its first line item. After that it's locked, so existing items keep pointing at the right products.
What fills in automatically
Which product fields fill which line item fields, for example the product's Price into the line item's Unit Price, is set per module in the Line Items Snapshot layout, under Workspace > Modules Manager > [module] > Layouts. The same layout decides which fields appear on the line item form. See Layouts.
The values are copied when the product is picked. Changing a product's price later doesn't change line items that already exist.
Which columns the table shows
The columns of the Line Items table on the record page are set in the module's Record layout, inside its Line Items section. See Layouts.
In short
| Question | Answer |
|---|---|
| How do I give my own module line items? | Turn on Has Line Items in the Module Builder |
| Can products come from another module? | Yes, from any module marked Line Item Source |
| Can I change the source later? | Only until the module has its first line item |
| What fills in when someone picks a product? | Whatever the Line Items Snapshot layout maps |
| Where do I choose the table columns? | In the module's Record layout, inside the Line Items section |