AlmondTill/G3N API

Stock arrives — from purchase order to the shelf

How goods enter your business on paper and in fact: you order from a vendor, the order is approved and issued, and when the boxes arrive a receipt records exactly what came in — your stock figures move only when the receipt posts.

Procurement · a guided walk in 4 steps.

In the office

Raise the purchase order for the core range you reorder every month, see it approved and issued, and when the boxes reach the back room record the receipt and post it. The order is the agreement with the vendor; the receipt is what actually arrived; your stock figures move only when the receipt posts.

This walk starts wherever you are in the office.

Step 1. The order is the agreement — what you asked the vendor for, at what cost, for which location. Open Purchase orders and create one; add the lines you are ordering. Open Purchase orders.

Purchase orders — /purchase-orders
Purchase orders — /purchase-orders

Step 2. A submitted order goes to review; approval commits the spend; issuing sends it to the vendor — three separate decisions, each recorded. The order page offers each act when its moment comes. Open Purchase orders.

Step 3. The receipt is the arrival record — what actually came, against which order lines. Start a receipt for the order and capture the quantities that arrived. Open Receipts.

Receipts — /receipts
Receipts — /receipts

Step 4. Posting moves your stock figures — until then nothing is on hand; a mistaken receipt cancels instead. Post from the receipt page once the quantities are checked. Open Receipts.

What you see

Last month the example shop’s departments sold Alterations CAD 825.00 (25 units) · Bags CAD 6179.20 (42 units) · Belts & Small Goods CAD 3151.70 (52 units) · Bottoms CAD 18544.20 (132 units) · Dresses CAD 29829.20 (139 units) · Knitwear CAD 28519.50 (139 units) · Knitwear CAD 27629.20 (145 units) · Outerwear CAD 51839.50 (140 units) · Outerwear CAD 34813.90 (110 units) · Scarves & Hats CAD 2882.60 (43 units) · Shirts CAD 12625.20 (148 units) · Tops CAD 12704.60 (151 units) · Trousers CAD 18633.30 (141 units) · Total CAD 248177.10 (1407 units) — the sell-through the monthly core order replaces, line by line.

Try it

Walked with screenshots in the manager’s manual: chapter 1 — Order the month’s core stock — and receive it when it lands

For developers — the calls

The steps

  1. Raise the purchase order — The order is the agreement — what you asked the vendor for, at what cost, for which location. — createPurchaseOrder
  2. Submit, approve, and issue it — A submitted order goes to review; approval commits the spend; issuing sends it to the vendor — three separate decisions, each recorded. — submitPurchaseOrder, approvePurchaseOrder, issuePurchaseOrder
  3. Receive the goods — The receipt is the arrival record — what actually came, against which order lines. — createReceipt
  4. Post the receipt — Posting moves your stock figures — until then nothing is on hand; a mistaken receipt cancels instead. — postReceipt

The calls

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

createPurchaseOrder

createPurchaseOrder — mutation · Create a new purchase order — what you are buying from a supplier at your organization.

Example request

graphql
mutation ExampleCreatePurchaseOrder($input: CreatePurchaseOrderInput!) {
  createPurchaseOrder(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    orgVendorId
    currency
    paymentTerms
    incotermCode
    vendorReference
    notes
    lineCount
    openLineCount
    nextLineNo
    receivingReceiptId
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "orgVendorId": "01900000-0000-7000-8000-67df2a7f0000",
    "lines": [
      {
        "variantId": "01900000-0000-7000-8000-8433b0260000",
        "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000"
      }
    ]
  }
}

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

Example response

