• v5.0
    • Versions
    • master

 

  • Install Akeneo PIM
    • Install Akeneo PIM for development with Docker
    • Install Akeneo PIM manually
      • System Requirements
      • System installation on Debian 10 (Buster)
      • System installation on Ubuntu 18.04 (Bionic Beaver)
      • System installation on Ubuntu 20.04 (Focal Fossa)
      • Installing Akeneo PIM Community Edition (CE)
      • Installing Akeneo PIM Enterprise Edition (EE) with the Archive
      • Setting up the job queue daemon
      • Setting up the Events API
    • How to customize the Dataset
    • How to Add Translation Packs
  • Upgrade Akeneo PIM projects
    • How to apply a patch?
      • How to apply a patch - Community Edition
      • How to apply a patch - Enterprise Edition - Flexibility Cloud offer
      • How to apply a patch - Enterprise Edition - On Premise offer
    • Where is the Changelog?
    • How to upgrade to a minor version?
    • How to upgrade to a major version?
      • Upgrade from 3.2 to 4.0
      • Upgrade from 4.0 to 5.0
  • Import and Export data
    • How import works
    • Understanding the Product Import
    • Understanding the Product Export
    • Formats
      • Localized labels
      • Scopable labels
      • Association types data structure
      • Attribute data structure
      • Category data structure
      • Family data structure
      • Family variant data structure
      • Group data structure
      • Options data structure
      • Product data structure
      • Product model data structure
    • Akeneo Connectors
    • How to Customize Import / Export
      • How to create a new Connector
      • How to import Products from a XML file
      • How to clean a CSV file during a Product import
      • How to automate imports/exports
  • Manipulate the Akeneo PIM data
    • How to Customize Mass Edit Operations
      • How to register a new bulk action
      • How to Register a New Mass Edit Action on Products
    • How to Manipulate Products
      • How to Query Products
      • How to Create Products
      • How to Update Products
      • How to Validate Products
      • How to Save Products
      • How to Remove Products
    • How to Manipulate Non-Product Objects
      • How to Query Non-Product Objects
      • How to Create Non-Product Objects
      • How to Update Non-Product Objects
      • How to Validate Non-Product Objects
      • How to Save Non-Product Objects
      • How to Remove Non-Product Objects
    • How to add a custom action rule
      • General information about rule format
      • How to add a custom action in the rule engine
    • How to Define Access Control List
    • How to Customize the Catalog Structure
      • How to Create a Reference Data
    • How To Customize Teamwork Assistant (Enterprise Edition)
      • Customize notifications
      • Add a calculation step
      • How to log calculation step
      • Remove projects impacted by a custom catalog update
    • How to store assets externally
    • How to Configure Measurement Limits
  • Maintain Akeneo PIM projects
    • First aid kit
    • Bug qualification
    • Common issues
    • Scalability Guide
      • Audit with 3 Representative Catalogs
      • More than 10k attributes?
      • More than 10k families?
      • More than 10k categories?
      • More than 500 attributes usable in the product grids?
      • More than 100k products to export?
      • More than 1GB of product media to export?
    • How to purge history
      • How to Purge jobs executions
      • How to adapt the version purger to your needs
  • Contribute to Akeneo PIM
    • How to report an issue?
    • How to translate the user interface?
    • How to enhance the documentation?
    • How to contribute to a Connector?
    • How to submit a patch to the PIM?
    • How to contribute to the frontend part of the application
    • How behavior tests are architectured in the PIM?
      • Establishing Decorator Pattern
      • Using Spin In Behat
  • Use SSO authentication locally
  • Reference Entities
    • Configure Entity Limits
    • Create a new Reference Entity Attribute type
    • Enrich Records with a new Reference Entity Attribute type
    • Add a Custom Property to Your Custom Attribute Type
    • Refresh records completeness
  • Troubleshooting guide
  • Technical overview
    • Product Information
    • Teamwork Assistant (Enterprise Edition)
      • Project creation
      • Project completeness
      • Project Completeness widget
      • Catalog update impact
      • Scalability guide
      • Users permission summary for Behat tests
    • Collaborative workflow
      • Simple workflow
      • Partial workflow
  • Technical architecture
    • Best Practices
      • Create a project
      • Create a reusable bundle
      • Code Conventions
      • Coding Standards
    • How to implement your business logic using the event system
    • Events
      • Storage events
      • Workflow events (Enterprise Edition only)
    • How to Localize your data
      • How to change the PIM locale
      • How to Use Localizers
      • How to use Presenters
    • How to Add a Notification
    • Performances Guide
      • Memory usage of rules execution (Enterprise Edition)
      • Memory leak fix in Rules Engine (ORM)
      • More than 100 WYSIWYG editors in a page
      • PHP7 and HHVM Compatibility?
      • Job product batch size
    • How to Use the Web REST API
    • Standard format
      • Products
      • Other entities
      • Usage
    • Application Technical Information
      • Application Technical Dependencies
      • Server side set up for hosting
      • System Requirements
      • Recommended configuration
      • Client side configuration and compatibilities
      • Operation processes
      • Flow Matrix
  • Akeneo Cloud Edition
    • Flexibility
      • Environment accesses
      • System Administration & Services Management
      • Periodic tasks & Crontab configuration
      • Composer settings
      • Queue Management & Workers
      • Disk Usage Management
    • Serenity
  • Akeneo Onboarder
    • Prerequisites
    • How to install the Onboarder bundle
    • Synchronization
    • How to update a minor version or to apply a patch
      • How to update the Onboarder bundle - Enterprise Edition - Flexibility Cloud offer
      • How to update the Onboarder bundle - Enterprise Edition - On Premise offer
    • How to upgrade to a major version
    • Troubleshooting
    • How to uninstall the Onboarder bundle
    • Environment variables
      • Using the DotEnv file
      • Using environment variables

