AlmondTill/G3N API

On this page

allocationSuggestions

query · in the family Reading your records

What it does

Suggestions for pushing genuine excess stock from a hub out to your stores, shared fairly by each store’s weight.

THE PUSH SUGGESTER: the hub's genuine excess fair-shared across OTHER LFs holding the variant by their resolved allocationWeight (largest remainder, deterministic); destinations with no resolved weight land in gaps as no-weights; never-lanes out of the hub drop their destination. Transfer-SHAPED payloads (push semantics — the.1 doc; lines name the SOURCE InventoryItem). DERIVED at read. Requires authentication.

What happens

Reads your stock and answers ready-to-use transfer drafts — nothing moves until you create the transfers.

Careful

None to run — a read. Acting on a suggestion creates real transfers, which reserve stock.

Who may call it

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

Arguments

NameTypeRequiredNotes
sourceLogicalFacilityIdID ID!yesNo further notes.
variantIdsID [ID!]noNo further notes.

Returns

AllocationSuggestionsResult AllocationSuggestionsResult! — The allocationSuggestions result.

Example request

query ExampleAllocationSuggestions($sourceLogicalFacilityId: ID!, $variantIds: [ID!]) {
  allocationSuggestions(sourceLogicalFacilityId: $sourceLogicalFacilityId, variantIds: $variantIds) {
    transfers {
      sourceLogicalFacilityId
      destinationLogicalFacilityId
      annotations
    }
  }
}

Variables:

{
  "sourceLogicalFacilityId": "01900000-0000-7000-8000-4971feb30000",
  "variantIds": [
    "01900000-0000-7000-8000-367b16580000"
  ]
}

Example response

{
  "data": {
    "allocationSuggestions": {
      "transfers": [
        {
          "sourceLogicalFacilityId": "01900000-0000-7000-8000-4971feb30000",
          "destinationLogicalFacilityId": "01900000-0000-7000-8000-3885245e0000",
          "annotations": [
            "<annotations>"
          ]
        }
      ]
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer