# suggestedActions

query · in the family [Your own session](/reference/your-own-session/)

## What it does

The likely next actions for one record, based on where it is in its lifecycle — ranked, and limited to what you may actually do.

The target's likely-next actions: with a construct id, the record's LIVE status × the registry's realized ops, ranked by the curated per-type×state order; WITHOUT one, the family's BIRTH op (record-creating acts surface as suggestions, never as fixed links). Either way filtered to what YOU may actually perform (capability + descriptors — a suggestion you cannot take is never returned). A given target must exist in YOUR tenant (a foreign/unknown target refuses NOT_FOUND — the revisions gate); a terminal record answers its honest remainder (usually empty). Ranked server-side — render verbatim. Requires authentication.

## What happens

Read-only. The list already reflects your permissions; an action you cannot take is never shown.

## Who may call it

Capability area: **Your own session** — What every signed-in person may do for themselves — their session, their profile and their own work.

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

## Arguments

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

## Returns

[SuggestedAction](/types/SuggestedAction/) `[SuggestedAction!]!` — One suggested next action: a LIVE wire operation the CALLER may actually perform on the target, ranked by the curated per-type×state order. Render VERBATIM — the server already filtered and ranked (no client filtering by construction).

## Example request

```graphql
query ExampleSuggestedActions($targetType: String!, $targetConstructId: ID) {
  suggestedActions(targetType: $targetType, targetConstructId: $targetConstructId) {
    op
    why
  }
}
```

Variables:

```json
{
  "targetType": "<target type>",
  "targetConstructId": "01900000-0000-7000-8000-79e077380000"
}
```

## Example response

```json
{
  "data": {
    "suggestedActions": [
      {
        "op": "<op>",
        "why": "<why>"
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "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/))
