Newer Version Available
TPM Account Plan LWC Reference
Properties
account-plan-id: Id. Required. The ID of the account plan record to load.
Namespace
Events
Here’s the event payload structure.
onstatuschange
This event is triggered when the lifecycle state of the TPM account plan component changes. Status changes are triggered by lifecycle operations on the account plan record.
The possible values are:
- LOADING: The account plan is being loaded.
- VALID: The account plan is loaded and can be interacted with.
- SAVING: The account plan is being saved to the database.
- ERROR: An irrecoverable error has occurred.
oncalculationstatuschange
This event is triggered when the account plan grids are calculated or recalculated.
The possible values are:
- LOADING: The calculations are being processed, or the engine is loading.
- VALID: The calculations are completed, and values can be requested.
- ERROR: An irrecoverable error has occurred.
- DISABLED: The calculations engine is disabled for the account plan.
oncategoryfilterchange
This event is triggered when the account plan’s selected product category filter changes. The event contains the selected category product ID.
onkpisubsetsfilterchange
This event is triggered when the account plan subset filter changes. The event contains the selected category product ID.
Example Implementation
Here’s an example of how to use the tpm-account-plan component.
TPM Account Plan Component Methods
Here are the methods supported by the tpm-account-plan LWC.
exportKPIs
API Version
58.0
Signature
exportKPIs(options)
Properties
| Name | Type | Description | Required or Optional |
|---|---|---|---|
| options.subsets | List<String> | List of loaded KPI subsets to retrieve data from. You can get a list of loaded subsets using the getKPISubsets() method. Provide either the KPI subsets or the KPI names. |
Optional |
| options.kpis | List<String> | List of KPI names to retrieve data from. You can get a list of loaded KPI names using the getKPIs() method. Provide either the KPI subsets or the KPI names. |
Optional |
| options.levels | List<String> | List of loaded levels to retrieve data from. You can get a list of loaded levels using the getLevelNames() method. |
Optional |
| options.periods | List<String> | List of loaded period types to retrieve data. You can get a list of loaded period types using the getPeriodTypes() method. |
Optional |
| options.format | List<String> | Format in which the response is returned. Possible formats are:
The default format is JSON. |
Optional |
The returned data is a list of rows (JavaScript objects or CSV rows). Each row represents the value of the KPI for the determined level. Each row contains values for all the periods specified in the request.
Example Implementation
getProperty
API Version
59.0
Signature
getProperty(propName)
The available properties to retrieve are:
- status
- calculationStatus
- manualInputs
- kpiSubsetFilter
- categoryFilter
getLevelNames
API Version
59.0
Signature
getLevelNames()
Example Implementation
getKPISubsets
API Version
59.0
Signature
getKPISubsets()
Example Implementation
getKPIs
API Version
59.0
Signature
getKPIs()
Example Implementation
getPeriods
API Version
59.0
Signature
getPeriods()
Example Implementation
getPeriodTypes
API Version
59.0
Signature
getPeriodTypes()
Example Implementation
setManualInputs
API Version
Manual grid edits are an array of TPMManualInput instances. You can add new entries or remove entries from the existing array of elements.
60.0
Signature
setManualInputs(manualInputs)