Platform for producers - Cheatsheet: Difference between revisions
(Created page with "Some details about the internals of the Producers Platform that can be of interest to admins and developers. = Introduction to the Producers Platform = On the Producers Plat...") |
No edit summary |
||
Line 29: | Line 29: | ||
=== GS1 GSDN imports === | === GS1 GSDN imports === | ||
==== Mapping of GS1 organization identifiers (GLN, Party Name) to OFF organizations ==== | |||
In GS1 data, organizations are identified with a GLN, that is associated to a "party name". | |||
GS1 product data often has organizations identified as the "brand owner" and/or as the "information provider". | |||
e.g. | |||
<pre> | |||
"brandOwner" : { | |||
"gln" : "3010836800139", | |||
"partyName" : "BONDUELLE SAS" | |||
}, | |||
"informationProviderOfTradeItem" : { | |||
"gln" : "3010836800139", | |||
"partyName" : "BONDUELLE EUROPE LONG LIFE" | |||
}, | |||
</pre> | |||
We currently use the informationProviderOfTradeItem if it is present and not empty. | |||
By default, we map the party name to create the OFF organization id. e.g. "BONDUELLE EUROPE LONG LIFE" becomes org-bonduelle-europe-long-life. | |||
In practice, some GS1 data may have different party names for the same GLN (e.g. the CodeOnline data above), and some big organizations have different GLNs for different lines of products. | |||
Admins of the producers platform can edit organization profiles to list the different GLNs that the organization should be associated with. | |||
==== Handling of conflicts ==== | |||
==== Equadis ==== | ==== Equadis ==== | ||
Line 36: | Line 64: | ||
== Exporting data and photos from the producers platform to the public database == | == Exporting data and photos from the producers platform to the public database == | ||
== Product owners == | === Data sources === | ||
Data sources are available in the product JSON and can be listed through the /data-sources facet. | |||
=== Product owners === | |||
Owners are available in the product JSON and can be listed through the /owners facet. | |||
In the public database, the owner field is imported from the producers platform only for organizations that correspond to producers. It is not kept when the owner is an user, or an organization that corresponds to a label or an external database (e.g. org-label-biopartenaire or org-database-usda). | |||
== Technical details == | == Technical details == |
Revision as of 16:29, 22 March 2021
Some details about the internals of the Producers Platform that can be of interest to admins and developers.
Introduction to the Producers Platform
On the Producers Platform, each food manufacturer can have its own mini Open Food Facts with only its products.
Producers can:
- import product data and photos in a variety of ways
- get reports on data quality and product quality (and even suggestions on how they could improve it)
- publish their product data and photos in the public Open Food Facts database
How it works
Organizations
Users on Open Food Facts can declare themselves as professional users representing a company or brand. They can associate their account with an organization (only one) by editing their profile (or when they create their account).
If the organization does not exist yet, it is created right away. Otherwise, an e-mail is sent to the producers platform admins, and admins can edit the user profile to add him/her to the organization.
There isn't currently a user management system to allow the creators of organization to manage users, review and accept requests by other users to join their organization, or invite other users.
Importing data and photos to the producers platform
Product edit form
Bulk images upload form
Spreadsheet file import form
GS1 GSDN imports
Mapping of GS1 organization identifiers (GLN, Party Name) to OFF organizations
In GS1 data, organizations are identified with a GLN, that is associated to a "party name".
GS1 product data often has organizations identified as the "brand owner" and/or as the "information provider".
e.g.
"brandOwner" : { "gln" : "3010836800139", "partyName" : "BONDUELLE SAS" }, "informationProviderOfTradeItem" : { "gln" : "3010836800139", "partyName" : "BONDUELLE EUROPE LONG LIFE" },
We currently use the informationProviderOfTradeItem if it is present and not empty.
By default, we map the party name to create the OFF organization id. e.g. "BONDUELLE EUROPE LONG LIFE" becomes org-bonduelle-europe-long-life.
In practice, some GS1 data may have different party names for the same GLN (e.g. the CodeOnline data above), and some big organizations have different GLNs for different lines of products.
Admins of the producers platform can edit organization profiles to list the different GLNs that the organization should be associated with.
Handling of conflicts
Equadis
CodeOnline (under development)
Exporting data and photos from the producers platform to the public database
Data sources
Data sources are available in the product JSON and can be listed through the /data-sources facet.
Product owners
Owners are available in the product JSON and can be listed through the /owners facet.
In the public database, the owner field is imported from the producers platform only for organizations that correspond to producers. It is not kept when the owner is an user, or an organization that corresponds to a label or an external database (e.g. org-label-biopartenaire or org-database-usda).
Technical details
The producers platform is a separate instance of Product Opener. It differs from the public instance in that products are always associated with 1 owner, which can be an organization or an user.
The owners thare users are only used in very rare instances, e.g. for users that need to import a lot of product photos that they took.
The owner id is of the form org-organization-id or user-user-id (e.g. org-nestle-france or user-stephane).
For each product, the owner id is stored in the "owner" field, and in the "owners_tags" array (with only one entry). The "owners_tags" field is used to make the /owners facet work without extra code (this may change in the future).
Each product is stored in /srv/off-pro/products/[owner-id]/ (instead of /srv/off/products/ on the public platform). Similarly, images are in /srv/off-pro/html/images/products/[owner-id]/.