• 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

What is the project completeness?¶

Overview¶

In this reference guide you will learn what the project completeness refers to and how we manage it in Akeneo PIM. It will explain our technical and structure choices.

Goal¶

The Teamwork Assistant feature is about creating projects from a product selection that gives a vision on the enrichment progress to contributors (users in charge of the enrichment). Each project gives to the contributor their own completeness on the product selection, taking into account their permissions to edit or not product, attribute groups, locales and channels.

For example, if Bob can only edit the “Technical” attribute group of the “High-tech” category, he will see the project 100% complete if all attributes in the attribute group “Technical” of “High-tech” products in the project are filled in, even if other attribute groups are empty and required by the family. However, Julia, the owner of the project, will see that it is not complete if some attributes are not filled in in others attribute groups. The contributor sees the completeness of the project in terms of his own permissions, whereas the owner sees the completeness of all the project.

As every user will have his very own completeness depending on his permissions, we need to walk through every product to compute completeness for every user. As you can guess, it’s a really huge task that cannot be done synchronously.

One table to rule them all¶

From this introduction, let’s recap which data we need: - For each locale, - For each channel, - For each user, - Does the product - have at least an attribute filled in? - or is it complete?

Creating a table to gather all data we need to compute the completeness seems to be a good idea but we need some adjustments. It can’t be scalable if we do this for each user.

So let’s remove users from this table. And now, how can we retrieve the completeness for a user? In the project format, we have product filters. From those filters it’s easy to know which user is impacted by the product selection. To gain some time, we pre-calculate which user is impacted and we link them to project at its creation. But it’s not scalable either. If we add a user, its completeness could not be calculated because he is not linked to the project yet. The problem is resolved by linking user groups to project and not directly to users.

Some data are still missing. User groups permissions are not only about products but also about attribute groups.

Here is the final structure we needed (only data that are relevant for the demonstration are shown): - Pre-processing table:

  • For each locale,

  • For each channel,

  • Does the attribute group,

  • in the product,

  • have at least an attribute filled in?

  • or is it complete?

  • Project model:

    • locale

    • channel

    • product filters

    • products (*)

    • user groups (*)

(*) As these fields are only used for the completeness calculation purpose and they have no sense from a business point of view, they are not mapped to doctrine. The products field from project model is a n - n table that helps to join project to pre-processing. The user groups field from project model is a n - n table that helps to know who is impacted by the product selection. These tables are filled thanks to the calculation step.

By cross-checking pre-processing table, project table, category accesses table, attribute group accesses table we are able to calculate those three little numbers that are the number of products not started to enrich, in progress and done in terms of a user and a products selection.

In ORM, the process of joining Project to Category access works as follows:

project -> project_products -> product_category -> category -> category_access

Project Completeness Format¶

One normalized, the completeness looks like this:

array:7 => [
  "isComplete" => (bool),
  "productsCountTodo" => (int),
  "productsCountInProgress" => (int),
  "productsCountDone" => (int),
  "ratioTodo" => (int),
  "ratioInProgress" => (int),
  "ratioDone" => (int),
]

This is the end¶

The drawback of this method is that the completeness is not really up-to-date. For the moment, the pre-processing data are computed once you save a project, when you save a product concerned by a project from the Product Edit Form and the sequential edit. Moreover, a command php bin/console pimee:project:recalculate is provided to help you to recalculate data according to your needs.

The advantage is that the regularity of the pre-processing data updating can be adjusted as required with this command. Before using this you should have a look to the scalability guide.

According to our benchmark on a catalog with 3.6 millions of product values, pre-processing those data is feasible during the night for many projects as we don’t pre-process all the catalog but only products concerned by projects and products that has been updated.


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