---
title: "Segment comparison"
description: "Compare what two customer segments ask for, with Deck's counts and quotes for each segment."
url: "/docs/agents/workflows/segment-comparison"
---

This page is an agent-readable workflow for Deck. Humans can follow along. Coding agents should treat the steps as the source of truth.

# Segment comparison — agent workflow

* **Use it when:** the user asks "what do enterprise customers want that SMB customers do not?", "compare segment A and segment B" or "how do trial users and paying users differ?"
* **Outcome:** the user has a side-by-side comparison of two segments: the themes they share, the themes that lead in each segment, the category mix, sentiment and quotes. Nothing changes in Deck.
* **Needs:** Deck MCP. Segments must be on, with at least two segments. Subtheme and NPS comparisons need the Starter plan or higher.

## 1. Probe Deck MCP

Call `get_user_context`. This must be a real tool call.

* 401 Unauthorized: tell the user to connect Deck MCP in this client (Settings → Connections). Stop.
* No Deck tools: fetch and follow [https://docs.getdeck.io/docs/agents/getting-started/prompts/ai-pm.md](https://docs.getdeck.io/docs/agents/getting-started/prompts/ai-pm.md). Stop this workflow until the tools work.

## 2. Find the two segments

Call `explore_segments` with no parameters. It lists each segment with its ID, insight count, rule count, top theme and sentiment.

* Segments are off: tell the user that an organization admin can turn them on in Settings → Segments. Stop.
* Fewer than two segments: offer to define segments. Fetch and follow [https://docs.getdeck.io/docs/agents/workflows/define-segments.md](https://docs.getdeck.io/docs/agents/workflows/define-segments.md) if the user says yes. Stop this workflow.
* Match the user's words to two segment IDs. When a name matches more than one segment, ask.

Quote the insight count of each segment. When one segment has many fewer insights than the other, say that the comparison is uneven.

To explain what each segment means, call `explore_segments` with each `segment_id`, at the same time. Read the rules.

## 3. Read the themes of each segment

Make these calls at the same time. Use the same parameters for both segments. Only the segment ID changes.

* `explore_themes` with `segment_ids` set to the one segment, `segment_mode: "include"` and `limit: 25`. Each count covers only the feedback of that segment.
* `explore_themes` with the same scope and `view: "feature_requests"`. This answers "what do they ask for".
* `explore_themes` with the same scope and `view: "high_negative"`.
* `explore_themes` with the same scope and `view: "categories"`. This gives the insight count of each category.

That is 4 calls for each segment, 8 calls in all. Read `applied_scope` in each result. Confirm that Deck applied the segment that you asked for.

## 4. Read the subthemes of each segment

Call `explore_subthemes` with `segment_ids` set to the one segment and `group_by: "theme"`, for each segment, at the same time.

* On the Free plan this returns `feature_unavailable`. Leave out the subtheme comparison and say why.
* When Deck says the segment has no segment-level subthemes yet and shows the all-customer subthemes, do not use them for the comparison. Say so.

## 5. Find the differences

Sort the themes from step 3 into three groups:

* **Shared:** in the top 10 of both segments.
* **Leads in A:** in the top 10 of segment A only.
* **Leads in B:** in the top 10 of segment B only.

Use the rank in each list and Deck's counts. Do not compute ratios or percent differences.

## 6. Drill into the top differences

Pick up to 3 themes from each "Leads in" group. For each theme and each segment, make these calls at the same time:

* `explore_themes` with the `theme_id` and the segment scope. Read the stats.
* `explore_insights` with the `theme_id`, `segment_id` and `limit: 5`. Read the quotes.

## 7. Compare NPS (optional)

When the user asks about satisfaction, call `explore_nps` with `segment_ids` set to each segment, at the same time. On the Free plan this returns `feature_unavailable`. Read `scope_note`: some parts of the answer stay org-wide.

## 8. Write the comparison

1. **Summary:** two or three sentences on the main difference.
2. **Segments:** the name, insight count and rules of each segment.
3. **Theme table:** theme, count in A, count in B, group (shared, leads in A, leads in B) and link.
4. **Feature requests:** the top 5 for each segment.
5. **Category mix:** Deck's category counts for each segment.
6. **Quotes:** one or two for each top difference.
7. **Caveats:** uneven sizes, all-customer subthemes and org-wide NPS parts.

In clients that render MCP Apps, such as Claude and ChatGPT, also offer `show_feedback_insights` to show the themes of each segment.

## 9. Act on a difference (optional)

When the user wants to act on a difference, offer `create_from_insights` with the insight IDs from step 6. It saves nothing: Deck opens its review, and only the user's Create click saves. To scope an opportunity that exists to a segment, use `set_opportunity_segments` after a yes. It replaces the earlier segments.

## Rules

* This workflow only reads, unless the user approves a step 9 action.
* Quote Deck's numbers. Do not compute your own.
* Segments can share insights. Do not add the two counts to get a total.
* Use the same parameters for both segments in each step.
* Show the plan and get a yes before you call write tools.
* If the user has more than one Deck organization, call `select_organization` first and pass `org_id` on every call.

## Done when

* The comparison has the seven sections, or says why a section is left out.
* Each count comes from a Deck result whose `applied_scope` names the right segment.
* Each top difference has quotes and a Deck link.

See also: [Customer Segments](/docs/features/segments) and [Themes](/docs/data-points/themes).

---

[View full sitemap](/docs/sitemap)
