# Deal methods: propose, win

URL: /code/sdk/deal/verbs-propose · Id: `page:code/sdk/deal/verbs-propose`

> The Deal Verbs propose, win as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Deal](/business/nouns/deal), one group of [Deal methods](/code/sdk/deal).

### Deal.propose
Propose sends a Deal’s buyer a Quote they accept to place an Order. [Verb page](/business/nouns/deal/propose?interface=sdk).

```ts
interface DealVerbs {
  propose(input: DealProposeInput, options?: SB.CallOptions): SB.Call<Deal>
}
```

Emits [`Deal.proposed`](/business/events/Deal.proposed).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `deal` | [Deal](/business/nouns/deal) | Yes | The qualified Deal. |
| `quote` | [Quote](/business/nouns/quote) | Yes | The Quote to send. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `deal` | [Deal](/business/nouns/deal) | Yes | The Deal with its Quote out. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const deal = await $.Deal.propose({ deal: 'deal_NgACZ6DcII', quote: 'qt_GZnH5OK100' })
```

### Deal.win
Win closes a Deal as won, which places its Order and makes the buyer a Customer. [Verb page](/business/nouns/deal/win?interface=sdk).

```ts
interface DealVerbs {
  win(input: DealWinInput, options?: SB.CallOptions): SB.Call<DealWinOutput>
}
```

Emits [`Deal.won`](/business/events/Deal.won).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `deal` | [Deal](/business/nouns/deal) | Yes | The proposed Deal. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The placed Order. |
| `deal` | [Deal](/business/nouns/deal) | Yes | The Deal, now won. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | [`refused`](/code/api/errors/refused) | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const { order, deal } = await $.Deal.win({ deal: 'deal_NgACZ6DcII' })
```