---
title: Offer Formula Fields
slug: offer-formula-fields
docTags: RqLdLm9nlqh9vFAn4-Z7N
createdAt: 2026-03-18T13:52:24.421Z
---

Offer formula fields provides the ability to create custom offer fields that perform mathematical or logical operations.

Offer formula fields are available on the Plus and Enterprise plans.

| Foundations | Legacy Plus | Plus | Enterprise |
| ----------- | ----------- | ---- | ---------- |
| ❌           | ❌           | ✅    | ✅          |

# Creating an offer formula field

To create an offer formula field you must first create an offer custom field:

- Navigate to Admin in the top navigation bar, then Organization Setup > Custom Fields.
- Click the Offer tab on the Custom Fields page.
- Select `+ New`
- Add in your offer custom field details including a title, description and field type.

::Image[]{src="https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/ci5_a_vKGczrISdOS5pez-20260318-151354.jpg" size="60" width="724" height="706" position="center" darkWidth="724" darkHeight="706" showCaption="false" indent="1"}

- Click `Create`
- Once you have created the offer custom field, select it from the list of offer custom fields to edit it again.
- If you'd like to make this field non-editable, check the `Make this field non-editable?` checkbox.&#x20;
- In the Default Value field, click `Select Field on Job Consideration`&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/ejiSJ1vPzXKx7k7qLEbmF_custom-fields-acent-ashby-2026-03-18-at-31633-pm.jpg" size="82" width="1026" height="978" position="center" darkWidth="1026" darkHeight="978" showCaption="false" indent="1"}

- Select `New Calculated Field`

::Image[]{src="https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/xnJAGLULnooJkRawBgFmE_new-calculated-field.jpg" size="100" isUploading="false" width="1168" height="268" darkWidth="1168" darkHeight="268" showCaption="false" indent="1"}

## Adding a formula to your offer formula field

Once you've created the formula field, add in your formula. Click the `Calculated Field` option that now shows in the **Default Value** section of the offer custom field. This will take you to the formula field editor.

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/kBDAHXM6ekkt7y0tQLL1v_custom-fields-acent-ashby-2026-03-18-at-32549-pm.jpg)

The formula editor has a few noteworthy components:

- The title of the new formula field
- The editor space wherein formulas, functions, and field references are combined
- `Insert Field` button: click to add a new field or press `$` as a hotkey
- `Insert Function` button: click to add a specialized function
- `Syntax Reference` button: Open this for formatting information to ensure your formula is correctly formatted.
- `Cancel/Save` buttons: you will only be able to save a formula field if the definition is syntactically

:::hint{type="info"}
For more on the functions and syntax, check out [the reference below](docId\:m2CcYT8El19Tq0pWPYGVF).
:::

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/OJbBqNVEVG4wETV0rVLA6-20260324-154230.jpg)

After the field is saved, it can be used in filters and groupings.&#x20;

:::hint{type="warning"}
If you have errors in your fields, you will not be able to save them. You can hover over areas of the formula highlighted in red to see the issue.

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/7x8oK9s2FIwC1YJQ_A4-8_error-in-a-formula-field.png)
:::

## Generating an offer formula field token for an offer letter

You can also generate an offer letter token for your offer formula field. When viewing your offer formula custom field, select `Click to Generate Token` . This will create a copyable token that you can then add to your offer letter template docx files before uploading them to Ashby.&#x20;

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/kHsbn69dpU0SGrUl00J7c_custom-fields-acent-ashby-2026-03-19-at-103624-am.jpg)

:::hint{type="info"}
You can read more on offer letter templates at [Offers and Offer Letters](docId\:KLIMfx9N1tAhEBVkMGPOh) and [Offer Letter Template Formatting](docId\:VznQ4S_-oH-0fuNsp7q6u).
:::

## Viewing an offer formula field when generating an offer

Your offer formula fields will calculate values once you generate an offer. Click `Create Offer` on the offer activity on the candidate's profile to start the process of adding in the offer details.&#x20;

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/va1HZxvb8GupA-hTcV-fq_savannah-leeman-junior-designer-acent-ashby-2026-03-19-at-103942-am.jpg)

If your offer formula field relies on other offer custom fields, this is where you will fill out those offer custom field values. Once you've filled out the values needed for an offer's formulated field to make a calculation, the field will be pre-filled with the result.&#x20;

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/b5yWmPL8rTD9JjbNpeMQ3_salary-and-offer-bonus-on-offer-highlighted.jpg)

