# Problem methods: notify, rank, suggest, vote

URL: /code/sdk/problem/verbs · Id: `page:code/sdk/problem/verbs`

> The Problem Verbs notify, rank, suggest, vote as typed SDK methods, with inputs, result, refusals and an example.

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

### Problem.notify
Notify tells every Contact who voted on a Problem that a Version addressing it shipped, with a link to the change. [Verb page](/business/nouns/problem/notify?interface=sdk).

```ts
interface ProblemVerbs {
  notify(input: ProblemNotifyInput, options?: SB.CallOptions): SB.Call<Problem>
}
```

Emits [`Problem.notified`](/business/events/Problem.notified).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `problem` | [Problem](/business/nouns/problem) | Yes | The Problem the Version addresses. |
| `version` | [Version](/business/nouns/version) | No | The Version that shipped. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `problem` | [Problem](/business/nouns/problem) | Yes | The Problem, marked addressed. |

**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. |

**Example**

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

const problem = await $.Problem.notify({ problem: 'problem_UzvXXfKsJB' })
```

### Problem.rank
Rank orders Problems by revenue at stake, Evidence grade and effort, so the next Project addresses the top one. [Verb page](/business/nouns/problem/rank?interface=sdk).

```ts
interface ProblemVerbs {
  rank(input?: ProblemRankInput, options?: SB.CallOptions): SB.Call<Problem[]>
}
```

Emits [`Problem.ranked`](/business/events/Problem.ranked).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `icp` | [ICP](/business/nouns/icp) | No | The ICP whose Problems to rank; omitted, every ICP. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `problems` | list of [Problem](/business/nouns/problem) | Yes | Problems, highest first, each with its score. |

**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. |

**Example**

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

const problems = await $.Problem.rank({ icp: 'icp_EwhsJU4AOW' })
```

### Problem.suggest
Suggest records a Customer’s ask for something the Product lacks as Evidence on a Problem, with the asker attached. [Verb page](/business/nouns/problem/suggest?interface=sdk).

```ts
interface ProblemVerbs {
  suggest(input: ProblemSuggestInput, options?: SB.CallOptions): SB.Call<ProblemSuggestOutput>
}
```

Emits [`Problem.suggested`](/business/events/Problem.suggested).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | `text` | Yes | The ask, in the asker’s words. |
| `problem` | [Problem](/business/nouns/problem) | No | The Problem it bears on; an Agent maps it when the asker names none. |
| `via` | `string` | No | Where it was asked: an App, the Portal, or an Agent’s answer. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `evidence` | [Evidence](/business/nouns/evidence) | Yes | The Evidence, Opinion grade, with `askedBy` set. |
| `problem` | [Problem](/business/nouns/problem) | Yes | The Problem with the new Evidence attached. |

**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. |

**Example**

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

const { evidence, problem } = await $.Problem.suggest({ text: 'Example text' })
```

### Problem.vote
Vote records a Contact saying a Problem on the public board is theirs too, with their words kept as Evidence. [Verb page](/business/nouns/problem/vote?interface=sdk).

```ts
interface ProblemVerbs {
  vote(input: ProblemVoteInput, options?: SB.CallOptions): SB.Call<Problem>
}
```

Emits [`Problem.voted`](/business/events/Problem.voted).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `problem` | [Problem](/business/nouns/problem) | Yes | The Problem. |
| `contact` | [Contact](/business/nouns/contact) | Yes | Who votes. |
| `words` | `text` | No | What they said, in their own words. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `problem` | [Problem](/business/nouns/problem) | Yes | The Problem, with the vote counted. |

**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. |

**Example**

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

const problem = await $.Problem.vote({ problem: 'problem_UzvXXfKsJB', contact: 'contact_WsrosCQi6J' })
```