# Open, run and close a till day

Open the drawer with a counted float, record cash moving in or out outside a sale, open the drawer without a sale when you must, freeze it for the closing count, and close it — the over/short is the shift’s record.

POS estate · a play in 4 steps.

## The steps

1. Open the till with a counted float. — [openTillSession](/reference/till-sessions/openTillSession/)
2. Record cash in or out outside a sale — paid-ins, paid-outs, drops, pickups — with a reason. — [recordCashEntry](/reference/till-and-cash-management/recordCashEntry/)
3. Open the drawer without a sale — counted, stamped, reason required. — [noSale](/reference/gated-floor-actions/noSale/)
4. Freeze the drawer for the closing count, then close it — the over/short against the expected totals is permanent. — [beginCloseTillSession](/reference/till-session/beginCloseTillSession/), [closeTillSession](/reference/till-sessions/closeTillSession/)

## The calls

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

### openTillSession

[openTillSession](/reference/till-sessions/openTillSession/) — mutation · Open a till — start a drawer shift with a counted opening float.

**Example request**

```graphql
mutation ExampleOpenTillSession($input: OpenTillSessionInput!) {
  openTillSession(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}
```

Variables:

```json
{
  "input": {
    "caption": "Blue jeans",
    "registerId": "01900000-0000-7000-8000-c30413dd0000",
    "float": [
      {
        "currency": "USD",
        "amountMinor": 1
      }
    ]
  }
}
```

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

**Example response**

```json
{
  "data": {
    "openTillSession": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "open",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### recordCashEntry

[recordCashEntry](/reference/till-and-cash-management/recordCashEntry/) — mutation · Record cash moving in or out of the drawer outside a sale — paid-ins, paid-outs, drops to the safe, pickups.

**Example request**

```graphql
mutation ExampleRecordCashEntry($input: RecordCashEntryInput!) {
  recordCashEntry(input: $input) {
    id
    type
    caption
    status
    parentId
    rootId
    entryType
    currency
    amountMinor
    reason
    glCategory
    refs
    overdrawn
    createdAt
    updatedAt
    revision
    revisionNum
  }
}
```

Variables:

```json
{
  "input": {
    "tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
    "entryType": "paid_in",
    "currency": "USD",
    "amountMinor": 1,
    "reason": "Correcting a miscount.",
    "glCategory": "<gl category>"
  }
}
```

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

**Example response**

```json
{
  "data": {
    "recordCashEntry": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "type": "<type>",
      "caption": "Blue jeans",
      "status": "<status>",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "entryType": "float_in",
      "currency": "USD",
      "amountMinor": 1,
      "reason": "Correcting a miscount.",
      "glCategory": "<gl category>",
      "refs": [
        "<refs>"
      ],
      "overdrawn": true,
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "revisionNum": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### noSale

[noSale](/reference/gated-floor-actions/noSale/) — mutation · Open the drawer without a sale.

**Example request**

```graphql
mutation ExampleNoSale($input: NoSaleInput!) {
  noSale(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}
```

Variables:

```json
{
  "input": {
    "tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000",
    "reason": "Correcting a miscount."
  }
}
```

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

**Example response**

```json
{
  "data": {
    "noSale": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "open",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### beginCloseTillSession

[beginCloseTillSession](/reference/till-session/beginCloseTillSession/) — mutation · Start closing a till — freeze the drawer for the closing count.

**Example request**

```graphql
mutation ExampleBeginCloseTillSession($id: ID!, $revision: ID!, $reason: String) {
  beginCloseTillSession(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}
```

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": {
    "beginCloseTillSession": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "open",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

### closeTillSession

[closeTillSession](/reference/till-sessions/closeTillSession/) — mutation · Close a till — record the closing count; over/short is computed against the expected totals.

**Example request**

```graphql
mutation ExampleCloseTillSession($input: CloseTillSessionInput!) {
  closeTillSession(input: $input) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    openedBy
    closedAt
    noSaleCount
    lastNoSaleAt
  }
}
```

Variables:

```json
{
  "input": {
    "tillSessionId": "01900000-0000-7000-8000-83d61fef0000",
    "expectedRevision": "01900000-0000-7000-8000-e02b2e6c0000",
    "counted": [
      {
        "currency": "USD",
        "amountMinor": 1
      }
    ]
  }
}
```

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

**Example response**

```json
{
  "data": {
    "closeTillSession": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "TS-EXMP-0000-000F",
      "type": "TillSession",
      "caption": "Blue jeans",
      "status": "open",
      "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",
      "openedBy": "01900000-0000-7000-8000-553745ed0000",
      "closedAt": "2027-01-31T00:00:00.000Z",
      "noSaleCount": 1,
      "lastNoSaleAt": "2027-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```
