- 14 Feb 2025
- Print
- DarkLight
Organize Line Item Structure
- Updated on 14 Feb 2025
- Print
- DarkLight
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.
Binding variables
In addition to the common binding variables, the following binding variables are available for this extension point.
Variable name | Class | Description |
---|---|---|
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. |
Expected output
The script should return the salesItemsTree
variable.
Script execution
A user must manually run the script uploaded for this extension point by following these steps.
In a quote:
On the Items tab, select Organize line items with script
.
Select the script, then select Next.
Preview the line items structure and select Accept to apply the changes.
Note
The system doesn't run validation checks when generating the preview. This means that when you select Accept, the system might still encounter a problem if there are any conflicts.
In the quote, on the bottom button bar, select Save.
In an agreement:
On the Line Items tab, select Organize line items with script
.
Select the script, then select Next.
Preview the line items structure and select Accept to apply the changes.
Note
The system doesn't run validation checks when generating the preview. This means that when you select Accept, the system might still encounter a problem if there are any conflicts.
In the agreement, on the bottom button bar, select Save.
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 the items from the BOM explosion, but they appear in the line item table.