Price Formula Syntax
MyClient allows you to describe your prices using a formula. The formula can refer to the customer's usage and account details using a variety of simple and advanced constructs, allowing you to succinctly and correctly model your billing rates within MyClient.
You may then apply a Price Formula to a New Account plan; assign New Account plans to a reseller's Permission Group; and then have the reseller create new backup accounts and reconfigure existing backup accounts onto the selected New Account Plan to apply the Price Formula to the customer.
MyClient interpolates a customer's quota, modules, and other information into the Price Formula formula by use of macros. A number of predetermined macros are defined. You can easily embed a macro using the buttons on the top bar of the formula editor.
MyClient offers syntax help with Price Formulas at any time, by choosing the "Syntax" tab from the top bar.
MyClient also offers a Live Preview of your Price Formula. This feature allows you to immediately simulate applying the price to a customer to ensure the result is as you would expect.
Write formula using a conventional syntax. Respects brackets and order of operations. Note that for your safety, division by zero produces a zero.
The following excel-style functions can be used:
||Accepts two or three arguments; if the first argument is 1, returns the second argument; otherwise, returns the third argument (or zero if it is not present).|
||Accepts any number of arguments, returns the largest or smallest of them all|
||Accepts any number of arguments, returns 1 or 0 if all or at least one are nonzero|
||Accepts one argument, returns the number rounded up or down|
||Accepts at least two arguments. This function segments a value into price breaks. The first argument is the value to segment by price breaks, followed by price-per-amount, price-break-level, price-per-amount repeated as necessary.|
Example | Syntax
------- | ------
Flat fee $50 |
$0.80 per GB |
0.8 * $quota
Lookup table |
IF($quota = 5, 20, 0) +
IF($quota = 10, 28, 0) +
IF($quota = 15, 34, 0)
$20 flat rate,
$1.50/GB first 10GB,
and $0.50/GB after |
20 + MIN(10, $quota)*1.50 + MAX($quota - 10, 0)*0.50
20 + IF($quota > 10, 10, $quota)*1.50 + IF($quota > 10, $quota - 10, 0)*0.50
20 + SEGMENT($quota, 1.5, 10, 0.5)