Formulas
Calculated fields let you take what SignBreezy already knows about a reservation, property, or guest and turn it into the value or wording your agreement needs. You can calculate a security deposit, split out taxes, add a fee for a long stay, work out a balance due, set a date from check-in, or add a sentence only when a condition applies.
Once you create a calculated field, it becomes a token like any other. Put it in your PDF or Google Docs template, and SignBreezy works out the right value for each reservation.
How it works
A formula starts with data SignBreezy already has. You can use tokens from:
- Reservation, such as
total,room_subtotal,check_in,num_nights,cleaning_fee, ortax_total - Property, such as
property_state - Guest answers, such as
num_adults,num_kids, and the answers to questions you add - Other calculated fields, so you can build bigger calculations from smaller ones
The formula tells SignBreezy what to do with that information.
Your first formula
Suppose you require a security deposit equal to 20% of the reservation total. Create a calculated field named Security deposit with this formula:
total * 0.2
On a $2,000 reservation, the field returns $400. Place its token anywhere the deposit belongs in your agreement. Every reservation gets its own result automatically.
A formula doesn't have to be math
A formula can return a number, an amount of money, a date, text, or a blank. That means a calculated field can also control what your agreement says.
Charge a $500 fee only for stays of 28 nights or longer:
IF(num_nights >= 28, 500, 0)
A 7-night reservation returns 0. A 30-night reservation returns 500.
Or return language instead of a dollar amount:
IF(num_nights >= 28, "Long-term stay terms apply.", "")
Qualifying reservations get the sentence. Everything else gets a blank. Your template adapts to each reservation, so you don't have to maintain a separate version for each kind of stay.
Examples
subtotal * 0.10MIN(MAX(room_subtotal * 0.2, 250), 500)ROUND(room_subtotal / num_nights, 2)IF(AND(num_nights >= 28, num_adults > 2), 500, 0)IF(late_checkout = "yes", 100, 0)IF(bringing_pet = "Yes", 75, 0)IF(OR(num_adults > 4, num_kids > 2), "Additional occupancy terms apply.", "")IF(NOT(num_adults > 4), "Standard occupancy applies.", "")IF(num_nights >= 28, "Monthly rental terms apply.", "Short-term rental terms apply.")IF(num_kids > 0, "Please review the property's pool safety requirements.", "")"Your stay is " & num_nights & " nights.""Welcome, " & guest_full_name & "!""Your " & num_nights & "-night stay begins " & check_inroom_subtotal + cleaning_fee + pet_feecheck_in - 7check_out + 1Build formulas from formulas
You don't need one enormous formula. Create small calculated fields with clear names, then combine them. Each one becomes its own token that other formulas can use.
room_subtotal + cleaning_feetaxable_amount * 0.115taxable_amount * 0.01occupancy_tax + tourism_assessmenttaxable_amount + total_taxesIF(pets > 0, (pets * 25), 0)This keeps each formula easy to read, and you can place any intermediate value in your agreement if you need it.
A longer example
Suppose your agreement needs a deposit, a fee for long stays, and the total due. Create these three fields:
total * 0.2IF(num_nights >= 28, 500, 0)security_deposit + long_stay_feeFor a $3,000, 10-night reservation, the deposit is $600, the long-stay fee is $0, and the amount due is $600. For a $3,000, 30-night reservation, the deposit is $600, the long-stay fee is $500, and the amount due is $1,100.
Your template doesn't need to know how any of that was calculated. Place the tokens, and SignBreezy does the work for each reservation.
Dates
Dates can be calculated. A number added to a date is a number of days, and one date subtracted from another gives the number of days between them.
If check-in is January 14, 2027, check_in + 1 returns January 15, 2027. Because the calculation starts from each reservation's real dates, the result changes automatically for every stay.
Text
Use & to join text, numbers, dates, and tokens. Put literal text in double quotes, because text always belongs in quotes.
This is useful when the sentence stays the same but a piece of it changes from one reservation to the next. The stay description example above is one case: the sentence is fixed, and only the number of nights changes.
Comparisons
| Operator | Meaning |
|---|---|
= | Equal to |
<> | Not equal to |
< | Less than |
> | Greater than |
<= | Less than or equal to |
>= | Greater than or equal to |
Comparisons are most useful inside IF(), AND(), and OR().
Reference
Operators
| Write | Meaning |
|---|---|
+ - * / | Add, subtract, multiply, divide |
20% | 0.2 |
( ) | Brackets, to control the order of calculation |
& | Join text |
"text" | Text in double quotes |
Comparisons bind loosest, then &, then add and subtract, then multiply and divide.
Functions
| Function | Result |
|---|---|
IF(test, if yes, if no) | One value or the other |
AND(a, b, ...) | Yes only when every part is |
OR(a, b, ...) | Yes when any part is |
NOT(a) | The opposite |
ROUND(number, places) | To the nearest. Places is optional |
MIN(a, b, ...) | The smallest. Blanks are skipped |
MAX(a, b, ...) | The largest. Blanks are skipped |
ABS(number) | Without its sign |
Tips
- Use tokens, not typed numbers, for things SignBreezy knows. If a fee depends on the length of stay, use
num_nightsrather than a number you typed in. - Break big calculations into smaller fields. A Taxable amount field used by three tax formulas is easier to maintain than repeating the taxable calculation three times.
- Name fields clearly. Names like Occupancy tax, Security deposit, and Long-stay terms are easy to find when you build a template.
- Remember that percentages are decimals in a formula. 20% is
0.2and 11.5% is0.115. - Use an empty value when nothing should appear. A conditional text formula can return
""when its condition doesn't apply.
Using formulas in a template
Add a calculated field from the Formulas tab, using Add calculated field. Fill in:
- What is it called? The name. The token follows the name until you edit the token yourself.
- Work it out from. The formula. Click a token to drop it in at the cursor.
- Try it with your own values. Change any input and watch the result. Nothing here is saved.
- Print a number as. A plain number, or money.
A formula can use another formula's token, and the order in the list doesn't matter.
When you edit a template, SignBreezy shows sample data so you can see how each value will fit. When an agreement is generated for a real reservation, the formula uses that reservation's actual property, dates, and guest information.
When a formula can't be worked out
Each formula's row shows its example value, or the reason it can't be worked out yet. A formula that depends on a guest's answer shows Blank until the guest answers until then, which is expected.
Only two problems block you from saving a template: a formula that can't be read, and a formula that refers back to itself. Anything else, such as a name nothing fills or a divide by zero on the sample, is a warning, so you can save half-finished work.
On a real contract, a formula that can't be worked out is left blank rather than printed as zero. A blank is a visible mistake you can fix. A confident $0.00 is not.