Skip to content

Get the ecoscore

Helping your users get the Eco-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 Eco-Score
  • Implementing the basic display of the score
  • Displaying the Eco-Score outside France
  • Ensuring a good user experience (even with data gaps)
  • Adding disclaimers when we can't display the Eco-Score
  • Adding disclaimers when the Eco-Score is computed with a data gap + Asking the users to photograph and/or complete missing information
  • Adding value by explaining
  • Product Attributes
  • Additional ways to get ready
  • Onboarding producers you know

Implementing the basic display of the score#

Preferred method : Knowledge panels#

  • With Knowledge panels, you just have to implement a for-loop in your app. Translations, updates, and all the complexity will be handled

Using the Raw API#

Using the Attributes API#

The Open Food Facts official app use this one, which is less work but also less flexible (will display other data as well).

Displaying the Eco-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 Eco-Score value * You can ask for a country specific Eco-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 Eco-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#

Additional ways to get ready#