Recipe - How To Store Per-Calculation Values
This article describes a recipe to store per-calculation values. Typically, you want to store a value a/ for a given calculation and b/ for a given user or team. For example, you could calculate each user's average credited revenue and store this. You can then re-use this value within different reward formulas, or perhaps simply show it to payees.
Storing Per-Calculation Values
You can store per-calculation values within:
You typically do NOT want to store per-calculation values formulas which are evaluated per-transaction. For example, if your plan is processing 1000 transactions, you probably do NOT want to calculate and store a per-calculation amount, because you will do so 1000 times.
For this reason, you probably should store per-calculation values within dynamic quota formulas. Using a dynamic quota formula, you can query the set to credited transactions, query for some value (ex: average revenue), and then store it within the calculation.
To store your value within the transaction, use the StoreCalculation(Name, Key, Value) function. Specify a name, a key, and the value to store. They key is often a credited user ID.
For example, you could specify a dynamic quota formula like this to store a value called "AverageRevenue" for each credited user:
Loading Per-Calculation Values
You can now load per-calculation stored values within:
To load values from your calculations, use the LoadCalculation(Name, Key) function.
For example, you can use the same convention to load each calculation's "AverageRevenue" value in a global reward formula:
Exporting Rewards
When exporting reward details from a calculation, calculated fields are automatically included in the export:
Displaying Stored Values
To display the calculated field on incentive dashboards, you need to specify an advanced option on your plan. The convention is PerformanceMetric=<Name> (ex: PerformanceMetric=AverageRevenue). This is equivalent to making a call to LoadCalculation(Name, Key) using a/ the specified name and b/ a key equal to the current dashboard user.
Related Articles
Recipe - How To Store Per-Transaction Values
This article describes a recipe to store per-transaction values. For example, you could calculate a "Commissionable" amount once and store it. You can then re-use this value within different reward formulas, or perhaps simply show it to payees. ...
Should I Use Per-Transaction Rewards?
When adding certain types of rewards, you can specify whether rewards should be calculated per-transaction. The short answer is - if it's important for reps to see a per-transaction commission amount (and rate), then you should check the checkbox, ...
Recipe - How To Efficiently Setup A New Plan
This article describes a recipe to efficiently create plans based on common patterns. Those patterns work for 75% of plans. This article is intended to be a compact reference and provide general guidelines. Initialize Plan The goal here is to quickly ...
How Can I Configure Per-Transaction Limits?
Here are the steps to configure per-transaction limits for your sales incentive plan: Login to your workspace On the left pane, click on "Plans > All Plans" Search for the plan Click on the plan row Click on the "Limits" tab (if needed) Select ...
How Can I Set Per-User Quotas?
You can configure your incentive plans to use per-user quotas. This lets you re-use the same plan across many users, each user having a different attainment threshold. To create an incentive plan with per-user quotas: Edit your incentive plan Click ...