Products¶

Common structure¶

Product contain inner fields and product values that are linked to attributes. All products have the same fields (identifier, label, family, groups, variant groups, categories, associations, status, dates of creation and update) while product values are flexible among products.

Let’s consider a bar product, without any product value, except its identifier sku. This product also contains:

  • an identifier

  • a family

  • several groups

  • a variant group

  • several categories

  • several associations related to groups, products and/or product models

  • several quantified associations related to products and/or product models

Its standard format would be the following:

array:10 [
  "identifier" => "bar"
  "family" => "familyA"
  "groups" => array:2 [
    0 => "groupA"
    1 => "groupB"
  ]
  "categories" => array:2 [
    0 => "categoryA"
    1 => "categoryB"
  ]
  "enabled" => false
  "values" => array:1 [
    "sku" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "bar"
      ]
    ]
  ]
  "created" => "2016-06-23T11:24:44+02:00"
  "updated" => "2016-06-23T11:24:44+02:00"
  "associations" => array:3 [
    "PACK" => array:3 [
      "groups" => array:0 []
      "products" => array:2 [
        0 => "foo"
        1 => "baz"
      ]
      "product_models" => array:0 []
    ]
    "UPSELL" => array:3 [
      "groups" => array:1 [
        0 => "groupA"
      ]
      "product_models" => array:0 []
      "products" => array:0 []
    ]
    "X_SELL" => array:3 [
      "groups" => array:1 [
        0 => "groupB"
      ]
      "product_models" => array:1 [
        0 => "productModelA"
      ]
      "products" => array:1 [
        0 => "foo"
      ]
    ]
  ]
  "quantified_associations" => array:1 [
    "PRODUCT_SET" => array:2 [
      "products" => array:1 [
        0 => array:2 [
          "identifier" => "productA"
          "quantity" => 3
        ]
      ]
      "product_models" => array:1 [
        0 => array:2 [
          "identifier" => "productModelA"
          "quantity" => 3
        ]
      ]
    ]
  ]
]

