> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# inventoryLotCount

> Count the indexed lots matching inventoryLotsSearch with the same text, product ID and filters. The count can trail writes by a few seconds.

**Required scopes:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**Store must have one of:** `IMS`, `WMS`

## Arguments

**filter** `[InventoryLotFilter](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

Which inventory lots to include.

**fields**

**and** `[\[InventoryLotFilter!\]](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

Every one of these filters matches.

**createdAt** `[DateTimeFilter](/docs/api-reference/v3/reference/common/date-time-filter)`

When the lot was created.

**fields**

**gt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

After this instant.

**gte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or after this instant.

**lt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Before this instant.

**lte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or before this instant.

**expirationDate** `[DateTimeFilter](/docs/api-reference/v3/reference/common/date-time-filter)`

When the lot expires, compared at midnight UTC. A lot with no expiration date never matches.

**fields**

**gt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

After this instant.

**gte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or after this instant.

**lt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Before this instant.

**lte** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

At or before this instant.

**expirationDateIsSet** `Boolean`

Whether the lot has an expiration date.

**location** `[IdFilter](/docs/api-reference/v3/reference/common/id-filter)`

The warehouse location assigned to the lot, by location ID.

**fields**

**anyOf** `[ID!]`

One of these ids (at most 100).

**noneOf** `[ID!]`

None of these ids (at most 100).

**lotNumber** `[StringListFilter](/docs/api-reference/v3/reference/common/string-list-filter)`

The lot number.

**fields**

**allOf** `[String!]`

Contains every one of these values (at most 100).

**anyOf** `[String!]`

Contains at least one of these values (at most 100).

**noneOf** `[String!]`

Contains none of these values (at most 100).

**lotNumberContains** `String`

A substring of the lot number, ignoring case. Use not to exclude matches.

**lotNumberIsSet** `Boolean`

Whether the lot has a lot number.

**not** `[InventoryLotFilter](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

This filter does not match.

**onHand** `[FloatFilter](/docs/api-reference/v3/reference/common/float-filter)`

Units in stocked bins, excluding damaged and bookkeeping bins.

**fields**

**gt** `Float`

Greater than this value.

**gte** `Float`

At least this value.

**lt** `Float`

Less than this value.

**lte** `Float`

At most this value.

**or** `[\[InventoryLotFilter!\]](/docs/api-reference/v3/reference/inventory/inventory-lot-filter)`

At least one of these filters matches.

**productSku** `[StringListFilter](/docs/api-reference/v3/reference/common/string-list-filter)`

The SKU of the product associated with the lot.

**fields**

**allOf** `[String!]`

Contains every one of these values (at most 100).

**anyOf** `[String!]`

Contains at least one of these values (at most 100).

**noneOf** `[String!]`

Contains none of these values (at most 100).

**productTitle** `[StringListFilter](/docs/api-reference/v3/reference/common/string-list-filter)`

The title of the product associated with the lot.

**fields**

**allOf** `[String!]`

Contains every one of these values (at most 100).

**anyOf** `[String!]`

Contains at least one of these values (at most 100).

**noneOf** `[String!]`

Contains none of these values (at most 100).

**productId** `ID`

Show lots of this product, including its merged products.

**text** `String`

Text to search for in lot numbers, product SKUs, or product titles, at most 200 characters.

## Returns

**inventoryLotCount** `Int!` *required*

## Example

```graphql theme={null}
query {
  inventoryLotCount(filter: { ... }, productId: "...", text: "...")
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.