AlmondTill/G3N API

On this page

refreshSuggestions

mutation · in the family 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.

Arguments

NameTypeRequiredNotes
organizationIdID ID!yesNo further notes.

Returns

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

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

Variables:

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

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

Example response

{
  "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

Used in