# Use attributes and events

Store custom data on customers and companies, understand trusted vs. untrusted values, and track customer events for audiences.

Open **Settings → Attributes** to define custom fields for customers and companies and see the events your app tracks.

## Attribute rules and limits

- **Key format:** starts with a lowercase letter, followed by up to 63 lowercase letters, digits, or `_`. Cannot match built-in fields like `email`, `name`, or `created_at`.
- **Types:** **Text**, **Number**, **Yes or no**, **Date**, or **List** (1 to 200 items). Types cannot change after creation.
- **Date formats:** ISO 8601 strings, or Unix timestamps in seconds or milliseconds.
- **Auto-created keys:** writing an unknown key creates it based on the value's type. Keys ending in `_at` become dates.
- **Type mismatches:** invalid values are dropped and shown under **Dropped values** for 30 days.
- **Limits:** up to 500 active attributes each for people and companies, 100 keys per record, no nested objects.
- **Archive vs. delete:** archiving blocks new writes while keeping old values (blocked if an audience or workflow still uses it). Deleting removes every stored value.

## Where attribute values come from

- Your backend via the REST API or a [CSV import](/customers/import/).
- The `custom_attributes` claim inside a signed [identity token](/developers/messenger/identity-verification/).
- A teammate editing the profile in dimmi.
- Your site's messenger script, for people attributes with **Set from your site** turned on (up to 20 attributes workspace-wide).

## Trusted vs. browser values

Values sent from the browser messenger are untrusted because any visitor can modify client-side code. Values from your API, identity tokens, imports, or teammates are trusted.

Security-sensitive features only read trusted values:

- Audiences controlling who can start a conversation or view [restricted articles](/help-center/limit-articles/).
- Bound attributes passed by the dimmi agent to your [actions](/ai/actions/).

## Customer events

Send events from your app or site (see [Track customer events](/developers/messenger/track-events/)). dimmi tracks each event's count, first occurrence, and latest occurrence per customer, so [audiences](/customers/audiences/) can match rules like "`order.placed` at least 3 times in the last 30 days."

- **Event names:** up to 1,000 unique names per workspace, created automatically on first use.
- **Timestamps:** can be backdated up to 30 days. Timestamps older than 30 days or more than 1 hour in the future clamp to the nearest allowed time.
- **Archived events:** stop accepting new events while keeping existing counts active for audience rules.
- **Merged customers:** event counts combine automatically when two customers merge.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
