Generate product identifiers

Summary

Generate product identifiers

Identifier Generator overview

The Identifier Generator in Akeneo PIM automates the generation of product identifiers during the creation of new products, root product models, or sub-product models. Instead of entering an identifier manually, you configure a generator that builds it from a configurable template combining static text, auto-incrementing numbers, and values derived from product attributes.

With the Identifier Generator, you can:

  • Define the structure of identifiers using different property types
  • Target specific products or product models, with conditions on family, categories, status, or attribute values
  • Manage custom abbreviations (nomenclature) for families, simple select attributes, and reference entity records

Before you start

Permissions

The Product Generators permission lives under the Generators section in Settings > Roles. Two levels are available: View lets a user see the list of generators and consult each one's settings, and Manage gives full rights to create, edit, and delete generators. By default, users have the View permission; an Administrator can grant Manage or remove access entirely.

 

Create a Product Identifier Generator

  1. Go to Settings > Generators and select the Product Generators tab.
  2. Click Create. If you don't see this tab or the Create button, check with your Administrator that you have the appropriate permissions.
  3. In the modal window, fill in a label and a code for the generator, then confirm to open the full editor, organized into three tabs: General Properties, Selection, and Structure.

Once you save a generator, it is active immediately: an identifier is generated automatically for every new product or product model matching the generator's selection, as long as no identifier is provided manually.

You can create several Product Generators to address different product selections, such as one for t-shirts and another for accessories. When several generators share the same selection, the first generator in the list generates the identifier for matching products.

 

General Properties tab

In the General Properties tab, you can view the generator code (read-only after creation), select the target for this generator (Products, Root product models, or Sub-product models), set the text transformation applied to the generated identifier, optionally enable Prevent manual entry so users cannot type the identifier by hand when it can be generated automatically, and add label translations for each of your UI locales.

  • No text transformation: the identifier is generated as-is (for example, Tshirt-AKN-001)
  • Uppercase: the identifier is fully uppercased (for example, TSHIRT-AKN-001)
  • Lowercase: the identifier is fully lowercased (for example, tshirt-akn-001)

The code for a product model is generated only at its creation, so it can never be empty afterward.

 

Selection tab

In the Selection tab, define the conditions that determine which products or product models use this generator: family, categories, status (enabled or disabled), and one or more options from simple select attributes.

Define the structure

In the Structure tab, create the template applied when generating an identifier. Add up to 20 properties, and reorder them by drag and drop. A live preview of the generated identifier is shown at the top of the tab, reflecting your current configuration and respecting the text transformation set in the General Properties tab.

Free text

A fixed value, such as your company name. A free text property cannot exceed 100 characters and cannot have leading or trailing spaces. You can add multiple free text properties.

Family

The product's family, using its full code, its first characters, or a custom nomenclature.

Simple select attribute

An option's full code, its first characters, or a custom nomenclature.

Reference entity attribute

The code of a linked record (full code, first characters, or nomenclature), or the full text of one of the record's text attributes.

Text attribute

The full text entered for the product.

Parent code

The full code or first characters of the direct parent, available for products and sub-product models.

Auto-number

A sequential number. A structure can only contain one auto-number property. An auto-number has three settings: Min digits sets the minimum length of the number and pads it with leading zeros when needed (up to 15 digits); Max digits sets the maximum length allowed, and the generator stops once that limit is reached (if you have configured multiple generators in a sequence, Akeneo automatically switches to the next one); Min number sets the number the sequence starts from. See Understand auto-number behavior below.

Delimiter

By default, no delimiter is added between properties. Choose a delimiter to separate the properties. Only one delimiter can be defined for the whole structure; to use several delimiters, add them as free text properties instead.

The structure of your identifier must match the constraints of your identifier attribute (number of characters, regex, etc.), or an identifier will not be generated.

 

Use a nomenclature

A nomenclature lets you define custom abbreviations for a family, a simple select attribute, or the code of a reference entity record. All abbreviations are shared across every Product Generator.

When adding a family or simple select attribute to your structure, select Use your own nomenclature as the format to start editing it. Choose the operator that triggers the generation of each abbreviation: Is equal to generates abbreviations of an exact number of characters, and codes or options with fewer characters are flagged as errors until corrected; Lower than or equals to accepts codes with fewer characters than the number you defined.

To start over, clear the Generate nomenclature automatically option and fill in the nomenclature manually, or change the property's format back to Use first characters or Use the entire code.

Understand auto-number behavior

If your identifier structure uses an auto-number, let the Identifier Generator create the identifiers for new products.

Importing new products with manually filled-in identifiers can stop your Identifier Generator from working correctly. If that happens, update the minimum auto-number in your generator's settings to the next number to be generated.

 

The generator always uses the number one higher than the absolute highest identifier ever generated or created. Deleting a product does not reset this sequence. For example, if "1000" was the highest identifier, deleting the product "1000" still results in the next generated identifier being "1001".

To completely reset the sequence, delete both the product and the identifier generator, then create a new generator.

When is my identifier generated

For products, the identifier is generated when a product is created or updated, whether through the user interface, an import, or the API, and only when the product does not already have an identifier. An identifier already assigned to a product is never modified or deleted.

For root and sub-product models, the code must already exist at creation and cannot be generated afterward. The code is only generated if all required conditions are met and every property in the structure is available; if a property needs to be filled in after the product model is created, the code cannot be generated from the user interface.

Existing products are not automatically assigned an identifier when you create a generator. To assign one to an existing product that matches your generator's settings, edit that product and save it.

Edit or delete a Product Identifier Generator

Modifying or deleting a generator has no impact on identifiers already generated: all existing product identifiers remain unchanged. Only products created or modified and saved after the change are affected.

  1. Go to Settings > Generators > Product Generators.
  2. Click the generator you want to change, or click Delete to remove it.
  3. Update the target, structure, delimiter, text transformation, or selection, then click Save.