AlmondTill/G3N API

On this page

agentChannelCatalogProduct

query · in the family Reading your records

What it does

One listed product as an agent sees it in full — its variants narrowed by chosen options, each option value marked available or not.

THE AGENT CATALOG — product detail: one identifier (product · variant · SKU · barcode) → the listed product with its variants narrowed by the effective selections (a variant identifier fixes them; else the request's selected, relaxed from the END of preferences until a variant matches), every option value marked available/exists relative to them. product is null when nothing listed matches. The same principal law as the search.

What happens

Reads only.

Who may call it

Capability area: Reading your records — Looking up and listing the records of your organization.

Arguments

NameTypeRequiredNotes
agentChannelIdID ID!yesNo further notes.
idString String!yesThe id of the record.
selectedAgentCatalogSelectedOptionInput [AgentCatalogSelectedOptionInput!]noNo further notes.
preferencesString [String!]noNo further notes.

Returns

AgentChannelCatalogDetail AgentChannelCatalogDetail! — The agentChannelCatalogProduct answer — null product when the identifier resolves to nothing listed; selected = the effective selections after relaxation; options carry available/exists relative to them.

Example request

query ExampleAgentChannelCatalogProduct($agentChannelId: ID!, $id: String!, $selected: [AgentCatalogSelectedOptionInput!]) {
  agentChannelCatalogProduct(agentChannelId: $agentChannelId, id: $id, selected: $selected) {
    truncated
  }
}

Variables:

{
  "agentChannelId": "01900000-0000-7000-8000-d23fae740000",
  "id": "<id>",
  "selected": [
    {
      "name": "Blue jeans",
      "label": "Blue jeans",
      "id": "01900000-0000-7000-8000-37386ae00000"
    }
  ]
}

Example response

{
  "data": {
    "agentChannelCatalogProduct": {
      "truncated": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer