Purpose
Allows you to run a script when a credit check is performed for a quote. Typically this script makes a call to an enterprise resource planning (ERP) or other external system.
Setup
Upload the script for Check Credit Limit.
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. |
For details about the classes listed in this table, including available methods, fields, and method signatures, read the Zilliant Groovy API reference.
Expected output
The script should retrieve the values of one or more of the following fields from an ERP or other external system:
- Credit Limit
- Credit Exposure
- Credit Exceeded Amount
The script should then package and return the retrieved values as a GroovyTable variable. Additional data points may be returned and displayed with these values; however, the system does not process these additional data points.
Script execution
The script uploaded for this extension point is run automatically when a user select Credit Check in a quote. Based on the returned GroovyTable variable, the system updates the values in one or more of the following fields:
- Credit Limit
- Credit Exposure
- Credit Exceeded Amount
Any other data returned by the GroovyTable variable appears in a pop-up window.