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

# commerceAgentConversation

> Fetch a single Commerce Agent conversation by its id.

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

## Arguments

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

The conversation's `id`.

## Returns

**commerceAgentConversation**

A conversation between a shopper and Commerce Agent, as listed on the Commerce Agent conversations page.

**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`).

**fields**

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

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

**node** *required*

The item at this edge.

**nodes** *required*

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

**fields**

**content** `String`

The message text. Null for a message with no text, such as an image.

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

The id of this message.

**sender** *required*

Who wrote the message.

**sentAt** *required*

When the message was sent.

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

**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`).

**fields**

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

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

**node** *required*

The item at this edge.

**nodes** *required*

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

**fields**

**automation**

The marketing automation that sent this outreach, if one did.

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

**automationKind**

Which kind of automation sent it. Null unless `origin` is `AUTOMATION`.

**campaign**

The campaign that sent this outreach, if one did.

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

**createdAt** *required*

When the outreach was sent.

**generationMode**

How the message was written.

**origin**

What started this outreach.

**sentViaHumanQueue** `Boolean!` *required*

Whether a person on the merchant's team approved the message before it sent.

**trigger** `String`

The trigger key that fired this outreach, such as a checkout abandonment event.

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

**updatedAt** *required*

When the conversation was last updated.

## Example

```graphql theme={null}
query {
  commerceAgentConversation(id: "...") {
    channel
    createdAt
    customerMessageCount
    id
    lastCustomerMessageAt
    lastMerchantMessageAt
    lastResponseAt
    merchantMessageCount
    # ...
  }
}
```


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