Generating Stock Keeping Unit (SKU)

Any product that has multiple variations is often represented by a base product number that is common to all the variations defined by specific SKUs.

Before you begin

  1. Create a Lookup Table with name SKU Generation Config Lookup and following details.
    Field Description
    Catalog The name of the catalog, for example "Product Offerings".
    Attribute The full path of the comma-separated attribute list on which SKU needs to be generated, for example "Product Specification/Colors, Product Specification/Features".
    Product Category The full path of the category for an item including hierarchy, for example "Hierarchy/Electronics/Mobile and Smartphones/Apple".
    Sku Category The full path of the category for SKUs including hierarchy, for example "Hierarchy/SKU".
  2. In the Primary or Secondary spec of an item, create attribute Parent Product of type relationship.
  3. Create a category in which Variants need to be mapped and specify same in the Sku Category in the Lookup Table.
  4. Create a new workflow for SKU generation.
  5. Create a Sku Generation step in the new workflow.
    Sku Generation step - Launches a class file which creates variation for the products based on the attributes that are specified in the Lookup Table and maps them to the SKU category.
  6. In the workflow step, select Allow Re-categorization to enable the categorization of product.
  7. Add the SKUExplosion-ext.jar to the class path for the workflow extensions.
  8. Add the following path in the Sku Generation workflow:
    //script_execution_mode=java_api="japi://com.ibm.sku.extensions.workflow.SKUExplosion.class"
    You can also import the class files from the com.ibm.mdm.extensions.sku.zip using the Docstore custom tools and then update the class path for the Sku Generation workflow:
    //script_execution_mode=java_api="japi://uploaded_java_classes:com.ibm.sku.extensions.workflow.SKUExplosion.class"
Note: For generating SKU, the Lookup table supports only two attributes of String type.

About this task

In IBM® Product Master, SKU generator is used to create an array of SKUs for a product automatically. Once you define the product and the SKU category, run the SKU generator to automatically build all the SKU products.

Procedure

  1. Create a new collaboration area with the catalog and workflow that is created for SKU generation.
  2. Check out an item from the catalog into the collaboration area.
  3. Add values to the attributes specified in the Lookup Table on which the Variant needs to be generated.
  4. Click Exit in the workflow step.

Results

After successful completion of workflow, Variants are generated and mapped to the SKU category.

What to do next

Right-click com.ibm.mdm.extensions.sku.zip, and select Save Target As to download the sample SKU code to your computer.