# Count the shelves against the books

How the books stay honest: a count freezes a location’s lines, the counter works blind against the shelves, captures record what was physically found, and posting moves the books by exactly the differences — no more, no less.

Warehouse · a guided walk in 4 steps.

## The steps

1. **Set up the count** — The count names its location and why it is being taken — wall-to-wall, a scheduled cycle, or a spot check. — [createCount](/reference/inventory-operations/createCount/)
2. **Start it** — Starting freezes the shelf list into concrete lines and hides the expected figures — an honest count is a blind count. — [startCount](/reference/inventory-operations/startCount/)
3. **Capture what you find** — Each capture records the physically-counted quantity — an explicit zero is a real answer; re-counts overwrite while counting. — [captureCount](/reference/inventory-operations/captureCount/)
4. **Post the differences** — Posting moves the books by exactly the variances and the count becomes history; a recount is a new linked count. — [postCount](/reference/inventory-adjustments/postCount/)

## The calls

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

### createCount

[createCount](/reference/inventory-operations/createCount/) — mutation · Create a new stock count — checking real shelves against the books at your organization.

**Example request**

```graphql
mutation ExampleCreateCount($input: CreateCountInput!) {
  createCount(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    countType
    recountOfCountId
  }
}
```

Variables:

```json
{
  "input": {
    "caption": "Blue jeans",
    "logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000",
    "countType": "physical"
  }
}
```

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

**Example response**

```json
{
  "data": {
    "createCount": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "IC-EXMP-0000-000F",
      "type": "Count",
      "caption": "Blue jeans",
      "status": "draft",
      "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",
      "organizationId": "01900000-0000-7000-8000-44b781470000",
      "countType": "physical",
      "recountOfCountId": "01900000-0000-7000-8000-200395ec0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### startCount

[startCount](/reference/inventory-operations/startCount/) — mutation · Start a stock count — the checklist of what to count is drawn up.

**Example request**

```graphql
mutation ExampleStartCount($id: ID!, $revision: ID!, $reason: String) {
  startCount(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    countType
    recountOfCountId
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "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": {
    "startCount": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "IC-EXMP-0000-000F",
      "type": "Count",
      "caption": "Blue jeans",
      "status": "draft",
      "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",
      "organizationId": "01900000-0000-7000-8000-44b781470000",
      "countType": "physical",
      "recountOfCountId": "01900000-0000-7000-8000-200395ec0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### captureCount

[captureCount](/reference/inventory-operations/captureCount/) — mutation · Enter counted quantities into an open stock count.

**Example request**

```graphql
mutation ExampleCaptureCount($input: CaptureCountInput!, $revision: ID!, $reason: String) {
  captureCount(input: $input, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    countType
    recountOfCountId
  }
}
```

Variables:

```json
{
  "input": {
    "countId": "01900000-0000-7000-8000-931a95590000",
    "lines": [
      {
        "lineNo": 1,
        "countedQty": "<counted qty>"
      }
    ]
  },
  "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": {
    "captureCount": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "IC-EXMP-0000-000F",
      "type": "Count",
      "caption": "Blue jeans",
      "status": "draft",
      "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",
      "organizationId": "01900000-0000-7000-8000-44b781470000",
      "countType": "physical",
      "recountOfCountId": "01900000-0000-7000-8000-200395ec0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### postCount

[postCount](/reference/inventory-adjustments/postCount/) — mutation · Post a completed stock count — the counted truth replaces the book figures.

**Example request**

```graphql
mutation ExamplePostCount($id: ID!, $revision: ID!, $reason: String) {
  postCount(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    organizationId
    countType
    recountOfCountId
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "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": {
    "postCount": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "IC-EXMP-0000-000F",
      "type": "Count",
      "caption": "Blue jeans",
      "status": "draft",
      "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",
      "organizationId": "01900000-0000-7000-8000-44b781470000",
      "countType": "physical",
      "recountOfCountId": "01900000-0000-7000-8000-200395ec0000"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```
