# refreshSuggestions

mutation · in the family [Work and notes](/reference/work-and-notes/)

## What it does

Ask the suggestions desk to look now — it runs every active detector for one organization and refreshes the offers.

Run the suggestions desk for ONE organization: every ACTIVE (non-parked) declared skill's detector runs over bounded live reads (low_stock = the buy suggester · stock_imbalance = the rebalance suggester · aging_approvals = the scratchpad review roster; deterministic — zero AI calls v1) and the desk reconciles — the per-skill schema rows ensure-mint, past-due open offers expire (the shared flip), and fresh findings mint AUTHORLESS under the evidence-set dedup law (an identical open twin skips; changed content supersedes + re-mints; a declined twin with identical content holds for the offer window — the learning signal; a TAKEN twin with identical content holds while its born scratchpad still lives — the walk is the reminder, a second take would fork the work). Bounded ≤32 mints/org/UTC-day + ≤64 open/org + ≤8 candidates/skill — EVERY clip and skip is counted in the result, and a faulting detector lands in skillFaults while the other skills still run (bulkheaded). The organization must be yours and ACTIVE. Requires authentication. Template class (universal staff work — the OFFER law gates what the refresher then sees).

## What happens

The desk reads live data (stock positions, review holds), expires lapsed offers, and creates new ones where a detector found something — each with its evidence and a drafted plan. Duplicates are skipped, changed findings replace their stale offer, and daily/open bounds cap how many can appear; the reply counts everything it did and everything it skipped. Nothing else changes.

## Careful

Parked schemas never run — reactivate one first if a detector seems silent.

## Who may call it

Capability area: **Work and notes** — Tasks, notes, messages, dashboards and the everyday tools every staff member keeps.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows `api:refreshSuggestions`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `organizationId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |

## Returns

[RefreshSuggestionsResult](/types/RefreshSuggestionsResult/) `RefreshSuggestionsResult!` — The desk refresh outcome: minted = fresh offers born · superseded = stale offers closed for changed content · expired = past-due opens flipped · skippedDuplicate = identical open twins (the evidence-set dedup law) · skippedDeclined = the learning signal held · skippedTaken = the living-walk hold · skippedCapped = the per-skill/per-day/open bounds · schemasEnsured/doomedHeld = the v2 registrations minted / held permanently killed · parkedSkills = detectors the org has parked (they never ran).

## Example request

```graphql
mutation ExampleRefreshSuggestions($organizationId: ID!) {
  refreshSuggestions(organizationId: $organizationId) {
    minted
    superseded
    expired
    skippedDuplicate
    skippedDeclined
    skippedTaken
    skippedCapped
    schemasEnsured
    doomedHeld
    parkedSkills
  }
}
```

Variables:

```json
{
  "organizationId": "01900000-0000-7000-8000-44b781470000"
}
```

Send it with the envelope naming the version: `"extensions": {"at": {"version": {"name":"genesis","number":0}}}`.

## Example response

```json
{
  "data": {
    "refreshSuggestions": {
      "minted": 1,
      "superseded": 1,
      "expired": 1,
      "skippedDuplicate": 1,
      "skippedDeclined": 1,
      "skippedTaken": 1,
      "skippedCapped": 1,
      "schemasEnsured": 1,
      "doomedHeld": 1,
      "parkedSkills": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
- `CONFLICT/*` — The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. ([CONFLICT](/errors/CONFLICT/))
- `VALIDATION/VERSION_REQUIRED` — The request did not say which app version it came from. ([VALIDATION](/errors/VALIDATION/))

## Used in

- [Act on the desk’s suggestions](/use-cases/act-on-suggestions/)
