Introduction
We oftentimes see SKUs imported into Onport suffixed with extra characters:
e.g. ORIGINALSKU-BLUE-LARGE
e.g. 38956849568489
e.g. ORIGINALSKU-6894556894546
In this article, we'll explain the logic behind SKU generation in Onport in order to troubleshoot this type of issue.
Disclaimer
In most cases, there is an existing variant with the same SKU that conflicts with it.
Deleting it first and then deleting the new variant will soon result in Onport reimporting the correct variant.
For further information on how to fix duplicate SKUs, please see this article.
Onport's SKU generation method
Onport implements a strategic method to generate or update SKUs based on several conditions during the import process from channels. Here’s a step-by-step on how the system handles SKUs:
- Check for Existing Link: Onport first checks if a variant from the channel (like Shopify) has already been linked to an Onport variant. If so, it simply updates the information.
- Verify Unique SKU: For a new imported variant, Onport searches the database to see if the SKU already exists. If the SKU is unique or linked to another product, a new variant needs to be created.
- Generate New SKU: The method for generating a new SKU depends on whether there are option values associated with the variant.
* With Option Values: Onport uses the provided option values to generate a slug that will be appended to the original SKU, creating a unique identifier, for example: AM5FIG-BLUE-XS
* Without Option Values: If no option values are available, Onport uses the external ID from the channel variant to create a new SKU by appending it to the original SKU, for example: 4568964845698 - Verify Uniqueness Again: Onport checks if the newly created SKU is already in use. If it is, an adjustment is made by adding the external channel ID to the new SKU to ensure uniqueness.
- Create Variant: If the SKU is confirmed to be unique, Onport proceeds to create a new variant with the new SKU.
- Handle Inventory Adjustment: If a variant is successfully created, an inventory adjustment may occur based on the variant’s inventory quantity.
Throughout this process, Onport ensures that each variant's SKU remains unique, which is essential for accurate tracking and management of products.
Below is a flowchart explaining the logic of SKU generation:
Comments
0 comments
Please sign in to leave a comment.