AlmondTill/G3N API

Tune the desk’s detectors

The desk runs detectors over your own data — see which ones run for your organization, park one you no longer want offers from, bring it back, or retire it for good.

Work · a play in 2 steps.

The steps

  1. See the detectors and where each stands for your organization. — suggestionSchemas
  2. Park a detector — existing offers stay until they expire or close — bring it back, or retire it permanently. — transitionSuggestionSchema

The calls

Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.

suggestionSchemas

suggestionSchemas — query · The suggestion schema list — each entry is a suggestion schema — one detector the desk runs (or is parked from running) for your organization.

Example request

query ExampleSuggestionSchemas($filter: FilterInput) {
  suggestionSchemas(filter: $filter) {
    items {
      id
      sysId
      type
      caption
      status
      parentId
      rootId
      createdAt
      updatedAt
      revisionNum
      revision
      skill
    }
    nextToken
    matchCount
  }
}

Variables:

{
  "filter": {
    "clauses": [
      {
        "field": "caption",
        "op": "contains",
        "values": [
          "Blue"
        ]
      }
    ]
  }
}

Example response

{
  "data": {
    "suggestionSchemas": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "sysId": "SS-EXMP-0000-000F",
          "type": "SuggestionSchema",
          "caption": "Blue jeans",
          "status": "active",
          "parentId": "01900000-0000-7000-8000-065235280000",
          "rootId": "01900000-0000-7000-8000-a093dd800000",
          "createdAt": "2027-01-31T00:00:00.000Z",
          "updatedAt": "2027-01-31T00:00:00.000Z",
          "revisionNum": 1,
          "revision": "01900000-0000-7000-8000-b7960e180000",
          "skill": "<skill>"
        }
      ],
      "nextToken": "<the cursor from the previous page>",
      "matchCount": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

transitionSuggestionSchema

transitionSuggestionSchema — mutation · Park, reactivate, or permanently retire one of the desk's detectors for your organization.

Example request

mutation ExampleTransitionSuggestionSchema($id: ID!, $revision: ID!, $op: SuggestionSchemaTransitionOp!, $reason: String) {
  transitionSuggestionSchema(id: $id, revision: $revision, op: $op, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    skill
  }
}

Variables:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "op": "park",
  "reason": "Correcting a miscount."
}

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

Example response

{
  "data": {
    "transitionSuggestionSchema": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "SS-EXMP-0000-000F",
      "type": "SuggestionSchema",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "skill": "<skill>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}