:::hint{type="info"}
You will see a link icon when a default value or formula field is linked to an offer field.  If you'd like to override the result in the offer formula field, click into the field and make any amendments manually. If you opt to override the value, then a broken link icon will show.
If you have checked the `Make this field non-editable?` checkbox when creating the offer formula field, you will not be able to make adjustments to the field.
:::

If a token for the offer formula field has been added to the offer letter, then the token will pull the value into the offer letter after the offer details are confirmed and the offer letter has been generated.

# An example use case for offer formula fields

In our example, we'd like to calculate the total compensation for an offer, including the base salary and any signing bonuses or on-target earnings (or OTE).&#x20;

To ensure we have fields for each of the these values for our offer formula field, we would ensure the following offer custom fields have already been set up.

- Base salary (Currency field type, set as required).
- Signing bonus (Currency field type, set as optional).
- OTE (Currency field type, set as optional).

:::hint{type="info"}
Looking for more on creating custom fields? Check out [Custom Fields](docId\:QpGKlrSCmzgWC-7krBWDs)&#x20;
:::

Once you've configured the fields to be used in the formula, we would then create our offer formula field for total compensation:

**Title:** Total compensation

**Type:&#x20;**&#x43;urrency

**Default Value:** New Calculated Field - Formula

**Formula:&#x20;**&#x63;oalesce (&#x7B;Salary}) + coalesce (\{Offer Bonus})+ coalesce (&#x7B;OTE}, 0)

:::hint{type="info"}
The coalesce action here prevents null values from making the whole computation null.
:::



![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/jDCZqcQ0IX7SrBIq44t65-20260319-103040.jpg)

**Visibility (optional)**

- **Restrict to:&#x20;**&#x44;epartment = Engineering, Sales, Product, etc. (or whichever roles need this formula field). If this should be available for all roles, you do not need to amend the visibility.

**Offer letter (optional)**

- Generate an offer letter substitution token for this offer formula field.
- Insert it into the Docx template for an offer letter so this information can be added to the candidate's offer letter when generated.

At the point of the offer being generated, once values have been entered for the example Salary, Offer Bonus and OTE custom fields on the offer, then the Default Total Compensation field in our example will also be completed with the calculated result.

Once the offer has been submitted and the offer letter has been generated, the calculated value will show in the candidate's offer letter.

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/0JaK8nqlg0z0Hl8wC1QI--20260324-154839.jpg)

## Formula Field Syntax Reference

### Referencing fields

Click the `Insert Field` button below the editor or type $ to choose a field and insert a field reference. This substitutes the value of the chosen field into the expression at that position. Field references appear in &#x7B;braces} in the expression editor.

::Image[]{src="https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/tEywOTe-XfsgotOPNUrD2_default-offer-bonus-calculated-field-acent-ashby-2026-03-19-at-104910-am.jpg" size="84" width="1118" height="596" position="center" darkWidth="1118" darkHeight="596" showCaption="false"}

### Numbers

Numbers may be integers or decimal numbers. Positive and negative values are supported:

- `123`
- `-4`
- `5.6`

### Strings

String values are single- or double-quoted.

- `“hello world”`
- `‘i am text’`

If you need to use a single or double quote in a string, you can either wrap the string with the other type of quote, or you can prefix it with \\\\:

- `'Jane "Example" Doe'`
- `"Jane \Example\ Doe"`
- `"John O'Example"`
- `'John O\'Example'`

To include a literal backslash in a string, use a double backslash:

- `"example\\\\string"`

### Constants

The boolean values are `true` , `null` and `false`.

### Field References

`{Field Name}`

