# Targets

> Goals per period for a member, a team or the organization, with progress the database computes for won deals, completed work items and paid invoices, or a value the app keeps.

- Category: CRM & sales
- Module: `goals`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/goals
- Page: https://bettersupabase.com/blocks/goals

## Install

```bash
npx better-supabase add goals
```

The command also installs `updated-at`, `memberships`, `permissions`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by goals; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    // Modes: "managed", "custom". The default is "managed".
    goals: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/goals`.

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md)

Works with: [deals](https://bettersupabase.com/blocks/deals.md), [tasks](https://bettersupabase.com/blocks/tasks.md), [invoices](https://bettersupabase.com/blocks/invoices.md)

## Recipes

- [Targets progress](https://bettersupabase.com/recipes/targets-progress.md): Sales targets for the period with the progress toward each one.
