> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getswan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom objects

> Your own kinds of records beside companies and contacts. How Swan creates them, the field types, when a field holds several values or a JSON list, what's fixed once defined, and the limits.

A custom object is a kind of record you define for what companies and contacts don't cover: deals, partner applications, event attendees, the signals an automation collects, or a ledger of what it already handled. Each record has typed fields and can point to a company, a contact, or another record.

## Creating and changing them

There's no settings screen for custom objects. Ask Swan in chat ("track partner applications with the partner's company, a status and the date they applied"), or let an automation define the object it needs. Swan picks the field types, and it reuses an object that already holds that kind of record rather than making a near-duplicate. Agents connected through [Swan's MCP server](https://docs.getswan.com/integrations/connect-your-agent-to-swan.md) do the same with `swan-define-object`.

* **Adding** a field, or an option to a select or status field, works at any time.
* **Fixed once defined:** a field's type, whether it's unique, and whether it holds several values. To change one, Swan adds a new field under another name.
* **A unique field**, such as an ID from another system, lets an automation that runs again update the same record instead of creating a duplicate.
* **Deleting an object** works only once it has no records and no lists. It needs an Admin, Swan asks for approval first, and it frees a place under the object limit.

## Where you see them

Custom objects don't have a page of their own in the app yet.

* A record that points to a company or contact shows under **Associated records** on that account's or contact's page, grouped by object.
* A [list](https://docs.getswan.com/data/tags-lists-and-exclusions.md#lists) can hold one custom object's records, with its own page, filters and sorting.
* Swan reads them in chat and in automations: "which partner applications are still pending?" runs as one query over the object.

Swan keeps every earlier value of a field, with when it changed, who or what changed it, and the run that did. Ask what a record looked like last week and Swan reads that history.

## Field types

| Type | Holds |
| - | - |
| Text | Text, up to 50,000 characters |
| Number, Currency | A number; a currency field has one currency, set when it's defined |
| Checkbox | Yes or no |
| Date, Timestamp | A day, or a moment in time |
| Select, Status | One option from a set list; a status's options are ordered, like pipeline stages |
| URL, Email, Phone | A link, an email address or a phone number |
| User | A member of your organization |
| Record | A company, a contact, or another record |
| JSON | One item, or a list of items, each with its own named fields (see below) |

## Fields that hold several things

| You're storing… | Use |
| - | - |
| Plain values, such as tags or job titles | A field that holds several values. They come back in no set order. |
| Values whose order matters, such as next steps by priority | A JSON list: items keep the order they were written in |
| Existing companies, contacts or records | A record field that holds several values |
| Items shown together on their one record, such as a score breakdown or the last few replies | A JSON field |
| Things with their own status or edits, or that you count across records | Their own custom object, each record pointing back |
| A group of existing records with notes on each entry | A [list](https://docs.getswan.com/data/tags-lists-and-exclusions.md#lists) |
| Prose context about one record | The record's [memory](https://docs.getswan.com/knowledge-and-skills/memory.md), not a field |

## JSON fields

A JSON field holds one item (a score breakdown) or a list of items (the last few replies) as one value, and reads back as structured data rather than text. Each item has named fields, each of a simple type: text, number, checkbox, date, timestamp, URL or email.

* **Item fields are fixed.** A write that sends a field the JSON field doesn't define is rejected, and Swan is told which fields exist. Swan can add an item field at any time. Removing one deletes it from every record, and each record's history keeps the version that had it.
* **Lists keep their order.** An empty list or item is stored as no value.
* **Read whole, not grouped.** Swan can find records by what their items contain, but it can't group or count by a field inside the items across records. If you need "signals by type, across all accounts", the signals belong in their own object.
* **Limits:** up to 20 item fields, and up to 200 items and 15,000 characters per value. A JSON field can't be unique, hold several values, or have a default value.

Before JSON fields existed, automations often stored lists as JSON text in a text field. Swan now flags that when it happens, so the automation can switch to a JSON field.

## Companies and contacts

Companies and contacts are built in, and you can't add your own fields to them yet. The exception is your ICP segments, which are the companies' target-market options (see [ICP, personas, and the funnel](https://docs.getswan.com/data/icp-personas-and-funnel.md)). To keep more about a company, use a custom object whose records point to it, or a list's own fields.

## Limits

* 30 custom objects per organization; companies and contacts don't count
* 200 fields per object
* 50,000 records per object, and 200,000 across all of an organization's custom objects
* 1,000 options per select or status field, and 1,000 values in one field that holds several
* 1 MB per record, all of its fields together

## Common questions

**Why can't I change a field's type?**
Stored values, and every automation and app that reads or writes them, depend on it. Ask Swan to add a field with the type you want; it can fill the new field from the old one.

**Does a field with several values keep the order they were written in?**
No, they come back in no set order. For ranked or ordered values, use a JSON list.

**My automation saves a list as text. Should it be a JSON field?**
If the list is shown with its one record and not counted across records, yes. A text field can't change type, so ask Swan to add a JSON field and switch the automation to it. If the items are counted or grouped across records, they belong in their own custom object instead.

**Can I open a custom object's record on its own page?**
Not yet. You see its records on the companies and contacts they point to, in lists, and through Swan.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.