Typing \{ opens the field picker.

## Basic arithmetic

Numeric values may be added, subtracted, multiplied, or divided with +, -, \*, / respectively:

- `1+1`
- `2 * 3`

Parentheses may be used for grouping:

- `({Score A} + {Score B})/ 2`

## Comparisons

Some operators have multiple accepted spellings, to maximize the chance of someone guessing correctly (for example, = and == ). Either form is accepted; they will be normalized to the first (“canonical”) form as part of autoformatting.

Values can be compared for equality with =and for inequality with != or \<>:

- `{Interviewer} = {Referrer}`
- `{Feedback Submitted By} != {Hiring Manager}`

Numeric values can additionally be compared with >, \<, \<=, and >= :

- `{Number of Job Considerations} >= 3`
- `{Overall Recommendation} < {Average Overall Recommendation}`

Comparisons may be chained together:

- `1 <= {Score} < 5 (equivalent to 1 <= {Score} and {Score} < 5 )`

Some fields contain numeric ranges. Use the withinoperator to check whether a value is within a range.

- `{Salary Expectation} within {Compensation Range}`
- `{Score} within range(2, 8)`

## Conjunctions

Boolean variables can be combined with and (&, &&), or (|, ||), and not.

- `not {Extended Offer?}`
- `{Candidate's Location} != {Job's Location} and not {Willing to relocate}`

## Supported functions

The initial set of supported functions is:

| **Operation**        | **Description**                                                                                                                                                                | **Function**                                                                                                                                                                                                                                                                                                                                                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Date                 | Constructs a constant date value from a string in YYYY-MM-DD format.                                                                                                           | `date( value:`<br />`A date string in YYYY-MM-DD format, e.g. "2026-05-01".`<br />`)`                                                                                                                                                                                                                                                                            |
| Date difference      | Take the difference between two date fields and returns a number.<br />The interval may be `"days"`, `"weeks"`, `"months"`, `"quarters"`, or `"years"`.                        | `datediff(from: Date Field 1, to: Date Field 2, interval: "days")`                                                                                                                                                                                                                                                                                               |
| Date addition        | Calculates an offset from a date. Returns a date.                                                                                                                              | `dateadd(date: Date Field 1, amount: X, interval: "days")`                                                                                                                                                                                                                                                                                                       |
| Today                | Returns the current date                                                                                                                                                       | `today ()`                                                                                                                                                                                                                                                                                                                                                       |
| Ceiling              | Rounds a number up to a given precision (number of decimal places).                                                                                                            | `ceiling`<br />`(value:`<br />`The value to round.`<br />`precision:`<br />`The precision to round to.)`                                                                                                                                                                                                                                                         |
| Floor                | Rounds a number down to a given precision (number of decimal places).                                                                                                          | `floor`<br />`(value:`<br />`The value to round.`<br />`precision:`<br />`The precision to round to.)`                                                                                                                                                                                                                                                           |
| Minimum value        | Returns the lowest of a set of numbers or the lower bound of a range.                                                                                                          | `min()`                                                                                                                                                                                                                                                                                                                                                          |
| Maximum value        | Returns the highest of a set of numbers or the upper bound of a range.                                                                                                         | `max()`                                                                                                                                                                                                                                                                                                                                                          |
| Mean value (average) | Returns the mean of a set of numbers or the midpoint of a range.                                                                                                               | `mean()`                                                                                                                                                                                                                                                                                                                                                         |
| Round                | Rounds a number to a given precision (number of decimal places).                                                                                                               | `round`<br />`(value:`<br />`The value to round.`<br />`precision:`<br />`The precision to round to.)`                                                                                                                                                                                                                                                           |
| To number            | Attempts to convert a value to a number. Returns null if it is not possible.                                                                                                   | `tonumber`<br />`(`<br />`value:`<br />`The value to convert.`<br />`)`                                                                                                                                                                                                                                                                                          |
| If statements        | Returns one of several values depending on conditions. Accepts one or more condition/value pairs followed by a fallback value: if(cond1, value1, cond2, value2, …, elseValue). | `if`<br />`(condition:`<br />`The condition to use.`<br />`if_true:`<br />`The value to return if condition is true.`<br />`if_false:`<br />`The value to return if no condition is true, or the next condition if additional condition/value pairs follow.`<br />`arguments...:`<br />`Additional condition/value pairs followed by a fallback value.`<br />`)` |
| Coalesce             | Returns the first value from its arguments that is not null. Allows you to set other values to fall back on if the first value is null.                                        | `coalesce`<br />`(`<br />`value:`<br />`The first value.`<br />`arguments...:`<br />`Additional values to use if the first value is null.`<br />`)`                                                                                                                                                                                                              |
| Option               | Creates an ad hoc option as if from a multiple-choice field.                                                                                                                   | `option`<br />`(`<br />`label:`<br />`The name of the option. Must be constant.`<br />`)`                                                                                                                                                                                                                                                                        |
| In range             | Check if value is within a range, e.g. `{Salary} within {Compensation Range}`                                                                                                  | `inrange`                                                                                                                                                                                                                                                                                                                                                        |
| Range creation       | Constructs a numeric range from two constant numbers.                                                                                                                          | `range(`<br />`min:`<br />`The start of the range.`<br />`max:`<br />`The end of the range.)`                                                                                                                                                                                                                                                                    |
| Concatenate          | Combines multiple strings into one.                                                                                                                                            | `concatenate`<br />`(`<br />`arguments...:`<br />`The strings to concatenate together.`<br />`)`                                                                                                                                                                                                                                                                 |
| Contains             | Returns true if a string contains a substring.                                                                                                                                 | `contains`<br />`(`<br />`string:`<br />`The string to search within.`<br />`substring:`<br />`The string that may be found within that string.`<br />`)`                                                                                                                                                                                                        |
| Ends with            | Returns true if a string ends with a substring.                                                                                                                                | `endswith`<br />`(`<br />`string:`<br />`The string to look at the end of.`<br />`substring:`<br />`The string that may be at the end of the other string.`<br />`)`                                                                                                                                                                                             |
| Starts with          | Returns true if a string starts with a substring.                                                                                                                              | `startswith`<br />`(`<br />`string:`<br />`The string to look at the start of.`<br />`substring:`<br />`The string that may be at the start of the other string.`<br />`)`                                                                                                                                                                                       |
| Split                | Splits a string on a delimiter and returns the element at the given index.                                                                                                     | `split (string: The string to split.`<br />`delimiter:`<br />`The delimiter to split on.`<br />`index:`<br />`The zero-based index of the element to return.)`                                                                                                                                                                                                   |
| Substring            | Extracts a portion of a string. Uses zero-based indexing; start is inclusive and end is exclusive.                                                                             | `substring (string:`<br />`The string to extract from.`<br />`start: The zero-based start index (inclusive). Defaults to 0 if omitted.`<br />`end: The zero-based end index (exclusive). Defaults to the end of the string if omitted.`<br />`)`                                                                                                                 |
| To string            | Returns a text representation of a value.                                                                                                                                      | `tostring`<br />`(`<br />`value:`<br />`The value to convert to text.`<br />`)`                                                                                                                                                                                                                                                                                  |

:::hint{type="info"}
Function calls are written `functionname(arg1, arg2, ...)` or `functionname(name1: value1, name2: value2, ...)`.

Function names are case-insensitive and ignore underscores: `datediff`, `DateDiff`, and `DaTe_DiFf` are all the same function (and will be autoformatted to `datediff`).
:::

All functions come with inline syntax definitions and guidelines in-app. You can click on a function to view the function definition and further guidance on how to use it.&#x20;

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/DQ8CwTtwelBU2q_Jd86Df_default-total-compensation-calculated-field-acent-ashby-2026-03-19-at-110029-am.jpg)

