How to Generate SKUs for New or Existing Products Automatically?

Generating SKUs for New or Existing Products Automatically

Managing SKUs manually can be a time-consuming task, especially for store owners with large or growing inventories. The SKU Generator for WooCommerce plugin simplifies this process by automating SKU creation for new and existing products. Follow the step-by-step guide below to set up automatic SKU generation.

Step 1: Access the SKU Generator

  • Go to WooCommerce > SKU Generator in the WordPress dashboard.
  • Click on the Add New Rule button to create a custom rule for SKU generation.

Step 2: Provide Basic Rule Information

  • Add Title: Enter a unique title for the rule to easily identify it later (e.g., “Default SKU Rule for New Products”).

Step 3: Configure SKU Generation Options

Choose how SKUs will be generated by selecting one of the following options:

  • Replace SKUs: Check this option to replace existing SKUs for all future products automatically.
  • Additional SKUs: Check this option to add an extra SKU without removing the existing SKU for new products.
  • Products with No SKUs: Check this option to generate SKUs only for products that currently do not have SKUs assigned.

Step 4: Set a Custom SKU Format

  • Enter SKU Length: Specify the desired length for the SKU (e.g., 8 characters).
  • Product SKU Format: Use placeholders such as {prod_id}, {prod_slug}, {prod_name}, {cat_name}, {tag_name}, or {attr_name} to define the SKU structure.
    • Example: SKU-{prod_id}-{cat_name} might generate SKUs like SKU-12345-Shirts.
  • Variation SKU Format: Enable this option to generate SKUs for variable products using placeholders like {variation_name} and {variation_id}.
    • Example: VAR-{variation_id} might generate VAR-6789.
  • Add SKU as Variation ID or Name: Check the boxes to include the variation ID or name in the SKU if applicable.

Step 5: Apply Product Restrictions (Optional)

If you want to restrict SKU generation to specific products, categories, or attributes, follow these steps:

  • Apply on All Products: Enable this checkbox to generate SKUs for all products by default.
  • Select Categories: Choose specific categories where the rule will apply (e.g., “Clothing,” “Accessories”).
  • Select Tags: Select specific tags (e.g., “New Arrival,” “Sale”) for the SKU rule.
  • Select Attributes: Restrict SKU generation to products with specific attributes (e.g., “Color,” “Size”).