Validate Totals
data.validate_totals
Overview
When you send row objects and reconciliation checks, we compare sums using exact decimal arithmetic and report expected, actual, difference, and whether each check is within tolerance. We do not modify your data. Do not use this for non-numeric or fuzzy reconciliation rules.
Reconciliation must be exact and deterministic — not left to free-form arithmetic in an agent.
Reliability
STRICT and deterministic BigDecimal arithmetic at decimalScale. A failed check returns valid=false in the success payload — inspect results[]. Mismatch is not a platform fault. Validation errors (not retryable — fix input): empty checks; unknown check type; missing fields/targetField/groupBy for the chosen type; NON_NUMERIC field value; more than 200 checks or 100,000 rows.
Context footprint
Returns ok, valid, and per-check results with expected/actual/difference. A successful call costs 1 execution credit.
When to use it
When you have numeric rows and explicit reconciliation checks.
For non-numeric fields or checks you cannot express in the three supported types.
Scope
Non-goals
- Does not fix or impute data
- Does not sum non-numeric columns
- Does not apply business rules beyond the declared checks
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| rows | array | Yes | Bounded array of 0 through 100000 input row objects keyed by column name, where missing keys count as null. |
| checks | array | Yes | Bounded array of 1 through 200 closed reconciliation rules in caller order. |
| decimalScale | integer | No | Decimal places used when rounding comparisons; omit it for 2. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| ok | boolean | Yes | True when validation ran successfully. |
| valid | boolean | Yes | True when every check passed. |
| results | array | Yes | Bounded array of 1 through 200 check results in the same order as the request. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"data.validate_totals","input":{"rows":[{"amt":10},{"amt":5}],"checks":[{"type":"column_sum_equals_value","fields":["amt"],"expectedValue":15}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("data.validate_totals", {"checks":[{"fields":["amt"],"type":"column_sum_equals_value","expectedValue":15}],"rows":[{"amt":10},{"amt":5}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not fix or impute data
- Does not sum non-numeric columns
- Does not apply business rules beyond the declared checks
- Non-numeric reconciliation
- Fuzzy or tolerance-free floating-point compares
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "data.validate_totals",
"input": {
"checks": [
{
"fields": [
"amt"
],
"type": "column_sum_equals_value",
"expectedValue": 15
}
],
"rows": [
{
"amt": 10
},
{
"amt": 5
}
]
}
}Examples
Column sum matches expected total
{
"checks": [
{
"fields": [
"amt"
],
"type": "column_sum_equals_value",
"expectedValue": 15
}
],
"rows": [
{
"amt": 10
},
{
"amt": 5
}
]
}{
"valid": true,
"results": [
{
"actual": 15,
"withinTolerance": true,
"valid": true,
"expected": 15,
"checkIndex": 0,
"difference": 0
}
],
"ok": true
}Mismatch reported when sum differs
{
"checks": [
{
"fields": [
"amt"
],
"type": "column_sum_equals_value",
"expectedValue": 20
}
],
"rows": [
{
"amt": 10
},
{
"amt": 5
}
]
}{
"valid": false,
"results": [
{
"actual": 15,
"withinTolerance": false,
"valid": false,
"expected": 20,
"checkIndex": 0,
"difference": -5
}
],
"ok": true
}Recommended use cases
- Financial subtotal verification
- Report line-item reconciliation
- Data QA before export
Avoid for
- Non-numeric reconciliation
- Fuzzy or tolerance-free floating-point compares
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.