Unexported settlements (get_settlements)

Identifies cleared settlements not yet exported to the ERP via the state=created filter. Necessary for tracking treasury movements pending accounting entry.

↓ Download skill (.md)
85/100Β·πŸ“… WeeklyΒ·IntermediateController
ERP exportReconciliationget_settlements

🎯 Skill purpose

Identifies cleared settlements not yet exported to the ERP via the state=created filter. Necessary for tracking treasury movements pending accounting entry.

πŸ“Š What it produces

Settlements pending export with amount, clearing date, and bank reference.

⚑ Benefit

Before

No view of unexported settlements β€” gaps undetected between Spendesk and the ERP.

After

Precise list of settlements to export β€” zero missed accounting entries.



# Settlements not exported β€” get_settlements

## The 3 states of a settlement

| State | Meaning | exportedAt |
|------|--------------|-----------|
| `created` | Cleared in Spendesk, not yet exported to the ERP | null |
| `exported` | Successfully sent to the ERP | ISO date |
| `failedToExport` | Export attempted but failed | null |

## Important reminder

"Cleared in Spendesk" β‰  "ready for GL export". The accounting workflow (GL export) is based on the **payables**' `bookkeepingStatus`, not on settlements. Settlements are used for **bank reconciliation** β€” they represent actual cash movements.

## Call β€” settlements not exported (created)

```json
{
  "tool": "get_settlements",
  "params": {
    "companyId": "<companyId>",
    "state": ["created"],
    "pageSize": 50
  }
}
```

## Call β€” export failures (failedToExport)

```json
{
  "tool": "get_settlements",
  "params": {
    "companyId": "<companyId>",
    "state": ["failedToExport"],
    "pageSize": 50
  }
}
```

## Discovery: "created" settlements dating back to 2017

On this account, settlements in `state: "created"` go back as far as **May 2017** β€” i.e. 9 years of unexported settlements. This can mean:
1. GL export via settlements was never enabled on this account (it uses the payables `bookkeepingStatus` export instead)
2. These old settlements predate the ERP integration setup

β†’ `state: "created"` doesn't necessarily mean "pending action" β€” it can be a permanent state for accounts without a settlements ERP integration.

## Discovery: failedToExport with statusUpdatedAt = null

`failedToExport` settlements all have `statusUpdatedAt: null`. It's impossible to know **when** the export failed from the returned data. The failures date back to 2020.

```json
{
  "exportedAt": null,
  "statusUpdatedAt": null,
  "state": "failedToExport"
}
```

β†’ To audit recent failures, use the date filter `clearedFrom`/`clearedTo` to isolate a period.

## Returned fields

```json
{
  "id": "uuid",
  "type": "payment | reimbursement | refund | cashReturn",
  "medium": "card | wiretransfer",
  "paidFrom": "spendeskAccount | externalAccount",
  "transactionDescription": "description",
  "clearedAt": "2024-01-15T00:00:00.000Z",
  "currency": "EUR",
  "billingCurrency": "EUR",
  "billingExchangeRate": 1,
  "state": "created | exported | failedToExport",
  "exportedAt": null,
  "statusUpdatedAt": null,
  "amount": { "amount": 21146, "currency": "EUR", "precision": 2 },
  "billingAmount": { "amount": 21146, "currency": "EUR", "precision": 2 },
  "allocations": [
    {
      "amount": { "amount": 21146, "currency": "EUR", "precision": 2 },
      "currency": "EUR",
      "payableId": "uuid-of-the-payable"
    }
  ]
}
```

## Negative amounts

A settlement can have a negative amount (`amount: -175780`) β€” this is a **reimbursement** or **refund** (e.g. booking cancellation, supplier credit note). The observed example: 3 MWC Barcelona refunds following the event's COVID cancellation.

## Filter by clearing period

```json
{
  "state": ["created"],
  "clearedFrom": "2026-01-01",
  "clearedTo": "2026-06-30"
}
```

β†’ For monthly reconciliation, always filter by `clearedFrom`/`clearedTo` β€” without a filter, you get the entire history.

## paidFrom: externalAccount vs spendeskAccount

| Value | Meaning |
|--------|--------------|
| `spendeskAccount` | Paid from the Spendesk wallet (cards, Spendesk transfers) |
| `externalAccount` | Paid from an external bank account (manual reimbursements) |

## Example user prompts

- "Which settlements haven't been exported to our ERP yet?"
- "Are there any export failures to fix?"
- "Give me all the movements cleared in June 2026 for bank reconciliation"

How to install this skill

/
  1. 1
    Download the file s40-settlements-non-exportes.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s40-settlements-non-exportes.md .claude/s40-settlements-non-exportes.md
  3. 3
    Use in Claude Code β€” the 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_settlements.

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
90/100Β·πŸ” Ad hocΒ·Intermediate

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.

ControllerFinance Analyst