Expression-Based Pricing
Expression-Based Pricing
Tobi’s new pricing engine allows you to define custom, flexible pricing rules using expressions—a powerful way to calculate fares based on trip variables like time, location, vehicle type, and more.
This guide explains how to use pricing expressions to configure fare rules that fit your account or contract needs—without any developer involvement.
Expression-based vs. Legacy Pricing: What's the Difference?
Tobi supports two approaches to pricing: legacy price rules and expression-based (advanced) pricing. Both allow you to automate fare calculation, however they work differently and suit different needs.
Legacy price rules use a form-based setup where you define fares through drop-down lists and structured fields — things like serving zone, vehicle type, day of week, time range, and distance tiers. This works well for straightforward pricing that maps cleanly to Tobi's built-in parameters.
Expression-based pricing uses formulas to calculate fares, giving you more flexibility for complex or custom pricing logic — like minimum fare adjustments, wait time charges, sibling add-ons, or driver fare percentages. Instead of selecting from preset options, you write expressions directly that reference trip variables like distance, driver_wait_at_pickup, and grand_total.
|
Legacy |
Expression-Based |
|
|
|
Setup method |
Form-based (dropdowns, fields) |
Formula-based (expressions) |
Serving zone, vehicle type, day/time filters |
✓ |
✓ |
Distance tiers |
✓ |
✓ |
Wait time charges |
— |
✓ |
Minimum fare adjustments |
— |
✓ |
Driver fare as % of trip total |
— |
✓ |
Custom logic (conditionals) |
— |
✓ |
If you're unsure which pricing setup your account uses, contact your Tobi representative.
Creating a Price Model
To create a new price rule, you will first need to create the price model by going to Configurations → Price Models.
Price models are groups of price rules that can all be used for a particular account.
From here, select the plus button to add a price model

Input the Account Name as the price model name and click save. Then, click the ‘Add Price Rule’ button in the top right corner
Next, switch to the ‘advanced’ settings to input the expression-based pricing formulas.
Once you have completed all portions of the price rule, click save.
Pricing Expressions
Please see below for the formulas that are used in the price rules. You can copy and paste these into the corresponding text boxes on the price rule screen. Please note, you will need to change the rates to reflect the correct dollar amount.
Note: The quantity is always 1, meaning each applicable item’s fee is counted once per trip, not multiplied by anything else. However, you will need to adjust the dollar amount per price rule
Base Rate (Flat)
{ Rate: 28, Quantity: 1 }
Base Rate (Distance Based/Tiered Pricing)
{ Rate: distance < 4 ? 28 : distance < 8 ? 35.50 : distance < 12 ? 45.5 : 55.5, Quantity: 1 }
If the distance is less than 4 miles, the rate is $28.
If the distance is more than 4 miles and up to 8 miles (but not including 8 miles), the rate is $35.50.
If the distance is more than 8 miles and up to 12 miles (but not including 12 miles), the rate is $45.50.
If the distance is 12 miles or more, the rate is $55.50.
The quantity refers to the singular trip, which is 1
Per Mile
{ Rate: 2.5, Quantity: distance }
The rate is $2.50 per mile.
The quantity is the total distance (in miles).
Total = $2.50 × distance.
Per Mile (5 Miles free)
{ Rate: 2.5, Quantity: distance>5 ? distance -5 : 0 }
The rate is $2.50 per mile.
Only miles beyond 5 are charged.
If the distance is 5 miles or less, the charge is $0.
If the distance is greater than 5 miles, subtract 5 from the distance and multiply the remainder by $2.50.
Total = $2.50 × (distance – 5) (when distance > 5).
Examples:
A 4-mile trip = $0 (within free miles).
A 10-mile trip = (10 – 5) × $2.50 = $12.50.
Driver Wait at Pickup
{ Rate: 2.5, Quantity: driver_wait_at_pickup > 2 ? driver_wait_at_pickup - 2 : 0 }
The rate is $2.50 per minute.
The first 2 minutes are free.
If the driver wait time at pickup is 2 minutes or less, there is no charge.
If the wait time is more than 2 minutes, subtract 2 from the total wait time and multiply the remainder by $2.50.
Examples:
Wait time = 2 minutes → $0
Wait time = 5 minutes → (5 – 2) × $2.50 = $7.50
Driver Wait at Drop-off
{ Rate: 1, Quantity: driver_wait_at_drop_off > 5 ? driver_wait_at_drop_off - 5 : 0 }
The rate is $1.00 per minute.
The first 5 minutes are free.
If the drop-off wait time is 5 minutes or less, there’s no charge.
If it’s more than 5 minutes, charge $1.00 × (wait time − 5).
Examples:
5 minutes → $0
9 minutes → (9 − 5) × $1.00 = $4.00
Minimum Fare Adjustment
{ Rate: total_amount < 40 ? 40 - total_amount : 0, Quantity: 1 }
If the total amount is less than $40, the adjustment is: $40 − total amount
If the total amount is $40 or more, the adjustment is $0
Quantity = 1, so the adjustment is applied once per trip
Examples:
Total amount = $30 → Adjustment = $40 − $30 = $10
Total amount = $40 → Adjustment = $0
Total amount = $50 → Adjustment = $0
}
Driver Fare
{ Rate: grand_total * 0.42 }
The .42 refers to the percentage the driver is paid for the trip. This will need to be updated to reflect the correct driver fare
For places where the Minumum driver fare is $17.50, it will be: “grand_total * 0.42 >= 17.5 ? grand_total * 0.42 : 17.5”
Associating the Price Rule to the Price Model
Once the price rule is created, you will need to associate it to the price model and the account. To associate the price rule with the price model, please follow these steps:
1. Search for the price model and select the tree dots and ‘Associate Prices Rules’

2. The rules will pop up on the right side of the screen. You can search for and select the price rule to associate it with the price mode. Be sure to hit save.

Associating the Price Model to the Account
- Check if there is an account already created
- Go to Configurations → Accounts → Search for Account
- If an account does not exist:
- Go to Add New Account → Add Other Account.
- Fill out all required fields marked with a red asterisk (e.g., Name, Account Type, etc.)
- If an account does exist:
- Select the three dots to the right of the account and select ‘Edit’.
- Create an association (Step 6).
- Click Add New Association or Revise Price Rule if one already exists
- Enter the fleet information.
- Select the price model you just created and set the effective date.
- Click Add.
- Click Save at the bottom of the page.
Changing a Price Rule for a Future Date
If an account’s rates are changing, you can set up a new price rule to take effect on a specific date without disrupting current trips.
- Create a new price rule with the updated rates (following the steps above)
- Go to the account and click Edit
- Click Revise Price Rule on the existing association
- Select the new price model and set the effective date to the date the new rates should begin
- Click Add, then Save
Testing Price Rules
Before relying on a new price rule, it's a good idea to verify it's working as expected.
- Create a test booking for an account that has the price model associated
- Check the trip details to confirm the fare calculated correctly based on your expressions
- The price rule and calculations can be found at the bottom of the booking
If the pricing doesn't look right, double-check that the price rule is associated to both the price model and the account, and that the effective date has been reached.