Preview Entity Type Field Formula
Check a formula for an entity type field without saving it. Returns compile_error when the formula is invalid for the field’s data type, and the field IDs it reads. Pass entity_id to also evaluate it on that entity: value is the result, or runtime_error says why it failed. Set default_formula to check it as a create-time default. Nothing is written. Evaluating on an entity requires access to every field the formula reads there. Formulas are CEL over the entity’s own fields, each named by its key with hyphens written as underscores (item-cost is item_cost). An empty field is null: test it with has(x) or supply a fallback with x.orValue(d). A single-target ENTITY_REF field reads one level through the reference (owner.email); an ENUM field reads as . Functions: join_nonempty(sep, list), round(x), round(x, digits), string, today(), days_between(a, b), lower, upper, the ? : operator, and the exists and all macros. A computed field may read another computed field only when that one reads none, cycles are refused, and a formula reads at most 10 referenced fields. FILE and MULTI_SELECT fields cannot be read or produced.
Authentication and permissions
Token requirements: User-based token (OAuth) or Organization-scoped API key or Team-scoped API key. Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.
- Check a field’s formula in a team’s database: The permission is checked on the team that owns the field’s database. Previewing on an entity also requires access to that entity and to every field the formula reads on it.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the output entity type field. Its data type is the type the formula must produce.
Body
Response
Success
Why the formula does not compile. Unset when it compiles.
Why evaluating on entity_id failed. A saved formula leaves the field empty on such a record.
The result on entity_id: a string, number or bool, an RFC 3339 timestamp, or the option ID for an ENUM output. Unset when the result is empty, evaluation failed, or entity_id was omitted.
The entity type field IDs on this type the formula reads.

