- 11 Sep 2024
- 1 Minute to read
- Print
- DarkLight
Organize Line Item Structure
- Updated on 11 Sep 2024
- 1 Minute to read
- Print
- DarkLight
Purpose
Allows you to run a script to automatically add products, configure them, set quote attributes, and perform other supported operations in quotes. 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 | SalesItemsTree | Represents the quote. Contains functions you can use to query and modify the quote and its line items. |
activeObject | String | Quote 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:
- Open a quote.
- On the Items tab, select Organize line items with script .
- Select a script you want to run, 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.
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.