type

data structure

data example

notes

identifier

string

"bar"

it’s the identifier of the product

family

string

"familyA"

it represents the code of the
Akeneo\Pim\Structure\Component\Model\FamilyInterface

groups

array

[0 => "groupA", 1 => "groupB"]

it represents the code of the
Akeneo\Pim\Enrichment\Component\Category\Model\GroupInterface

variant_group

string

"variantA"

it represents the code of the
Akeneo\Pim\Enrichment\Component\Category\Model\GroupInterface

categories

array

[0 => "categoryA", 1 => "categoryB"]

it represents the code of the object
Akeneo\Tool\Component\Classification\Model\CategoryInterface

enabled

boolean

true

values

array

see below

created

string

"2016-06-13T00:00:00+02:00"

formatted to ISO-8601 (see above)

updated

array

"2016-06-13T00:00:00+02:00"

formatted to ISO-8601 (see above)

associations

array

["X_SELL" => ["groups" => [0 => "groupA"],"products" => [0 => "foo"],"product_models" => [0 => "productModelA"]]]

see below

quantified_associations

array

["PRODUCT_SET" => ["products" => [["identifier" => "productA", "quantity"=> 1]],"product_models" => [["identifier" => "productModelA", "quantity"=> 1]]]

see below

Associations¶

The structure of the array is composed as below:

"associations" => array:1 [
  "X_SELL" => array:3 [
    "groups" => array:1 [
      0 => "groupB"
    ]
    "product_models" => array:0 []
    "products" => array:1 [
      0 => "foo"
    ]
  ]
]

“X_SELL” represents the code of the Akeneo\Pim\Structure\Component\Model\AssociationTypeInterface.

Each element in the array “groups” represents the code of the Akeneo\Pim\Enrichment\Component\Category\Model\GroupInterface.

Each element in the array “products” represents the identifier of the Akeneo\Pim\Enrichment\Component\Product\Model\ProductInterface.

Each element in the array “product_models” represents the code of the Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface.

Quantified associations¶

"quantified_associations" => array:1 [
  "PRODUCT_SET" => array:2 [
    "products" => array:1 [
      0 => array:2 [
        "identifier" => "productA"
        "quantity" => 3
      ]
    ]
    "product_models" => array:1 [
      0 => array:2 [
        "identifier" => "productModelA"
        "quantity" => 2
      ]
    ]
  ]
]

“PRODUCT_SET” represents the code of the Akeneo\Pim\Structure\Component\Model\AssociationTypeInterface.

Each identifier in the array “products” represents the identifier of the Akeneo\Pim\Enrichment\Component\Product\Model\ProductInterface.

Each identifier in the array “product_models” represents the code of the Akeneo\Pim\Enrichment\Component\Product\Model\ProductModelInterface.

Product values¶

Let’s now consider a catalog with all attribute types possible and a foo product, that contains:

  • all the attributes of the catalog

  • an identifier

  • a family

  • several groups

  • several categories

  • several associations related to groups, products and/or product models

  • several quantified associations related to products and/or product models

Its standard format would be the following:

array:10 [
  "identifier" => "foo"
  "family" => "familyA"
  "groups" => array:2 [
    0 => "groupA"
    1 => "groupB"
  ]
  "categories" => array:2 [
    0 => "categoryA1"
    1 => "categoryB"
  ]
  "enabled" => true
  "values" => array:19 [
    "sku" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "foo"
      ]
    ]
    "a_file" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "f/2/e/6/f2e6674e076ad6fafa12012e8fd026acdc70f814_fileA.txt"
      ]
    ]
    "an_image" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "f/4/d/1/f4d12ffbdbe628ba8e0b932c27f425130cc23535_imageA.jpg"
      ]
    ]
    "a_date" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "2016-06-13T00:00:00+02:00"
      ]
    ]
    "a_multi_select" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          0 => "optionA"
          1 => "optionB"
        ]
      ]
    ]
    "a_number_float" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "12.5678"
      ]
    ]
    "a_number_float_negative" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "-99.8732"
      ]
    ]
    "a_number_integer" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => 42
      ]
    ]
    "a_number_integer_negative" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => -5
      ]
    ]
    "a_ref_data_multi_select" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          0 => "fabricA"
          1 => "fabricB"
        ]
      ]
    ]
    "a_ref_data_simple_select" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "colorB"
      ]
    ]
    "a_simple_select" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "optionB"
      ]
    ]
    "a_text" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "this is a text"
      ]
    ]
    "a_text_area" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => "this is a very very very very very long text"
      ]
    ]
    "a_yes_no" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => true
      ]
    ]
    "a_localizable_image" => array:2 [
      0 => array:3 [
        "locale" => "en_US"
        "scope" => null
        "data" => "2/b/6/b/2b6b451334ee1a9aa83b5755590dae72ba254d8b_imageB_en_US.jpg"
      ]
      1 => array:3 [
        "locale" => "fr_FR"
        "scope" => null
        "data" => "d/e/3/f/de3f2a0af94d8b10ccc2c37bf4f945fd262d568e_imageB_fr_FR.jpg"
      ]
    ]
    "a_localized_and_scopable_text_area" => array:3 [
      0 => array:3 [
        "locale" => "en_US"
        "scope" => "ecommerce"
        "data" => "a text area for ecommerce in English"
      ]
      1 => array:3 [
        "locale" => "en_US"
        "scope" => "tablet"
        "data" => "a text area for tablets in English"
      ]
      2 => array:3 [
        "locale" => "fr_FR"
        "scope" => "tablet"
        "data" => "une zone de texte pour les tablettes en français"
      ]
    ]
    "a_metric" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          "amount" => "987654321987.123456789123"
          "unit" => "KILOWATT"
        ]
      ]
    ]
    "a_metric_without_decimal" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          "amount" => 200
          "unit" => "GRAM"
        ]
      ]
    ]
    "a_metric_negative" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          "amount" => "-20.000000000000"
          "unit" => "CELSIUS"
        ]
      ]
    ]
    "a_metric_negative_without_decimal" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          "amount" => -100
          "unit" => "CELSIUS"
        ]
      ]
    ]
    "a_price" => array:1 [
      0 => array:3 [
        "locale" => null
        "scope" => null
        "data" => array:2 [
          0 => array:2 [
            "amount" => "45.00"
            "currency" => "USD"
          ]
          1 => array:2 [
            "amount" => "-56.53"
            "currency" => "EUR"
          ]
        ]
      ]
    ]
    "a_scopable_price_without_decimal" => array:2 [
      0 => array:3 [
        "locale" => null
        "scope" => "ecommerce"
        "data" => array:2 [
          0 => array:2 [
            "amount" => 15
            "currency" => "EUR"
          ]
          1 => array:2 [
            "amount" => -20
            "currency" => "USD"
          ]
        ]
      ]
      1 => array:3 [
        "locale" => null
        "scope" => "tablet"
        "data" => array:2 [
          0 => array:2 [
            "amount" => 17
            "currency" => "EUR"
          ]
          1 => array:2 [
            "amount" => 24
            "currency" => "USD"
          ]
        ]
      ]
    ]
  ]
  "created" => "2016-06-23T11:24:44+02:00"
  "updated" => "2016-06-23T11:24:44+02:00"
  "associations" => array:3 [
    "PACK" => array:3 [
      "groups" => array:0 []
      "products" => array:2 [
        0 => "bar"
        1 => "baz"
      ]
      "product_models" => array:0 []
    ]
    "UPSELL" => array:3 [
      "groups" => array:1 [
        0 => "groupA"
      ]
      "products" => array:0 []
      "product_models" => array:1 [
        0 => "productModelA"
      ]
    ]
    "X_SELL" => array:3 [
      "groups" => array:1 [
        0 => "groupB"
      ]
      "products" => array:1 [
        0 => "bar"
      ]
      "product_models" => array:1 [
        0 => "productModelA"
      ]
    ]
  ]
  "quantified_associations" => array:1 [
    "PRODUCT_SET" => array:2 [
      "products" => array:2 [
        0 => array:2 [
          "identifier" => "productA"
          "quantity" => 3
        ]
        1 => array:2 [
          "identifier" => "productB"
          "quantity" => 1
        ]
      ]
      "product_models" => array:2 [
        0 => array:2 [
          "identifier" => "productModelA"
          "quantity" => 2
        ]
        1 => array:2 [
          "identifier" => "productModelB"
          "quantity" => 4
        ]
      ]
    ]
  ]
]

