--- title: "Organize Line Item Structure" slug: "organize-line-item-structure" description: "Use this extension point to automatically add products, configure them, set quote attributes, and perform other supported operations in quotes." updated: 2026-06-02T13:20:41Z published: 2026-06-02T13:20:41Z canonical: "docs.zilliant.com/organize-line-item-structure" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.zilliant.com/llms.txt > Use this file to discover all available pages before exploring further. # Organize Line Item Structure ## Purpose Allows you to run a script to automatically add products, configure them, set quote or agreement attributes, and perform other supported operations in quotes and agreements. A script is based on the customer-specific complex logic and business requirements. ## Setup Upload the script for **Organize Line Item Structure**. For details about uploading and configuring Groovy scripts, read [Upload a Groovy script](/docs/upload-a-groovy-script). ## Binding variables In addition to the [common binding variables](/docs/binding-variables), the following binding variables are available for this extension point. | Variable name | Class | Description | | --- | --- | --- | | salesItemsTree | SalesItemsTree | Represents the quote or the Quote object associated with the agreement under negotiation. It contains the functions that you can use to query and modify the quote or agreement and its line item data. | | activeObject | String | Quote or agreement URI. | For details about the classes listed in this table, including available methods, fields, and method signatures, read the [Zilliant Groovy API reference](/main/docs/groovy-api-reference). ## Expected output The script should return the `salesItemsTree` variable. ## Script execution A user must manually run the script uploaded for this extension point. For details on running a script, read: - **Update line items with a script** in [Manage quote line items](/v1/docs/manage-line-items) - **Update line items with a script** in [Manage agreement line items](/v1/docs/manage-agreement-line-items) The resulting line item table might not fully match the preview due to the possible structure and data modifications from other subsystems. For example, if your script adds a new line item that has a BOM explosion trigger, the preview doesn't show items from the BOM explosion, but they appear in the line item table.