GL account mapping validation
Verifies that all payables pending export are correctly mapped to a chart of accounts entry before ERP export.
73/100ยท๐ MonthlyยทIntermediateController
ERP exportSettingsget_payablesget_chart_of_accounts
๐ฏ Skill purpose
Verifies that all payables pending export are correctly mapped to a chart of accounts entry before ERP export.
๐ What it produces
Report of payables with missing or suspect GL mapping, with amount and supplier for manual correction.
โก Benefit
Before
GL mapping errors are only discovered after the ERP export, requiring manual corrective entries.
After
Preventive accounting mapping validation before each export, zero downstream errors in the ERP.
# GL accounting mapping validation
## Purpose
Verify that all payables ready to export have a valid GL code present in the company's chart of accounts. Prevents ERP import rejections caused by missing or invalid codes.
## Instructions
### Step 1 โ Retrieve the reference chart of accounts
```
Call get_chart_of_accounts.
Extract the list of valid GL codes: { accountCode, accountType, label }
Build a set of valid codes for validation.
```
### Step 2 โ Retrieve the payables to check
```
Call get_payables with bookingStatus=toExport (payables ready to export).
For each payable: retrieve id, amount, supplierId, glCode (or accountingCode),
invoiceDate, payableType.
```
### Step 3 โ Check for the presence of the GL code
```
For each payable:
CASE 1: glCode missing or null โ "Missing GL code"
CASE 2: glCode present but not in the chart of accounts โ "Invalid GL code"
CASE 3: glCode present and in the chart of accounts โ OK โ
Count and list cases 1 and 2.
```
### Step 4 โ Enrichment of anomalies
```
For payables with a GL anomaly:
Resolve the supplier name via get_supplier_by_id (for the top 20)
Identify the type (invoice, expense claim, subscription) to prioritize the fix
```
### Step 5 โ GL validation report
```
Present:
1. Summary: X payables OK | X with no GL code | X with an invalid code
2. List of payables with no GL code (to fix as a priority before export)
3. List of invalid GL codes with the code used vs. suggested valid codes
4. Total amount blocked by GL anomalies
5. Recommendation: block the export until these payables are fixed
```
## Points to watch
- The name of the GL code field may vary depending on the Spendesk configuration (glCode, accountingCode, glAccount)
- A missing GL code = immediate rejection when importing into most ERPs
- Do not export until the anomaly list is at zero
## Example prompts
- "Check that all my payables to export have a valid accounting code"
- "Are there any invoices with no GL code before my close?"
- "Show me the accounting mapping errors in the payables to export this month"
How to install this skill
/
- 1Download the file
s48-gl-mapping-validation.mdusing the button above. - 2Place the file in the
.claude/directory of your project (or~/.claude/for a global install).cp s48-gl-mapping-validation.md .claude/s48-gl-mapping-validation.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_payables, get_chart_of_accounts.Similar skills
โ
Top