> For the complete documentation index, see [llms.txt](https://docs.iadvize.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iadvize.dev/use-cases/data-and-analytics/retrieve-messages-exchanged-within-a-conversation-1/find-contact-data-graphql.md).

# Understand conversation data 1/2

The <kbd>closedConversations</kbd> and the <kbd>conversation</kbd> queries allow you to retrieve detailed information about each conversation that has been closed. These are your go-to queries for raw data export, integration into external systems, or conversation-level audits.

Here is the [link](https://graphql.iadvize.dev/queries/closedConversations) to the publicly available schema.

## What data is available

For each conversation, you can retrieve:

* Unique ID
* Start and end timestamps
* Assigned agent, group, campaign
* Messages (including sender, content, timestamps)
* Tags
* Ratings (CSAT, NPS)
* Contact info and visitor details
* Transactions\\

You can also expand nested fields to retrieve message-level data, user details, and routing logic context.

## Available filters

You can narrow down the results using:

* `interval` (required): defines the period of closed conversations to fetch
* `projectIds`: filter by project (SID)
* `answered`: Filter by conversations that received a response.
* `answeredByHuman`: Filter by conversations answered by a human agent.
* `automationLevels`: Filter by automation level (FULLY\_AUTOMATED, NOT\_AUTOMATED, PARTIALLY\_AUTOMATED)
* `channels`: Filter by conversation channels (e.g., APPLE\_BUSINESS\_CHAT, CALL, CHAT, FACEBOOK, FACEBOOK\_BUSINESS\_ON\_MESSENGER, GOOGLE\_BUSINESS\_MESSAGES, INSTAGRAM, MOBILE\_APP, SMS, TWITTER, VIDEO, WHATSAPP).
* `closeReason`: Filter by reasons for conversation closure (BOT\_TRANSFER\_FAILED, END\_OF\_BOT\_SCENARIO, VISITOR\_DROPPED\_OFF\_SCENARIO)
* `conversationId`: Filter by a specific conversation ID.
* `conversationVisitorIds`: Filter by visitor IDs associated with conversations.
* `customerSatisfaction`: Filter by customer satisfaction scores (1 to 5).
* `engagementCampaignIds`: Filter by engagement campaign IDs.
* `genAiPredictedTopicIds`: Filter by generative AI predicted topic IDs.
* `groupIds`: Filter by group IDs of operators who participated in the conversation.
* `hasConversion`: Filter by presence of a conversion.
* `hasGenerativeAIAnswer`: Filter by presence of generative AI answers.
* `hasGenerativeAIUnansweredQuestion`: Filter by presence of unanswered questions by generative AI.
* `hasVideoCall`: Filter by presence of video calls in the conversation.
* `humanHandlingTimeUpperLimit`: Filter by maximum human handling time in seconds.
* `isAiAssisted`: Filter by conversations where agents were assisted by generative AI.
* `messagesSearches`: Filter by keywords in the content of messages.
* `netPromoterScore`: Filter by Net Promoter Score (0 to 10).
* `projectIds`: Filter by iAdvize project IDs (SID).
* `respondentTypes`: Filter by respondent types (e.g., Copilot, Bot, Expert, Agent).
* `roles`: Filter by roles (e.g., operator, manager, admin, expert, bot).
* `routingGroupIds`: Filter by routing group IDs.
* `tagIds`: Filter by tag IDs.
* `targetingRuleIds`: Filter by targeting rule IDs.
* `userIds`: Filter by user IDs.
* `visitorIds`: Filter by visitor profile IDs.
* `visitorMessagesSearches`: Filter by keywords in visitor messages.

You can also paginate your results using offset and limit.

More about pagination in this [article](https://docs.iadvize.dev/technologies/graphql-api/pagination).

## Fields returned by closedConversations

#### 🆔 Core identifiers

* `id`: Unique ID of the conversation
* `externalId`: Custom external identifier

#### 🕓 Timestamps

* `createdAt`: When the conversation started
* `updatedAt`: Last update timestamp
* `closedAt`: When the conversation was closed
* `duration`: Conversation duration in seconds from visitor initiation time to user closing time using iso 8601 format.

#### 👥 Participants & routing

* `users`: List of users who participated in the conversation
* `visitor`: The visitor (contact) involved in the conversation
* `project`: The iAdvize project the conversation belongs to
* `routingRule`: The routing rule that directed the conversation
* `routingGroup`: Group of operators the conversation was routed to.

#### 💬 Content & messages

* `messages`: All messages exchanged during the conversation (transcripts
* `systemMessage`:A system conversation message attachment (engagement rule triggered, transfer information, etc. full list available [here](https://graphql.iadvize.dev/types/SystemConversationMessageAttachment))

#### 🧠 AI & automation

* `automationLevel`: Level of automation used in the conversation

#### 🔖 Tags & metadata

* `tags`: Tags manually or automatically applied to the conversation
* `language`: Language of the conversation
* `channel`: Channel used (chat, call, etc.)

#### 🧪 Ratings & feedback

* `customerSatisfaction`: Customer satisfaction score (1–5)
* `netPromoterScore`: NPS value (0–10)
* `comment`: Visitor's conversation comment.

#### 📎 Context & tracking

* `targetingRule`: Targeting rule that triggered the chat
* `engagementCampaign`: Associated engagement campaign
* `customData`: A typed conversation custom data for a conversation - more info [here](https://graphql.iadvize.dev/types/ConversationConversationCustomDataEntry)
* `closingformValues`: List all closing form values answered to custom closing form plugins.

\
💶 **Transactions**\*

* `conversions`: A Conversion attributed to a conversation

{% hint style="info" %}
\*make sure you read the info available [here](/use-cases/data-and-analytics/retrieve-messages-exchanged-within-a-conversation-1/understand-transaction-data.md) regarding transaction
{% endhint %}

## Good to know

* This query is ideal for exporting chat logs, enriching your CRM, or performing detailed analysis on individual conversations.
* Use it to feed reporting pipelines or quality assurance tools.
* If you wish to catch all conversations as soon as they go through, please make sure you read our information regarding our two [conversation webhooks.](https://docs.iadvize.dev/technologies/webhooks)\\

\
\\

\
\\
