Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to Admin panel > AMPI > Scores

  2. Add a new score, fill the following and save (Remember to trigger score recalculation in the scores list page after all scores have been created):

    1. `Name`, `Slug`, `Unit of measurement` (e.g. USD, kg, days), `Decimal places`, `Is currency` (if it is a currency value)

    2. `Type`: Numeric (for this example)

    3. `Schema`: Kpi

    4. `Script` structure of the returned result needs to follow:

      1. Code Block
        return {
        	result: {
        		techSlug: 'FDMfdm',
        		value: 100.20, 
        		percentage: 1,
        	},
        }

        the provided example script has hardcoded values for techSlug, value and percentage , whereas in real setups the value and percentage can come from other calculations based on other scores or helper functions

...