...
Go to Admin panel > AMPI > Scores
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):
`Name`, `Slug`, `Unit of measurement` (for non monetary values - e.g. USD, kg, days), `Decimal places`, `Is currency` (if it is a currency valuefor monetary values)
`Type`: Numeric (for this example)
KPI cards can also be used to highlight scores of Type: Text, in which case the configured Unit of measurement and decimal places are ignored
if type text is used the
value
property on the script needs to be of type string (e.g. value: 'a string')
`Schema`: Kpi
`Script` structure of the returned result needs to follow:
Code Block return { result: { techSlug: 'fdm', value: 100.20, percentage: 1, }, }
the provided example script has hardcoded values for
techSlug
,value
andpercentage
, whereas in real setups the value and percentage can come from other calculations based on other scores or helper functions
...