The product values are provided via the key values.

Product values can be localizable and/or scopable:

  • localizable means its value depends on the locale

  • scopable means its value depends on the scope (also called channel)

  • localizable and scopable means its value depends on the locale and the scope (also called channel)

That’s why product values always respect the following structure:

array:3 [
  "locale" => "a locale code"
  "scope" => "a scope code"
  "data" => "the value for the given locale and scope"
]

And that’s why, for the same attribute, you can have multiple product values:

"a_localizable_attribute" => array:2 [
  0 => array:3 [
    "locale" => "en_US"
    "scope" => null
    "data" => "the data in English"
  ]
  1 => array:3 [
    "locale" => "fr_FR"
    "scope" => null
    "data" => "la donnée en français"
  ]
]

Depending on the type of the product value, the data key can have different structure:

attribute type

data structure

data example

notes

identifier

string

"foo"

file

string

"f/2/e/6/f2e6674e076ad6fafa12012e8fd026acdc70f814_fileA.txt"

it represents the key of the object
Akeneo\Tool\Component\FileStorage\Model\FileInfoInterface

image

string

"f/4/d/1/f4d12ffbdbe628ba8e0b932c27f425130cc23535_imageA.jpg"

it represents the key of the object
Akeneo\Tool\Component\FileStorage\Model\FileInfoInterface

