About Groovy
  • 12 Jun 2024
  • 1 Minute to read
  • Dark
    Light

About Groovy

  • Dark
    Light

Article summary

The Apache Groovy™ programming language offers a concise, familiar, and easy-to-learn syntax. It delivers a range of features, including scripting capabilities, to applications.

To get started with Apache Groovy, read the Groovy documentation .

Groovy in Zilliant CPQ

Zilliant CPQ supports scripting using the Apache Groovy language. Groovy scripts can be run automatically when a particular supported action is performed, such as when a user creates a quote or updates the value of a field.

Use Groovy scripts to apply custom business logic to standard application functionality that can't be achieved through configuration. Example scenarios include:

  • Integrating external systems for order creation, pricing, document storage, or approval through a business application programming interface (BAPI)
  • Implementing non-standard ERPs
  • Defining general application behavior, such as default values or copy behavior
  • Implementing functions on top of Google Maps API
  • Influencing pricing or availability of custom attribute values

Two general use cases apply to implementing scripts in the application:

  • Create custom functionality. You may want to perform some actions repeatedly and automatically to support your company's specific workflow. Use custom Groovy scripts to perform these actions.
  • Implement a custom feature. You can use a custom program to implement a feature unique to your company.

Groovy file naming conventions

By convention, a Groovy script can have any file extension. However, when used in the CPQ application, it must have a .groovy extension.

Because the script is compiled into a Java-compatible class at runtime, the filename should meet the criteria of a Java class. For more information about naming restrictions, read the Naming section in the Java Tutorials documentation .

Tools

You can use any text editor or IDE to develop a Groovy script. However, there is no support for any IDE that allows for automatic code completion for custom classes. If you plan to use cloud debugging, you must use an Eclipse IDE.

Tip

Zilliant recommends using VisualStudio to work with Groovy scripts.

API Documentation

Refer to Apache Groovy for general information and help writing Groovy scripts. For information about custom classes and available APIs, refer to the Zilliant Groovy API documentation on GitHub.

Learn more


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.