Manual Export of Classified Products for MLAC

Products that are already classified in STEP can be handled by the MLAC service via an exported Excel or CSV file. While data for a hierarchy must be submitted in a single file (as defined in the Manual Export of Hierarchies for MLAC topic here), data for products that are already classified can be submitted in one or multiple Excel or CSV files. Each file should contain hierarchy information for all hierarchies for which predictions should be generated.

File Requirements

As outlined in the Map Data steps below, the export file must have the following headers / columns in the specified order. For Excel, no quotes should be included in the header values.  

For the primary product hierarchy case, if there are intermediate hierarchy levels between the product and the classification / hierarchy node (for example, a product family level), a calculated attribute can be used to output the appropriate hierarchy node ID for this column.

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.

The example below shows a function that will output either the ID of the parent or ID of the grandparent, based on whether the parent is of a specific object type.

{
  i:=path(), 
  parent:=listitem(i,listlen(i)-1),
  grandparent:=listitem(i,listlen(i)-2),
  parentobjecttype:=iterate(parent, 'stepobjecttype()') 
} if (exact(parentobjecttype, "Sales Item Family"), iterate(grandparent, 'stepid()'), iterate(parent, 'stepid()'))

In this example, 'stepobjecttype()' returns the object type name and not the ID. Thus, on systems with dimension dependent object type names, consider the object type for the Context of the export when making the comparison on the name.

Export Classified Products

Exporting classified products involves the following steps:

  1. In workbench on the Tree tab, select an appropriate root node for the export, right-click and select the 'Export Data Below' option to display the Export Manager with the selected objects.

  1. On the 'Select Objects' step:

  1. Click the Next button, and on the 'Select Format' step, choose one of the following file formats from the dropdown:

Note: See the File Requirements section above for definitions of the mapping elements below.

  1. Click the Next button to display the 'Map Data' step.
  2. Map the <ID> data source.

  1. Map the Select Attribute data source and choose the attribute that holds the description.

  1. Choose a method to handle the source ID with significance for the classification:

The final Header and Value mapping should match the image below.

  1. Choose a method to map a column for each hierarchy, in each instance replace the header with the hierarchy ID:

For example, in the screenshot below, two hierarchy columns have been mapped. One by mapping a calculated attribute, and one by mapping a link type.

  1. Click the Next button to display the 'Advanced' step.

  1. Click the Next button to display the 'Select Delivery Method' step and click the Finish button.
  2. On the 'Save Export Configuration' dialog, optionally save the configuration. For more information, see the Running a Data Export topic in the Data Exchange documentation here.
  3. Click the OK button to start the Export Manager Pipeline background process. For more information, see Monitoring a Data Export topic in the Data Exchange documentation here.

Output Examples

The generated file should look similar to the examples below. The number of hierarchy columns depends on the use case.

Excel

CSV