Internal processes
Automate policy exception review without approving everything.
Expense claims, return exceptions, discount requests: most follow the policy and a few need a person. Evaluate each request against the written policy and the reason given, then send only the real exceptions for approval.
Rules engines handle numbers. People handle reasons.
A classic rules engine can compare 960 with 400. It can’t tell whether “trains were on strike” makes an expensive taxi unavoidable, whether “I forgot to submit the request” makes a late flight the employee’s doing, or whether a receipt full of beers is a client dinner. So teams send everything over the limit to a manager, and managers approve on autopilot.
Enforly evaluates the request against the policy as written, including the parts that need judgment, and returns allow, deny, or review. Keep hard limits in code if you prefer; use Enforly for the cases code can’t express.
Where the check fits
One call between the step that prepares something and the step that sends, publishes, or runs it. Your code applies the decision.
See it decide
The same policy evaluated on three cases. Pick one and run the check to see which evidence it relies on.
Policy
Every claim needs a business purpose; personal expenses are never reimbursable. Alcohol is only reimbursable for a client meal with the client named in the claim. Going over data.limits is fine when the reason shows it was unavoidable. If the extra cost came from convenience or the employee’s own delay, a finance manager decides, recorded in data.approval.
data
{"claim": {"category": "taxi","amount": 38,"reason": "Trains were on strike; taxi from the station to the client workshop in Rosario"},"limits": {"taxi": 25,"flight": 400,"meals": 60},"approval": null}
Result
Why: It’s over the taxi limit, but a train strike made the taxi unavoidable and the trip was for a client workshop.
Your code: Approve and queue the reimbursement.
Response JSON
{
"decision": "allow",
"allowed": true,
"violationProbability": 0.06,
"reviewProbability": 0.1,
"policyId": null,
"policyVersion": null,
"requestId": "req_7f3a…"
}Illustrative example. Real probabilities depend on your policy wording and the evidence you send.
allow · Unavoidable overage
It’s over the taxi limit, but a train strike made the taxi unavoidable and the trip was for a client workshop.
deny · Team drinks
Within the meals limit, but it’s mostly alcohol for an internal celebration, with no client.
review · Self-inflicted cost
The trip has a business purpose, but the extra cost came from the employee’s own delay, so a finance manager decides.
Enforly evaluates. Your workflow approves.
Enforly doesn’t store approvals or run your workflow. Your tool (n8n, Zapier, Retool, your own app) creates the approval task on review, records who approved, and checks the original request again with data.approval filled in. That keeps the audit trail where your team already works.
Set it up
- 1
Paste your policy
Use the wording from your handbook, with limits and who approves what.
- 2
Check each request
Send the claim, the limits for the category, and any approval already given.
- 3
Approve, escalate, or reject
Route
reviewto the named approver and re-check once they decide.
import { Enforly } from '@enforly/sdk'
const guard = new Enforly({ apiKey: process.env.ENFORLY_API_KEY })
async function evaluateClaim(claim) {
const result = await guard.check({
policyId: EXPENSE_POLICY_ID,
data: { claim, limits: limitsFor(claim.employee), approval: await approvals.for(claim.id) },
})
if (result.allowed) return reimburse(claim)
if (result.decision === 'review') return approvals.request(claim.id, { role: 'finance_manager' })
return reject(claim, result.requestId)
}
// When the manager approves, evaluateClaim(claim) runs again with the approval included.Full request and response fields are in the API reference. Using a coding agent? Point it to Build with AI.
What Enforly doesn’t do
Enforly evaluates the information you send and returns a decision. It doesn’t run operations, and it doesn’t guarantee safety or compliance on its own.
- Enforly doesn’t read receipts. Extract the line items with OCR first and send them as data.
- It doesn’t pay, reject, or notify anyone; your workflow does.
- For strict numeric limits, a plain comparison in code is cheaper and deterministic. Use Enforly for the judgment parts.
Questions
Does this need AI in my process?
No. Enforly uses AI internally to evaluate the request, but your process can be a plain form and a spreadsheet-driven workflow.
How do I keep an audit trail?
Store the requestId and decision with the request in your system. Enforly’s activity log keeps the decision and request ID, not the claim data.
Related
Try this policy on your own data.
Copy the policy above, add your real examples, and see the decision. 200 free checks per month, no credit card.