Script API

The Script API is similar to Java™ API. Script API operations extend the basic function of IBM® Product Master.

Important: New product functions might have programming interface that might no longer support scripting APIs. Hence, ensure that you move from scripting APIs to Java APIs.

With script operations you can clean, transform, validate, and calculate information to align with business rules and processes. This information can then be imported and exported to virtually any file standard and custom file format or used to complete mass updates to a catalog of information.

Product Master provides a library of scripting operations that you can view in the script sandbox. The script operations can be run either in the script sandbox or in a command line.

To access the script sandbox, click Data Model Manager > Scripting > Script Sandbox.

To use the command line, use the following command.
$JAVA_RT com.ibm.ccd.common.interpreter.test.TestScript -scriptpath=your_script_path -companycode=your_company_name

Script operations use the following prototype definition:

Return type - Object - Method - (Parameters)

The Script sandbox has an Expression Builder that has following fields:
Script Constants
The script constants are predefined by Product Master. They are true, false, " ", and null.
Script Implicit Variables
The script implicit variables are predefined by Product Master in some contexts. They are item, err, var, res, category, and feed_doc_path.
Script Operations
There are more than 1000 script operations.
Script Operators
The following script operators are supported:
+, -, *, /, ==, !=, <, <=>, >=, &&, ||, !