# Salesforce preset

Salesforce's metadata and data, as entity kinds. Pass to EntityKindsProvider: `<EntityKindsProvider kinds={salesforceKinds}>`.

- Registry name: `salesforce-preset` (`@candor/salesforce-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/salesforce-preset

## Install

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

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

## Example

```tsx
"use client"

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

export default function Example() {
  return (
    <EntityKindsProvider kinds={salesforceKinds}>
      <p className="flex max-w-lg flex-wrap items-center gap-2 text-sm">
        <EntityChip entity={{ kind: "object", name: "Opportunity" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "field", name: "Opportunity.StageName" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "flow", name: "Renewal reminder" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "apex", name: "RenewalService" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "permissionSet", name: "Sales operations" }} onOpen={() => {}} />
        <EntityChip entity={{ kind: "report", name: "Pipeline by stage" }} onOpen={() => {}} />
      </p>
    </EntityKindsProvider>
  )
}
```

## Values

### salesforceKinds

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

## 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`.