date

string

"2016-06-13T00:00:00+02:00"

formatted to ISO-8601 (see above)

multi select

string[]

[0 => "optionA", 1 => "optionB"]

each element of the array represents the code of the
Akeneo\Pim\Structure\Component\Model\AttributeOptionInterface

number

string

"-99.8732"

formatted as a string to avoid the floating point precision
problem of PHP (see above)

reference data multi select

string[]

[0 => "fabricA",1 => "fabricB"]

each element of the array represents the code of the
Akeneo\Pim\Enrichment\Component\Product\Model\ReferenceDataInterface

simple select

string

"optionB"

it represents the code of the
Akeneo\Pim\Structure\Component\Model\AttributeOptionInterface

reference data simple select

string

"colorB"

it represents the code of the
Akeneo\Pim\Enrichment\Component\Product\Model\ReferenceDataInterface

text

string

"this is a text"

text area

string

"this is a very very very very very long text"

yes/no

boolean

true

metric

array

["amount" => "987654321987.123456789123","unit" => "KILOWATT"]

amount and unit keys are expected unit should be a known unit
depending of the metric family of the attribute

price collection

array

[0 => ["amount" => "45.00","currency" => "USD"], 1 => ["amount" => "56.53","currency" => "EUR"] ]

amount and currency keys are expected for each price
currency should be a known currency

The following product values data, that represents decimal values are represented with strings (when the decimal_allowed attribute property is set to false) in the standard format:

  • metric (class AkeneoPimEnrichmentComponentProductModelMetric)

  • price (class AkeneoPimEnrichmentComponentProductModelProductPriceInterface)

  • number (class AkeneoPimEnrichmentComponentProductModelProductValueInterface, property getDecimal)

When the decimal_allowed attribute property is set to true, they are represented with integers in the standard format.


Found a typo or a hole in the documentation and feel like contributing?
Join us on Github!