# Hubspot preset

HubSpot's CRM and automation objects, as entity kinds. Pass to EntityKindsProvider: `<EntityKindsProvider kinds={hubspotKinds}>`. Each noun is HubSpot's own word: contacts, companies, deals and tickets are its standard CRM objects, a property is a field on a record, a workflow is an automation, and `list` shows as "Segment" because HubSpot's help centre now calls lists segments ("previously called lists"; its API still says lists).

- Registry name: `hubspot-preset` (`@candor/hubspot-preset`)
- Tier: Pro. Installing it needs a Pro, Premium or Team licence key: the person runs `npx candor-ui key <key>` themselves; never ask for the key in chat or write it to a file.
- Docs: https://candor.themethodic.com/docs/hubspot-preset

## Install

```bash
npx candor-ui add hubspot-preset
```

Run `npx candor-ui@latest init` once first (https://candor.themethodic.com/get-started.md). Without the CLI: `npx shadcn@latest add @candor/hubspot-preset`.
It brings in: entity-chip, fill-strings, tokens.
npm packages: lucide-react@^1.67.0.

## Example

```tsx
"use client"

import { EntityChip, EntityKindsProvider } from "@/components/candor/entity-chip"
import { hubspotKinds } from "@/components/candor/hubspot-preset"

export default function Example() {
  return (
    <EntityKindsProvider kinds={hubspotKinds}>
      <p className="flex max-w-lg flex-wrap items-center gap-2 text-sm">
        <EntityChip entity={{ kind: "contact", name: "Dana Reyes" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "company", name: "Northwind Traders" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "deal", name: "Renewal 2027" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "ticket", name: "Login loop on mobile" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "workflow", name: "Lead routing" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "property", name: "lifecycle_stage" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "list", name: "Open renewals" }} onOpen={() => {}} />
      </p>
    </EntityKindsProvider>
  )
}
```

## Values

### hubspotKinds

```ts
const hubspotKinds: Record<string, EntityKindInfo>
```

### hubspotNouns

HubSpot's nouns for LocaleProvider's `nouns`: an environment is a HubSpot account.

```ts
const hubspotNouns: Partial<NounTable>
```

## Rules for using Candor UI

- Components take plain typed data. Never pass model output as HTML or render it as a link; messages are typed blocks.
- A control that can't be used says why: wrap it in `<Locked reason="…">`, don't just disable it.
- Don't show a value you don't have: leave it out (it renders as —) rather than guess. An estimate is labelled as one.
- Nothing is pre-selected in a decision a person makes, and the agent is named from your app's data, never from model output.
- Your app's words go in `LocaleProvider`: its fixed strings in `strings`, its nouns in `nouns`; entity kinds and agent roles in `EntityKindsProvider` and `AgentRolesProvider`.
