Skip to content

Helping your users get the Green-Score for any product#

  • If you can't get the information on a specific product, you can get your user to send photos and data.
  • That will then be processed by Open Food Facts to get the computed result you want to show them.
  • You can implement the complete flow so that they get immediately the result with some effort on their side.
  • That will ensure user satisfaction
  • Please refer to the product addition tutorial for the technical way to do the required operations (such as category input), and to the high level workflow below for all the cases you have to handle.

Table of contents#

  • Getting your app ready for the Green-Score
  • Implementing the basic display of the score
  • Displaying the Green-Score outside France
  • Ensuring a good user experience (even with data gaps)
  • Adding disclaimers when we can't display the Green-Score
  • Adding disclaimers when the Green-Score is computed with a data gap + Asking the users to photograph and/or complete missing information
  • Adding value by explaining
  • Knowledge panels API
  • Onboarding producers you know

Implementing the basic display of the score#

Preferred method : Using the Knowledge Panels API#

  • With Knowledge panels, you just have to implement a for-loop in your app. Translations, updates, and all the complexity will be handled
  • The Open Food Facts official app uses this one, which is less initial work, and less maintenance work.

Using the Raw API#

Displaying the Green-Score outside France#

  • You need to ensure the country your users are in: * Asking them explicitly at startup, and storing the value * Geofencing your app to just one country * Using the phones or the IP address (using eg GeoIP) to infer a country
  • You need to serve the matching Green-Score value * You can ask for a country specific Green-Score
  • If your users are outside France, you need to clearly display the experimental disclaimer at least once.

Ensuring a good user experience (even with data gaps)#

We can compute the Green-Score for most of the database, but we’re missing some data on some products to make the computation exact, and it won’t be computed on some products. In any case, you need to make sure your users won’t be frustrated by implementing the following points:

Adding value by explaining#

  • Explanation of Green-Score computations using Knowledge panels: You can implement the Knowledge panels API that displays additional information with a minimum of coding (you can filter on Environment Knowledge Panels only if you wish)
  • A Flutter implementation is available, and you are very welcome to contribute implementation in one of our existing SDKs (or create your own)

If you have relationships or connexions with food producers#

  • Onboarding producers you know to the Green-Score and the Open Food Facts Platform for Producers (Free)
  • You can ask any producer you know to get in touch with us at producers@openfoodfacts.org so that their products are Green-Score ready in terms of data (we have easy ways to import their data using the Producer Platform: https://world.pro.openfoodfacts.org/ )