Skip to content

Try “workflows”, “templates”, “SOQL” or “create a record”.

Objects and fields

Design objects that match your business, with 28 field types, lookups and formulas.

Objects are the tables of your business: what you track and how it relates. You design them in Settings → Objects, and every other part of klerc picks them up straight away.

System and custom objects#

Two objects ship with every workspace: Person and Company. They're system objects, so they can't be deleted, but you can add fields to them like any other object.

Everything else is custom. Create an object with New object and give it a name, a plural name and an icon. The objects list shows each object's field count and a switch to turn it on or off. A switched-off object disappears from the sidebar without losing its data.

Field types#

klerc has 28 field types.

GroupField types
Texttext, longtext, richtext
Numbersnumber, decimal, currency, percent
Dates and timesdate, datetime, time
Contactemail, url, phone
Choicesboolean, select, multi-select, rating
Relationslookup, lookup-many
Peopleuser, user-many, team, team-many
Filesfile, file-many
Placeslocation, address
Computedformula

Each field can be marked required, unique, indexed or hidden, and choice fields carry their list of options. Select fields show as coloured badges in tables. Address fields autocomplete and take a draggable map pin. Phone numbers are stored with their country code and shown in your organisation's format.

Relating objects#

Use a lookup to point a record at one record of another object — a policy's insurer, a patient's referring doctor. Use lookup-many when there can be several. Related records show up on each other's record pages, and SOQL can follow the relation with parent paths.

Formulas#

A formula field computes its value from other fields. The language is Salesforce-compatible and has more than 50 functions. Formulas are checked on the server when you save the field and evaluated when a record is read, so they're never stale.

A commission formula on a policy might look like this:

formula
IF(  ISBLANK(premium),  0,  premium * IF(type = "Motor", 0.15, 0.12))

Designing well#

  • Name fields the way your team talks. The field's key, such as expiry_date, is what merge fields, formulas and the API use.
  • Put fields that only matter to one process on the flow, not the object. See Pipelines.
  • Prefer a lookup to a text field whenever the value is itself something you track.

Through the API#

Object schemas are available under /docs/api/objects:

  • GET /objects lists them;
  • POST /objects creates one from name, pluralName, slug and description;
  • PATCH /objects/{id} updates an object's schema and fields.

Schema changes need the objects:manage scope.

json
{  "name": "Policy",  "pluralName": "Policies",  "slug": "policy",  "description": "One insurance policy we manage for a customer"}