> ## 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.

# commerceAgentConversations

> List Commerce Agent conversations, the same set the Commerce Agent conversations page shows: conversations with at least one outreach. Filter by reply status, who started them, the campaign or automation behind them, or search shopper names, emails, phones, and message text.

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

## Arguments

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**author**

Only include conversations this source started.

**automation** `ID`

Only include conversations with outreach from this marketing automation: its `id`, or its `legacyId`.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**campaign** `ID`

Only include conversations with outreach from this campaign: its `id`, or its `legacyId` from an earlier version of the Redo API.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**generationMode**

Only include conversations with outreach written this way.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**lastResponseAfter**

Only include conversations whose latest message is at or after this ISO-8601 instant.

**lastResponseBefore**

Only include conversations whose latest message is at or before this ISO-8601 instant.

**orderBy**

Which key to sort by (defaults to `LAST_RESPONSE_AT`, newest first). Combine with `reverse` to flip direction.

**query** `String`

Match shopper name, email, phone, or message text. At most 200 characters.

**reverse** `Boolean`

Reverses the sort direction selected by `orderBy` (or its default).

**sentiment**

Only include conversations whose latest analysis found this sentiment.

**status**

Only include conversations in this reply state.

**trigger** `String`

Only include conversations with outreach from this trigger key.

## Returns

**commerceAgentConversations** *required*

A paginated list of CommerceAgentConversation items.

**fields**

**edges** *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** *required*

The item at this edge.

**fields**

**channel** *required*

The channel the conversation takes place on.

**createdAt** *required*

When the conversation started.

**customerMessageCount** `Int!` *required*

How many messages the shopper sent.

**id** `ID!` *required*

The id of this conversation.

**lastCustomerMessageAt**

When the shopper last wrote. Null if they never have.

**lastMerchantMessageAt**

When Commerce Agent or the merchant's team last wrote, including internal notes. Null if neither has.

**lastResponseAt**

The latest message from either side, including internal notes. `LAST_RESPONSE_AT` sorts by this.

**merchantMessageCount** `Int!` *required*

How many messages Commerce Agent, the merchant's team, auto-replies, and chat flows sent, including internal notes, as the conversations page counts them.

**messages** *required*

The conversation's messages, oldest first. Internal notes are left out.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**outreaches** *required*

The outbound messages that started or continued this conversation, oldest first, with the campaign or automation behind each.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**updatedAt** *required*

When the conversation was last updated.

**nodes** *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**channel** *required*

The channel the conversation takes place on.

**createdAt** *required*

When the conversation started.

**customerMessageCount** `Int!` *required*

How many messages the shopper sent.

**id** `ID!` *required*

The id of this conversation.

**lastCustomerMessageAt**

When the shopper last wrote. Null if they never have.

**lastMerchantMessageAt**

When Commerce Agent or the merchant's team last wrote, including internal notes. Null if neither has.

**lastResponseAt**

The latest message from either side, including internal notes. `LAST_RESPONSE_AT` sorts by this.

**merchantMessageCount** `Int!` *required*

How many messages Commerce Agent, the merchant's team, auto-replies, and chat flows sent, including internal notes, as the conversations page counts them.

**messages** *required*

The conversation's messages, oldest first. Internal notes are left out.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** *required*

Pagination metadata for the current page.

**outreaches** *required*

The outbound messages that started or continued this conversation, oldest first, with the campaign or automation behind each.

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

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** *required*

Pagination metadata for the current page.

**updatedAt** *required*

When the conversation was last updated.

**pageInfo** *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

## Example

```graphql theme={null}
query {
  commerceAgentConversations(after: "...", author: CAMPAIGN, automation: "...", before: "...", campaign: "...", first: 10, generationMode: AI, last: 10, lastResponseAfter: "...", lastResponseBefore: "...", orderBy: CREATED_AT, query: "...", reverse: true, sentiment: MIXED, status: AWAITING, trigger: "...") {
    nodes {
      channel
      createdAt
      customerMessageCount
      id
      lastCustomerMessageAt
      lastMerchantMessageAt
      lastResponseAt
      merchantMessageCount
      # ...
    }
    pageInfo { hasNextPage endCursor }
  }
}
```


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