json
{
  "data": {
    "createPurchaseOrder": {
      "id": "01900000-0000-7000-8000-da3499da0000",
      "sysId": "PO-EXMP-0000-000F",
      "type": "PurchaseOrder",
      "caption": "Blue jeans",
      "status": "draft",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "orgVendorId": "01900000-0000-7000-8000-67df2a7f0000",
      "currency": "USD",
      "paymentTerms": "<payment terms>",
      "incotermCode": "BJ-001",
      "vendorReference": "<vendor reference>",
      "notes": "Restock before the weekend.",
      "lineCount": 1,
      "openLineCount": 1,
      "nextLineNo": 1,
      "receivingReceiptId": "01900000-0000-7000-8000-1c0205630000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

submitPurchaseOrder

submitPurchaseOrder — mutation · Send a purchase order to the vendor — the buy commitment goes out.

Example request

graphql
mutation ExampleSubmitPurchaseOrder($id: ID!, $revision: ID!, $reason: String) {
  submitPurchaseOrder(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    orgVendorId
    currency
    paymentTerms
    incotermCode
    vendorReference
    notes
    lineCount
    openLineCount
    nextLineNo
    receivingReceiptId
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-da3499da0000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

json
{
  "data": {
    "submitPurchaseOrder": {
      "id": "01900000-0000-7000-8000-da3499da0000",
      "sysId": "PO-EXMP-0000-000F",
      "type": "PurchaseOrder",
      "caption": "Blue jeans",
      "status": "pending_approval",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "orgVendorId": "01900000-0000-7000-8000-67df2a7f0000",
      "currency": "USD",
      "paymentTerms": "<payment terms>",
      "incotermCode": "BJ-001",
      "vendorReference": "<vendor reference>",
      "notes": "Restock before the weekend.",
      "lineCount": 1,
      "openLineCount": 1,
      "nextLineNo": 1,
      "receivingReceiptId": "01900000-0000-7000-8000-1c0205630000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

approvePurchaseOrder

approvePurchaseOrder — mutation · Approve a purchase order internally so it can be submitted.

Example request

graphql
mutation ExampleApprovePurchaseOrder($id: ID!, $revision: ID!, $reason: String) {
  approvePurchaseOrder(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    orgVendorId
    currency
    paymentTerms
    incotermCode
    vendorReference
    notes
    lineCount
    openLineCount
    nextLineNo
    receivingReceiptId
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-da3499da0000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

json
{
  "data": {
    "approvePurchaseOrder": {
      "id": "01900000-0000-7000-8000-da3499da0000",
      "sysId": "PO-EXMP-0000-000F",
      "type": "PurchaseOrder",
      "caption": "Blue jeans",
      "status": "issued",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "orgVendorId": "01900000-0000-7000-8000-67df2a7f0000",
      "currency": "USD",
      "paymentTerms": "<payment terms>",
      "incotermCode": "BJ-001",
      "vendorReference": "<vendor reference>",
      "notes": "Restock before the weekend.",
      "lineCount": 1,
      "openLineCount": 1,
      "nextLineNo": 1,
      "receivingReceiptId": "01900000-0000-7000-8000-1c0205630000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

issuePurchaseOrder

issuePurchaseOrder — mutation · Issue a purchase order — commit it into the buying pipeline.

Example request

graphql
mutation ExampleIssuePurchaseOrder($id: ID!, $revision: ID!, $reason: String) {
  issuePurchaseOrder(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    orgVendorId
    currency
    paymentTerms
    incotermCode
    vendorReference
    notes
    lineCount
    openLineCount
    nextLineNo
    receivingReceiptId
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-da3499da0000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

json
{
  "data": {
    "issuePurchaseOrder": {
      "id": "01900000-0000-7000-8000-da3499da0000",
      "sysId": "PO-EXMP-0000-000F",
      "type": "PurchaseOrder",
      "caption": "Blue jeans",
      "status": "issued",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "orgVendorId": "01900000-0000-7000-8000-67df2a7f0000",
      "currency": "USD",
      "paymentTerms": "<payment terms>",
      "incotermCode": "BJ-001",
      "vendorReference": "<vendor reference>",
      "notes": "Restock before the weekend.",
      "lineCount": 1,
      "openLineCount": 1,
      "nextLineNo": 1,
      "receivingReceiptId": "01900000-0000-7000-8000-1c0205630000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

createReceipt

createReceipt — mutation · Create a new goods receipt — stock arriving from a purchase order at your organization.

Example request

graphql
mutation ExampleCreateReceipt($input: CreateReceiptInput!) {
  createReceipt(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    logicalFacilityId
    organizationId
    lineCount
    nextLineNo
  }
}

Variables:

json
{
  "input": {
    "caption": "Blue jeans",
    "purchaseOrderId": "01900000-0000-7000-8000-da3499da0000",
    "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000",
    "lines": [
      {
        "poLineNo": 1,
        "quantityReceived": "<quantity received>",
        "disposition": "accept"
      }
    ]
  }
}

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

Example response

json
{
  "data": {
    "createReceipt": {
      "id": "01900000-0000-7000-8000-1b9120e30000",
      "sysId": "RC-EXMP-0000-000F",
      "type": "Receipt",
      "caption": "Blue jeans",
      "status": "draft",
      "parentId": "01900000-0000-7000-8000-da3499da0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 0,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000",
      "organizationId": "01900000-0000-7000-8000-1971e30a0000",
      "lineCount": 1,
      "nextLineNo": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

postReceipt

postReceipt — mutation · Post a goods receipt — the received quantities book into stock.

Example request

graphql
mutation ExamplePostReceipt($id: ID!, $revision: ID!, $reason: String) {
  postReceipt(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    logicalFacilityId
    organizationId
    lineCount
    nextLineNo
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-1b9120e30000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

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

Example response

json
{
  "data": {
    "postReceipt": {
      "id": "01900000-0000-7000-8000-1b9120e30000",
      "sysId": "RC-EXMP-0000-000F",
      "type": "Receipt",
      "caption": "Blue jeans",
      "status": "posted",
      "parentId": "01900000-0000-7000-8000-da3499da0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "logicalFacilityId": "01900000-0000-7000-8000-10c08c590000",
      "organizationId": "01900000-0000-7000-8000-1971e30a0000",
      "lineCount": 1,
      "nextLineNo": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}