Settlements vs GL export: two distinct workflows
Distinguishes cleared treasury movements (settlements) from the GL accounting export workflow. Avoids confusion between these two processes with different logics and APIs.
84/100Β·π MonthlyΒ·ExpertController
ERP exportReconciliationget_settlementsget_payables
π― Skill purpose
Distinguishes cleared treasury movements (settlements) from the GL accounting export workflow. Avoids confusion between these two processes with different logics and APIs.
π What it produces
Explanation of both workflows with API call examples and respective use cases.
β‘ Benefit
Before
Frequent confusion between settlements and GL export causing reconciliation errors.
After
Clear understanding of both workflows β reconciliation without conceptual errors.
# Instructions β Settlements vs GL Export: two distinct workflows
## β οΈ Fundamental rule
There are **two independent export workflows** in Spendesk:
| Workflow | Object | Tool | When to use it |
|----------|-------|-------|-----------------|
| **Cash clearance** | Cash movements (card transactions + transfers) | `get_settlements` | Bank reconciliation |
| **GL export** | Invoices/expenses to record in accounting | `get_payables` + `bookkeepingStatus` | ERP export |
A settlement with `state=exported` = this cash movement has been exported to an accounting system.
A payable with `bookkeepingStatus=exported` = this invoice/expense has been exported to the ERP.
**These two exports are independent** β a settlement can be exported without the related payable being exported, and vice versa.
## Use case 1 β Bank reconciliation (use settlements)
### Step 1
Call `get_settlements` with:
```json
{
"companyId": "...",
"clearedFrom": "YYYY-MM-DDT00:00:00.000Z",
"clearedTo": "YYYY-MM-DDT23:59:59.999Z",
"state": ["created"]
}
```
`state=created` = cleared in Spendesk, not yet exported β what's left to reconcile.
### Step 2 β Currency handling (CRITICAL)
Each settlement is in the transaction's currency (`currency`), not in the functional currency.
- Use `billingAmount` (in `billingCurrency`, typically the functional currency) for totals
- **Never sum `amount` across currencies**
Example observed:
- USD card settlement: `amount=94.80 USD`, `billingAmount=81.57 EUR`
- GBP wire transfer settlement: `amount=34,530.67 GBP`, `billingAmount=40,089.14 EUR`
β Summing 94.80 + 34530.67 makes no sense. Summing 81.57 + 40089.14 = 40,170.71 EUR β
### Step 3
For each settlement, the field `allocations[].payableId` lets you look up the related payable via `get_payable_by_id`.
## Use case 2 β ERP / GL export (use payables)
To prepare an accounting export, **do not use settlements**:
Call `get_payables` with `bookkeepingStatus=["toExport"]`.
β See skill `s10-factures-a-exporter-comptabilite`.
## Settlement states
| State | Meaning |
|-------|-------------|
| `created` | Cleared in Spendesk, not yet exported to the ERP |
| `exported` | Sent to the ERP (settlement record) |
| `failedToExport` | Export attempt failed β needs investigation |
## Example prompt
- "Which bank movements were cleared in June but not yet exported?" β `state=created`
- "Reconcile this week's card transactions" β `get_settlements` + `clearedFrom/To`
- "Prepare the monthly accounting export" β `get_payables` + `bookkeepingStatus=toExport`
How to install this skill
/
- 1Download the file
s39-settlements-vs-gl-export.mdusing the button above. - 2Place the file in the
.claude/directory of your project (or~/.claude/for a global install).cp s39-settlements-vs-gl-export.md .claude/s39-settlements-vs-gl-export.md - 3Use 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, get_payables.Similar skills
β
Top