AlmondTill/G3N API

On this page

replenishmentSuggestions

query · in the family Reading your records

What it does

What to reorder — suggested purchase quantities from your sales pace and stock levels.

THE BUY SUGGESTER: scope REQUIRED bounded (EXACTLY one of logicalFacilityId ⊕ organizationId; optional orgVendorId/categoryId/styleId/variantIds narrows). Per ACTIVE stocked junction in scope: position = available + in_transit + on-order (the expectedReceipts walk; held/damaged excluded) vs the resolved min/safety/days-of-supply levels; deficits round UP through the effective MOQ + reorder multiple (pack/forced — the machinery) and group by OrgVendor into DRAFT-PO-SHAPED payloads (realization-ready VERBATIM for createPurchaseOrder, which re-gates authoritatively — the engine never outruns the gates). orderMinimum shortfalls are ANNOTATED, never padded. URGENT deficits (velocity-dependent) couple into transfer-now + backfill-PO pairs. Books with no live OVI land in gaps as no-ovi. DERIVED at read, never stored. Requires authentication.

What happens

Reads only — nothing is ordered until you create the purchase orders.

Who may call it

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

Arguments

NameTypeRequiredNotes
logicalFacilityIdIDnoNo further notes.
organizationIdIDnoNo further notes.
orgVendorIdIDnoNo further notes.
categoryIdIDnoNo further notes.
styleIdIDnoNo further notes.
variantIdsID [ID!]noNo further notes.

Returns

ReplenishmentSuggestionsResult ReplenishmentSuggestionsResult! — The replenishmentSuggestions result.

Example request

query ExampleReplenishmentSuggestions($logicalFacilityId: ID) {
  replenishmentSuggestions(logicalFacilityId: $logicalFacilityId) {
    purchaseOrders {
      orgVendorId
      organizationId
      currency
      estimatedTotal
      orderMinimum
      orderMinimumShortfall
      annotations
    }
  }
}

Variables:

{
  "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000"
}

Example response

{
  "data": {
    "replenishmentSuggestions": {
      "purchaseOrders": [
        {
          "orgVendorId": "01900000-0000-7000-8000-f885fa720000",
          "organizationId": "01900000-0000-7000-8000-44b781470000",
          "currency": "USD",
          "estimatedTotal": "10.00",
          "orderMinimum": "<order minimum>",
          "orderMinimumShortfall": "<order minimum shortfall>",
          "annotations": [
            "<annotations>"
          ]
        }
      ]
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in