On Configuration Exits
  • 11 Sep 2024
  • 2 Minutes to read
  • Dark
    Light

On Configuration Exits

  • Dark
    Light

Article summary

Purpose

Allows you to run a script for the purposes described below.

PurposeDetails
Prevent the configuration page from closingIf the script uploaded for this extension point returns the true value, users can close the configurator page in the UI. If the script returns the false value, users can't close the configurator page.
Execute a BOM explosion based on the lookup table and conditions defined in the scriptBOM explosion can be executed through the Groovy script based on the custom conditions defined in it.
Replace a configurable product with matching classified productsThe script uploaded for this extension point allows you to use the presubmit check engine to find matching classified products. If only one matching classified product is found, you can replace the configurable product with it.

Setup

Upload the script for Groovy script to trigger when configuration page exits.

For details about uploading and configuring Groovy scripts, read Upload a Groovy script.

If you can't find Groovy script to trigger when configuration page exits, follow these steps to add it to the list of scripts:

  1. From the application left navigation area, select Administration.
  2. From the top navigation bar, select Operation Settings.
  3. Select the System Settings tab.
  4. Under Load Schema, select Start.

Binding variables

In addition to the common binding variables, the following binding variables are available for this extension point.

Variable nameClassDescription
currentSalesItemNodeSalesItemNode Sales item node related to the configuration page that a user wants to close.
salesItemsTreeSalesItemsTree Represents the quote. Contains functions you can use to query and modify the quote and its line items.
preSubmitCheckEnginePreSubmitCheckEngine Represents the presubmit check engine that allows users to find matching classified products and replace a configurable product with them.

Expected output

Boolean value indicating whether a user can close the configurator page:

  • True—Configurator page can be closed.
  • False—Configurator page can't be closed.

Conditions to return the true or false value depend on the system usage. Examples of such conditions include the following:

  • All required fields on the configurator page are filled in.
  • Results of referencing a lookup table based on a specific data point in the quote.

Along with the expected output, you can also send warning messages to the UI. For example, in case of product replacement, you can write a script that will generate a warning if multiple matching products exist for the configurable product.

Script execution

The script uploaded for this extension point is run automatically when users make changes on the configurator page, such as:

  • Select another tab within the same configurable item
  • Select another line item or quote header
  • Select the back button to go to the line items table
  • Select another menu item
  • Reload the quote page
  • Select Save the quote in the configurator

These actions trigger the triggerGroovyScriptOnConfigurationExits API to execute the Groovy script.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.