Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

↓ Download skill (.md)
90/100·🔍 Ad hoc·IntermediateControllerFinance Analyst
SettingsSpend analysisget_cost_centers

🎯 Skill purpose

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

📊 What it produces

List of active and archived cost centers with expense count and status.

Benefit

Before

Archived cost centers polluted cost analyses and distorted aggregates.

After

Clean active/archived segmentation for accurate cost analyses.



# Active vs archived cost centers

## Critical pitfall: X-old convention ≠ isArchived

`get_cost_centers` without a parameter returns all CCs where `isArchived: false`. But **many obsolete CCs remain with `isArchived: false`** — they are simply renamed with an "X -old-", "X- old", "X-old" prefix in the name (Spendesk UI convention to push them to the bottom of lists).

On this account: 97 CCs with `isArchived: false`, of which ~74 are prefixed "X -old-" or "X- old" → **naming convention ≠ API archiving**.

## The two levels of decommissioning

| Type | Example | isArchived | Visible by default | Appears on payables |
|------|---------|-----------|-------------------|----------------------|
| Operational active CC | "Marketing" | false | ✅ | ✅ |
| CC prefixed X-old (UI-decommissioned) | "X- old Marketing" | false | ✅ | ✅ |
| Truly archived CC (API) | "Sales US", "Finance" | **true** | ❌ | ✅ (historical) |

## Default call — all non-archived

```json
{
  "tool": "get_cost_centers",
  "params": {
    "companyId": "<companyId>"
  }
}
```

Returns: all CCs with `isArchived: false`, including CCs "X-old" decommissioned by convention.

## Call with archives — for historical payables

```json
{
  "tool": "get_cost_centers",
  "params": {
    "companyId": "<companyId>",
    "includeArchived": true
  }
}
```

Returns: the same plus CCs with `isArchived: true`. Important when processing old payables that reference CCs now archived.

## Observed data

On this account (call with `includeArchived: true`):
- **97 CCs** with `isArchived: false` (of which ~74 "X-old" by convention)
- **10 CCs** with `isArchived: true`:
  - "Banking (only audit)"
  - "Finance" ← potential duplicate with the active CC "Finance"
  - "Formation"
  - "IT" ← potential duplicate with the active CC "IT"
  - "Sales Partnerships"
  - "Sales UK"
  - "Sales US" ← **appears TWICE** with the same owner (data issue)
  - "Test"
  - "X -old- Charity"

**Note:** two archived CCs have the same name as an active CC ("Finance", "IT") — do not confuse the IDs during analysis.

## Filtering truly operational CCs

To obtain only operational CCs (without the decommissioned X-old ones), filter client-side by naming convention:

```javascript
const activeCCs = costCenters.data.filter(cc => 
  !cc.name.toLowerCase().startsWith('x ') &&
  !cc.name.toLowerCase().startsWith('x-')
)
```

On this account, this reduces 97 → ~23 truly active CCs.

## No-pagination behavior

`get_cost_centers` returns ALL CCs in a single response (no pagination) — no cursor or page management needed. The result can be very large on big accounts (~97+ entries).

## Returned fields

```json
{
  "id": "98f5436e-f4e0-4835-9a76-0e3fb39a35bc",
  "name": "Finance",
  "owner": "0f3gfvi_ng7pzu",
  "coOwnerIds": ["jfz-8y136mvo05", "ji80mmv4whajgz"],
  "isArchived": false
}
```

Fields: `id`, `name`, `owner` (userId), `coOwnerIds` (array of userIds), `isArchived` (boolean).

No budget, spend, or team member information directly in `get_cost_centers` — for this data, use `get_payables(filters.costCenterIds=[...])`.

## Example user prompts

- "List all active cost centers of the company"
- "Which cost centers have been archived?"
- "Give me all cost centers, including archived ones, for the accounting export"

How to install this skill

/
  1. 1
    Download the file s34-cost-centers-actifs-archives.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s34-cost-centers-actifs-archives.md .claude/s34-cost-centers-actifs-archives.md
  3. 3
    Use in Claude Codethe skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
💡 Make sure the Spendesk MCP is configured in your .claude/settings.json with the tools get_cost_centers.

Similar skills

★ Top
95/100·🔍 Ad hoc·Expert

MCP coverage audit & gap analysis

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100·📅 Weekly·Beginner

Card requests via get_requests

Explains how to use get_requests for card requests and why expense reimbursements don't appear there. Avoids a frequent source of confusion between two distinct workflows.

ControllerFinance Analyst
★ Top
89/100·🔍 Ad hoc·Intermediate

Skill Builder

Aide un client à transformer un besoin métier précis (contexte, contraintes, format de sortie souhaité) en un nouveau skill Claude sur mesure, prêt à l'emploi sur le MCP Spendesk

CFOControllerAP Manager