You can click on a field you're pulling a value from to view the full field name for reference.

![](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/tmp6DiKPZSUKfIvNqrzUq-20260319-101412.jpg)

## Operator precedence

Operations are evaluated in the following order, with operations in the same group evaluated in the order they appear in the expression:

- `(parenthesized groups)`
- `function_calls()`
- `x`
- `a * b, a / b`
- `a + b, a - b`
- `a within b`
- `a = b`, `a ≠ b`, `a is b`, `a isnot b`, `a < b`, `a > b`, `a ≤ b`, `a ≥ b`
- `not x`
- `a and b`, `a or b`

## Copying fields to build a formula outside of Ashby

You can copy fields within the formula field editor and paste them into a spreadsheet or other script to generate your formula prior to pasting it back into the editor.

When copying and pasting your field, it will appear in a different format to how it shows in Ashby. This ensures that when you paste your formula back into the editor, that the correct field is selected.

So, for example, if you’re copying the \{Employment Type} field, it would show as follows when you paste it: `$(ValueSelect,job.employment_type)`. When pasting your formula back into the formula field editor, it be auto-detected and show as a linked Ashby field.&#x20;

![The Formula Field editor showing a correctly linked Ashby field.](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/KgxNcMVkUdnoHpqLophz3_formula-fields-linked-pasted-field.jpg "If the field shows in blue, it is successfully linked to an Ashby field.")

If you were instead to paste in \{Employment Type} without copying the field from Ashby, the field wouldn’t show as a linked Ashby field. It would be treated as plain text.

![The Formula Field editor showing an incorrectly linked Ashby field.](https://api.archbee.com/api/optimize/0p8tQ--ZZOxRtkVp6Qr-e/hGgqJLM8pwJ9-qKgICOCb_formula-fields-incorrectly-pasted-field.jpg "If the field is not showing in blue, it is not connected to an Ashby field.")

