Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Validate Totals

data.validate_totals

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

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

Note
Reconciles numeric totals across rows, columns, and groups.

Non-goals

  • Does not fix or impute data
  • Does not sum non-numeric columns
  • Does not apply business rules beyond the declared checks

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationvalidation

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input97.7 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
rowsarrayYesBounded array of 0 through 100000 input row objects keyed by column name, where missing keys count as null.
checksarrayYesBounded array of 1 through 200 closed reconciliation rules in caller order.
decimalScaleintegerNoDecimal places used when rounding comparisons; omit it for 2.

Output schema

FieldTypeRequiredDescription
okbooleanYesTrue when validation ran successfully.
validbooleanYesTrue when every check passed.
resultsarrayYesBounded array of 1 through 200 check results in the same order as the request.

API contract

POST /v1/execute
curl
curl -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}]}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "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

Inputjson
{
  "checks": [
    {
      "fields": [
        "amt"
      ],
      "type": "column_sum_equals_value",
      "expectedValue": 15
    }
  ],
  "rows": [
    {
      "amt": 10
    },
    {
      "amt": 5
    }
  ]
}
Expected outputjson
{
  "valid": true,
  "results": [
    {
      "actual": 15,
      "withinTolerance": true,
      "valid": true,
      "expected": 15,
      "checkIndex": 0,
      "difference": 0
    }
  ],
  "ok": true
}

Mismatch reported when sum differs

Inputjson
{
  "checks": [
    {
      "fields": [
        "amt"
      ],
      "type": "column_sum_equals_value",
      "expectedValue": 20
    }
  ],
  "rows": [
    {
      "amt": 10
    },
    {
      "amt": 5
    }
  ]
}
Expected outputjson
{
  "valid": false,
  "results": [
    {
      "actual": 15,
      "withinTolerance": false,
      "valid": false,
      "expected": 20,
      "checkIndex": 0,
      "difference": -5
    }
  ],
  "ok": true
}
  • Financial subtotal verification
  • Report line-item reconciliation
  • Data QA before export

Avoid for

  • Non-numeric reconciliation
  • Fuzzy or tolerance-free floating-point compares

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.

Tags

validationreconciliationdata