Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Custom KPI cards can be configured and enabled via the admin panel starting with version 23.8.

[Image of custom KPI card showing example values]

Configuring a custom KPI score

[Image of score setup]

KPI cards can be used to highlight the result of a single score on the part detail page in AMPI. In order to do so:

  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

    3. `Schema`: Kpi

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

      1. return {
        	result: {
        		techSlug: 'FDM',
        		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

Configuring a custom KPI card

[Image of report chart setup]

After configuration of the desired score, a report chart of type KPI needs to be created to bundle the score results into a KPI card. To do so:

  1. Go to Admin panel > AMPI > Report Charts

  2. Add a new chart, fill the following and save:

    1. `Name`, `Description`, `Sort priority`

    2. Make sure to check `Is enabled` and do not select anything in `Report`

    3. `Type`: KPI

    4. Under `REPORT CHART SCORES`, select only 1 score, following the setup and result structure described above

Attribute

Function

Name

Will be displayed as KPI card header

Description

Will be shown as help text upon hover

Sort priority

Defines order of KPI cards, lower numbers get sorted first

Is enabled

Shows/Hides individual KPI card

  • No labels