Contents:
Inventory Pricing Formula Guide
This guide explains how to use formula pricing in Inventory Pricing, with a focus on:
regular built-in variables
custom variables
lookup uploads
previewing and testing formulas
This is written for normal users and admins configuring pricing rules. It is not a developer document.
1. What Formula Pricing Does
A normal pricing row uses a fixed buy price and markup. A formula pricing row calculates the effective price dynamically. Use formula pricing when the price should change based on things like:
panel count
kW
battery size
state
DNSP
uploaded lookup rates
Examples:
add a different amount for NSW vs VIC
use one rate for fewer than 20 panels and another rate for 40+
use uploaded supplier/state pricing instead of a single fixed value
2. Basic Pricing vs Formula Pricing
Every pricing row still starts with the normal pricing fields:
Supplier
Stock Code
Base Buy Price
Markup
When Formula is turned on:
the formula becomes the pricing rule
the base buy price still matters
built-in variables become available
you can add custom variables if needed
Think of it like this:
Base Buy Price is your starting number
the formula tells SolarPlus how to transform that number
3. Built-In Variables vs Custom Variables
There are two kinds of variables in the formula system.
Built-In Variables
Built-in variables already exist. You do not need to create them manually. These are available automatically when relevant:
base_cost
markup_value
code
state_abbrev
distributor_name
panels
kw
strings
mppt
kwh_nom
kwh_use
Some built-ins only exist when the formula is being evaluated in quote/system context, such as:
state
DNSP
quote quantities
Important:
built-ins are the first thing to use
do not create a custom variable if a built-in already gives you the value you need
Custom Variables
Custom variables are optional. You add a custom variable only when you want to:
create a friendly alias
store a manual value used in the formula
reference a specific context value by a friendlier name
use uploaded lookup data
Examples:
alias freight to a manual value of 25
alias state_short to state_abbrev
create panel_lt20 as an upload lookup variable
4. Common Built-In Variables
Base Pricing
base_cost The buy price on this pricing row.
markup_value The markup value on this pricing row.
quantity Quantity on the pricing row. Mainly useful for kit pricing.
spare_qty Spare quantity on the pricing row. Mainly useful for kit pricing.
Location / DNSP
state_abbrev The quote/site state abbreviation, such as NSW or VIC.
state Shortcut alias for state_abbrev.
distributor_name The DNSP / electricity lines company name, such as Ausgrid.
distributor Same DNSP name value.
dist Shortcut alias for distributor_name.
Quote Quantities
panels Total panel quantity in the quote. In the UI helper chips this is shown as panel-qty, but the formula token is still panels.
number-of-strings Number of strings in the quote.
strings Shortcut alias for number-of-strings.
kilowatt-qty Total system kW.
kw Shortcut alias for kilowatt-qty.
mppt-qty MPPT quantity.
mppt Shortcut alias for mppt-qty.
inverter-qty Inverter quantity.
nominal-battery-kwh Total nominal battery capacity.
kwh_nom Shortcut alias for nominal-battery-kwh.
usable-battery-kwh Total usable battery capacity.
kwh_use Shortcut alias for usable-battery-kwh.
5. Formula Syntax
The formula engine supports:
addition: +
subtraction: -
multiplication: *
division: /
brackets: ( and )
comparisons: =, ==, !=, <>, >, <, >=, <=
logical operators: and, or, &&, ||
conditional logic with if(condition, true_value, false_value)
Equality Notes
These are treated as equality checks:
=
==
This is treated as not equal:
!=
<>
String Matching
String comparisons work for values like state or DNSP.
Example:
if(state_abbrev = "NSW", base_cost + 25, base_cost + 15)
Wildcard matching is also supported for strings using * at the end.
Example:
if(distributor_name = "Aus*", base_cost + 40, base_cost + 10)
6. Simple Formula Examples
Add 10%
base_cost * 1.1
Add a fixed freight amount
base_cost + 25
Add a different amount by state
if(state_abbrev = "NSW", base_cost + 25, base_cost + 15)
Use panel count tiers
if(panels < 20, panel_lt20, if(panels <= 40, panel_20_40, panel_40_plus))
Use kW
if(kw > 10, kw * 20, kw)
7. When to Use Only Built-In Variables
Use built-ins only when:
the formula can be written directly from values that already exist
you do not need uploaded pricing
you do not need to reuse the same manual number many times
Example:
if(state_abbrev = "NSW", base_cost + 20, base_cost + 10)
No custom variables are needed here.
8. When to Create Custom Variables
Create a custom variable when it makes the formula cleaner or adds data that is not already built in.
Good reasons to create one:
the formula is getting too long
the same value appears repeatedly
you want a clearer business label
you want to import lookup rows
9. Custom Variable Types
Each custom variable has a Source Type.
9.1 Manual
Use this when you want a fixed value inside the formula.
Example variable:
Variable Key: freight
Source Type: Manual
Fallback Value: 25
Formula:
base_cost + freight
Use Manual when:
the number is relatively stable
you do not need uploaded data
you want the formula to be easier to read
9.2 Field Alias
Use this to create a friendlier name for an existing built-in value.
Example variable:
Variable Key: state_short
Source Type: Field Alias
Use Value From: state_abbrev
Formula:
if(state_short = "NSW", base_cost + 20, base_cost + 10)
Use Field Alias when:
you want a shorter or clearer variable name
you are trying to simplify a long formula
Important:
this does not create new data
it only renames or mirrors an existing value
9.3 Context
Use this when you want to reference quote/site context directly via a custom variable name.
Example variable:
Variable Key: dnsp
Source Type: Context
Use Value From: distributor_name
Formula:
if(dnsp = "Ausgrid", base_cost + 35, base_cost + 10)
Use Context when:
you want clearer formula wording
you want a shorter name for a context field
9.4 Upload Lookup
Use this when the value should come from imported lookup rows.
This is the most powerful option and is best for:
supplier-specific rates
state-specific rates
DNSP-specific rates
regularly updated pricing tables
Example custom variables:
panel_lt20
panel_20_40
panel_40_plus
Formula:
if(panels < 20, panel_lt20, if(panels <= 40, panel_20_40, panel_40_plus))
In this setup:
the formula chooses the volume tier
the uploaded lookup row chooses the correct value for supplier/state/DNSP
10. Required for Formula vs Fallback Value
Fallback Value
Fallback Value is used if the variable cannot be resolved normally.
Example:
a lookup row is missing
a context value is blank
If a fallback value is entered, the formula can still continue.
Required for Formula
Turn this on when the variable must exist for the formula to be valid.
Use this carefully.
If a required variable cannot be resolved:
the formula cannot resolve that variable properly
pricing may fail back to the base unit price
Recommended approach:
use Required for formula only when the rule must never proceed without that value
otherwise provide a sensible fallback
11. Upload Lookup Variables
Upload Lookup variables let you import rate tables instead of typing values one by one.
What a Lookup Row Can Match On
Lookup rows can vary by:
supplier
code
state
distributor
Internally, matching is based on:
supplier
stock code
state
distributor
The best matching row is used automatically.
Supported CSV Headers
The import is header-driven.
Users only need the headers relevant to their use case.
Supported headers:
variable_key
value
supplier_id or supplier
code
state_id or state
distributor_id or distributor
Example CSV
variable_key,supplier,code,state,distributor,value
panel_lt20,Supply Partners,PANEL-445,NSW,Ausgrid,42.10
panel_20_40,Supply Partners,PANEL-445,NSW,Ausgrid,40.25
panel_40_plus,Supply Partners,PANEL-445,NSW,Ausgrid,38.90
panel_lt20,Supply Partners,PANEL-445,VIC,,43.00
panel_20_40,Supply Partners,PANEL-445,VIC,,41.10
panel_40_plus,Supply Partners,PANEL-445,VIC,,39.80
Important Lookup Rules
value is required
headers are read by name, not by position
you do not need every possible column
supplier must match the supplier record in SolarPlus, unless you use supplier_id
state and distributor can be uploaded as readable names
Good Pattern for Tiered Panel Pricing
Create three custom variables:
panel_lt20
panel_20_40
panel_40_plus
Then use:
if(panels < 20, panel_lt20, if(panels <= 40, panel_20_40, panel_40_plus))
This is the recommended pattern because:
the formula handles quantity tier selection
the uploaded data handles supplier/state/DNSP pricing variation
12. Preview: What It Is For
The Preview section helps you test the formula before saving.
It shows:
Preview Result
Expression
Variables currently used
When you expand Preview Inputs, you can test sample values for:
panels
kW
strings
MPPT
battery kWh
state
distributor
Highlighted preview inputs indicate that the current formula is actually using those values.
This is useful because it quickly shows:
which inputs matter for the current formula
which inputs can be ignored for this pricing rule
13. Variable Library
The Variable Library is for reusable custom-variable setups.
Use it when the same group of variables is needed across multiple pricing rows.
Typical use cases:
common freight variables
common state-based adders
common lookup variable structures
Important:
the library stores custom variables
built-in variables are always available anyway
you do not save built-ins into the library
14. Recommended Setup Process
Use this order when building a formula row.
Simple formula
Set Supplier and Stock Code.
Enter Base Buy Price and Markup.
Turn Formula on.
Write the formula using built-ins first.
Test it in Preview.
Save.
More advanced formula
Start with the built-in variables.
Add custom variables only where they simplify the formula.
If values need regular updates, use Upload Lookup variables.
Test with Preview Inputs.
Save the custom variable set to the Variable Library if it will be reused.
15. Good Practice
start simple
use built-ins first
add custom variables only when they make the formula clearer
use short, meaningful variable keys
use lookup uploads for data that changes regularly
test with Preview before saving
16. Common Mistakes
Mistake: Creating built-ins as custom variables
Do not create custom variables for things like:
base_cost
state_abbrev
distributor_name
kw
panels
These already exist.
Mistake: Using the wrong supplier meaning
In lookup uploads:
supplier means the product distribution company
distributor means the DNSP / electricity lines company
These are not the same thing.
Mistake: Expecting one lookup variable to handle quantity bands automatically
Lookup rows do not select tiers based on panel count.
Quantity tiering should be done in the formula itself.
Use separate lookup variables for each tier.
Mistake: Forgetting that some values only exist in quote/system context
State, DNSP, and quote quantity variables are most meaningful when evaluated in an actual quote/system context.
Use Preview to test them before saving.
17. Quick Reference
Use built-ins when
the value already exists in the row or quote context
the formula can stay readable without extra variables
Use Manual custom variables when
you need a fixed reusable number
Use Field Alias or Context custom variables when
you want a shorter or clearer formula name
Use Upload Lookup custom variables when
the value needs to come from imported pricing tables
the rate varies by supplier, code, state, or DNSP
18. Example: Full Real-World Pattern
Goal:
one panel price for fewer than 20 panels
another for 20 to 40
another for above 40
different rates by state
rates updated by CSV upload
Custom variables:
panel_lt20
panel_20_40
panel_40_plus
Formula:
if(panels < 20, panel_lt20, if(panels <= 40, panel_20_40, panel_40_plus))
CSV:
variable_key,supplier,code,state,value
panel_lt20,Supply Partners,PANEL-445,NSW,42.10
panel_20_40,Supply Partners,PANEL-445,NSW,40.25
panel_40_plus,Supply Partners,PANEL-445,NSW,38.90
panel_lt20,Supply Partners,PANEL-445,VIC,43.00
panel_20_40,Supply Partners,PANEL-445,VIC,41.10
panel_40_plus,Supply Partners,PANEL-445,VIC,39.80
Result:
the formula picks the quantity band
the upload data picks the state-specific rate
users can update the CSV later without rewriting the formula
Comments
0 comments
Please sign in to leave a comment.