Testing MLAC Service Predictions

After creating the basic business action as defined in the Business Action Configuration for MLAC topic (here), testing can be performed using the following methods:

  • via a business action to test unclassified products individually.
  • via a bulk update process to test a large number of products as a group.

For general information about editing and testing business actions, refer to the Editing a Business Rule or Function topic (here) and the Testing a Business Rule topic (here), both in the Business Rules documentation.

Important: The example scripts should not be used as-is without thorough testing, including updating the script to match object and link types that exist on your system. JavaScript variable names are case-sensitive.

Testing Products Individually

Use the following steps to modify your business action to test an individual product.

  1. Edit the MLAC predictions business action to include a Logger bind.
  2. In the JavaScript parameter, log the 'responseString'. For example:
logger.info(responseString);
  1. Test the business action against an unclassified product.

Testing Products in Groups

To test a set of unclassified products, the MLAC business action can first write the returned predictions to an attribute on the unclassified products. Then the MLAC business action can be executed from a bulk update process for a group of products.

For general information, refer to the Bulk Updates documentation here.

Use the following steps to modify your business action to test a group of products.

  1. Edit the MLAC predictions business action to write the predict response to a value. For example:
product.getValue('Prediction').setSimpleValue(responseString)
  1. Use Tree or Search to select the products to test via bulk update.
  2. Run the Bulk Update option for the selected products.
  3. Choose the ‘Run Business Rule’ bulk update operation from the dropdown.
  4. For the Business Rule Action parameter, select the MLAC predictions business action.

  1. Click the Finish button to run the bulk update process.