How Can I Debug Formulas?
You can use debug mode to understand how formulas are applied to a sample transaction or sample payee. You will see how each formula statement was evaluated against your sample transaction or user (payee).
Debugging Formulas - Sample Transaction
To enable transaction debugging:
- Select "Transactions > All Transactions"
- Find your transaction
- Click on the transaction
- Copy everything after the last slash from the URL
Other ways to find transaction IDs:
- Open your transaction and click on the "Metadata" tab > System ID
- Export credits from a calculation > System ID
Next, edit your plan to enable debugging: - Edit your plan
- Go to the "Calculations" tab (if needed)
- Paste your transaction ID to the "Debug Record ID" field
- Save your plan
Next, re-run your calculation. When you open your calculation, you should see a "Debug" tab with evaluation details. If you do not see a Debug tab, this means that your transaction wasn't processed by the calculation (ex: its date is outside your calculation's range, or does not match your plan's filter).
Debugging Formulas - Sample Payee
To enable user debugging:
- Select "Users > All Users"
- Find your user
- Click on the user
- Copy everything after the last slash from the URL
Next, edit your plan to enable debugging: - Edit your plan
- Go to the "Calculations" tab (if needed)
- Paste your user ID to the "Debug Record ID" field
- Save your plan
Next, re-run your calculation. When you open your calculation, you should see a "Debug" tab with evaluation details. If you do not see a Debug tab, this means that no reward formula was activated with this user as a payee (ex: this payee was not eligible for a payout).
Debugging Formulas - Log Statement
Finally, you can log specific statements using the Log() function.
In the example below, logging only occurs if revenue is over 1000. Due to parallel processing, log statements may be intermixed, and therefore should provide sufficient context.
Related Articles
What Are Commission Formulas For?
If you are using spreadsheets to calculate commissions, you are probably: Use messy nested conditions Reference cells by name or position Have multiple sheets with v-tables, etc. If someone shifts cells, adds a column, or includes hidden rows of ...
Error - Your Plan Contains Advanced Formulas Which Must Be Approved By Us
Applicability This error applies to the following situation: A plan was configured by our technical team You altered formulas within the plan Some of those formulas contain {{...}} expressions Your calculation is failing with this error Impact This ...
How Do I Record Professional Services?
This KB only applies to authorized Sales Cookie operators. To record delivered professional services, follow these steps: Go to Debug > Impersonate Login to the customer's account Go to Debug > Log Service Complete the form Service Type = type of ...
Is There A Complete Formula Technical Reference?
This article provides technical details about formulas. For some background information about formulas, click here. You can configure formulas to control different aspects of calculations, such as filtering, crediting, scoring, quota, custom, ...
What Happens When I Change User Email Addresses?
This KB only applies to authorized Sales Cookie operators. To change user email addresses, follow these steps: Go to Debug > Change Email Complete the form Current Email = old email address of a user (MUST exist) New Email = new email address to ...