Post Quote Creation

Prev Next

Purpose

Allows you to run a script when users create a quote or an agreement, to set default values for specified fields.

Setup

Upload the script for Post Quote Creation.

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 or Quote object associated with the agreement under negotiation. It contains the functions you can use to query and modify the quote or agreement and its line item data.

accountInfo

AccountInfo

Basic data about the account, including its address data.

userInfoList

Set<UserInfo>

List of all users in the system.

sourceQuotePFRecords

Set<PartnerFunctionRecord>

List of partner function records in the quote or agreement. If the script is triggered due to the quote copy action, this variable is populated with information about the partner functions of the source quote or agreement.

accountPFRecords

List<PartnerFunctionRecord>

List of partner function records for the account of the quote or agreement.

Method for detecting quote copy

Use the SalesItemsTree.isQuoteCopy() method in your script to detect whether the current quote or agreement was created by using the copy action.

This method returns a Boolean value:

  • true if the current workflow is a quote or agreement copy

  • false if the quote or agreement was created in another way

This method is useful when your script must handle copied quotes differently from newly created quotes. For example, when a quote is copied, you may want to reset selected business-specific values, keep only some values from the source quote, or apply different initialization logic at the header or line-item level.