Create KPI Definitions (Read, Calculated, or Editable)
Create KPI definitions, ensuring that each KPI is tailored to specific business needs and accurately reflects performance metrics.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled |
| User Permissions Needed | |
|---|---|
| To create a KPI definition: | CGCloud Business Admin |
- From the App Launcher, find and select KPI Definitions, and then click New.
- Select a record type.
- Enter a name and description for the KPI definition.
-
To define the levels that the KPI values are determined for, select a BOM scope.
- Product: To display KPIs for a product and the levels above.
- Header: To display KPIs for a header and the levels above.
- Component: To display KPIs for a BOM component and the levels above, including header level, measure level1, and product group level.
The BOM Scope field is shown only when you’re creating editable, calculated, read, editable calculated, and BOM Component Aggregation KPIs. Don’t select a combination that contains both Header and Component.If your KPI definition type is BOM Component Aggregation, make sure that you select Product.
-
To determine the level at which the KPIs values are calculated, select a time
granularity.
- Period: For the system to calculate the KPI by applying the formula to the weekly or monthly values of the referenced KPIs.
- Subperiod: For the system to calculate the KPI by applying the formula to the subweek or submonth values of the referenced KPIs.
- To define the purpose of the KPI, select an object scope.
-
To define the relevant period for KPI calculation, select a time scope.
- Complete: To calculate the KPI for the entire duration.
- Shipment: To calculate the KPI for the weeks that fall under the promotion or tactic shipment time frame. The option is available only when you select Promotion or Promotion Tactic as the object scope.
- Instore: To calculate the KPI for the weeks that fall under the promotion or tactic in-store time frame. This option is available only when you select Promotion or Promotion Tactic as the object scope.
- Order: To calculate the KPI for the weeks that fall under the promotion order time frame. This option is available only when you select Promotion as the object scope.
- Custom 1 and Custom 2: To calculate the KPI for the weeks custom time frame. This option is available only when you select Promotion or Promotion Tactic as the object scope of the KPI.
-
In the Aggregation Settings section, do these:
- To determine how the KPI is aggregated in the promotion P&L view, account plan, Volume Planning Card (VPC), and Spend Planning Card (SPC), select an aggregation rule.
- To determine how the KPI value is calculated for the Total column in the promotion P&L view and account plan, select a total calculation rule.
- For calculated KPI, select the appropriate Total Calculation Cumulative option to determine whether the KPI values are shown as cumulative values in account plan and promotion P&L.
- If View and Edit for Months and Quarters isn’t enabled for the sales organization, for Aggregation Time Rule, select whether the KPI is calculated based on a formula or aggregated.
- If View and Edit for Months and Quarters is enabled for the sales organization, for Merge rule, select the method used for merging subperiod values to weekly or monthly values.
-
Select the settings for rounding.
-
Select the rounding type.
You can see the Rounding within Period option if View and Edit for Months and Quarters is enabled for the sales organization.
-
Select the rounding order.
If you selected the rounding type as Rounding within Period, then select Sub Period then Period.
- Select a rounding precision and the number of decimal places that the user interface shows.
-
Select the rounding type.
-
In the Storage Options Settings section, do these:
- To save the KPI value in the database, select Writeback.
-
If you select Writeback, select the levels at which the records are written back to
the database.
Don’t select Measures for the KPIs that you intend to add to the account plan KPI sets. If you select Week Splits By Month as the subperiod, then select Product. Select BOM Component only if the BOM scope includes Component.
-
Enter a measure code to write back the KPI to the database.
The fourth character of Writeback Code can be # for a KPI with the object scope set to Claim Tactic. The system replaces this character by a C or O (indicating closed or open claims) during claim calculation.
- To show the KPI in promotion P&L, account plan, or Customer Business Plans (CBP), select Enabled.
-
If your KPI definition type is BOM Component Aggregation, in the BOM
Component KPI Definition field, look up and select the component KPI
definition that you want to aggregate the values from.
Note You can select only KPI definitions that have Component selected for their BOM Scope. Also make sure that KPI definition has the same object scope and time scope as this KPI definition. -
If you’re creating a read KPI, perform these steps:
- Select a data source table.
- Select a data source monthly table name.
- Enter a unique code to identify the KPI in database tables.
-
Select the aggregation mode.
For push promotions, select Custom. For all other promotions, select Standard.
-
To consider the product hierarchy for calculating KPIs in promotion P&L and
account plans, select Consider Product Hierarchy.
Select this option only for time-dependent KPIs with product reference for which the value type isn’t set to Money or Volume. If you select Consider Product Hierarchy, the system considers conditions defined and maintained at any level of the product hierarchy from bottom to top.
-
To anchor the loaded data to the planning account, select Consider Sub
Accounts.
When this option is selected, the loaded data is anchored to subaccounts. The system aggregates the data for all the included sub accounts of the anchor customer by using summation and uses this data in promotions. When this option isn’t selected, the loaded data is anchored only to the anchor account (customer). The system reads the data from the defined tables for the anchor customer and uses this data in promotions.
-
To consider an offset while fetching data from weekly and daily tables in the
database, enter a value in Week Offset.
The system fetches data from the database for the timeframe: Week – Week Offset * 7 days.
-
To consider an offset while fetching data from the database, enter a value for the
Year offset.
The system fetches data from the database for the timeframe: Week - Year Offset. For example, if the Year Offset is 1, then 1.4.2023 is mapped to 1.4.2022. For accurate results, we recommend configuring a maximum offset of two years.
For a KPI, you can use either a week offset or a year offset.
- To define the level that the KPI values are read from for a BOM component, select the BOM component source level.
-
If you’re creating a calculated KPI, specify the formula used for calculating the
KPI.
For example: <kpiname>$<levelinplanhierarchy>$cellintimehierarchy>.
-
If you’re creating an editable KPI, do these:
- Enter a unique code that’s used when saving the edit history.
-
To ensure that the total value of the KPI doesn’t change even when new products are
added, select Fixed Totals.
For compound KPIs, select this option only for the main KPI.
-
To enable editing only for totals, select Total. To edit
only periods, select Week. To edit both totals and periods,
select All.
If you select Fixed Totals, then select Total. Additionally, if the Fixed Totals option is selected for the main KPI of a compound KPI, then select Total as the edit mode of the main and child KPIs.
- In Editable Storage Level, select the level that the value entered manually for an editable KPI is stored at.
- To edit KPIs for past periods in a promotion P&L, VPC, SPC, or customer business plan, select Enable Past Weeks.
-
In the Distribution Setting section, do these:
-
Select the Distribution Type (Planning Hierarchy) for distributing the edited total
or weekly values of the KPI across the tactics, product groups, and products in
promotion P&L view, VPC, and SPC.
If you selected the Fixed Totals option for the KPI, then select only Metric or Equal.
- In Distribution (Planning Hierarchy), select the KPI that's used for distributing the edited values of a KPI if the hierarchy distribution type is set to Metric.
-
Select the Distribution Type (Time Hierarchy) for distributing the edited KPI
values across weeks in promotion P&L, VPC, and SPC.
If you selected the Fixed Totals option for the KPI, then select only Metric or Equal. Additionally, select WDSP only if you have enabled View and Edit for Months and Quarters in your sales organization.
- In Distribution (Time Hierarchy), select the KPI that's used for distributing the edited values of a KPI if the time distribution type is set to Metric.
- Select the distribution order.
- Select the Distribution Type (Customer Hierarchy) for distributing the edited KPI values in the parent promotion across customers.
-
Enter a distribution code to specify the measure code of the KPI that’s used for
distributing the edited KPI values of the parent promotion across the customer
hierarchy when the Distribution Type (Customer Hierarchy) is set to Metric.
Ensure that the KPI of the Distribution Code specified in this field is writeback-enabled.
-
Select the Distribution Type (Planning Hierarchy) for distributing the edited total
or weekly values of the KPI across the tactics, product groups, and products in
promotion P&L view, VPC, and SPC.
-
In the Reporting Setting section, do these:
- To indicate that the KPI is relevant for reporting, select Reporting Relevant.
-
To determine how the value is obtained for reporting purposes, select a reporting
type.
If you select the reporting type as Read, ensure that you select Writeback for the KPI.
-
Enter the JavaScript formula for determining the value of the KPI for reporting
purposes.
For a reporting KPI set, only Read KPIs that belong to the same KPI set can be used as input in the reporting formula of a KPI.
- Save your changes.
- Guidelines for Writing a Formula
A KPI definition’s formula, which is JavaScript, is validated to prevent the use of code that can impact the security and stability of the system. - Guidelines for Rounding Within Period Rounding Type
To make sure that you don’t lose the manually adjusted KPI for a product or a period, even when the manually entered values are rounded, use the rounding type Rounding Within Period. This rounding type adjusts the KPI values within the period that a manual input is added in, and therefore, the manually adjusted KPI values for other periods aren’t overridden. - Storage of Subperiod Values for Writeback KPIs
In your sales organization, if you enable Subperiod Writeback, a writeback KPI is stored based on the value of the subperiod field that you select for the KPI. For example, if you set the subperiod to Week Splits By Month, the system creates structures to support the calculation of weekly splits.
Did this article solve your issue?
Let us know so we can improve!

