Back to all posts
Workflow Automation7 min read·October 25, 2026

Which Workflow Steps Need AI, and Which Need Rules?

TB
ThynkBlox AI Team
AI Engineering

When should you use AI vs rules in workflow automation?

Use explicit rules when a workflow step involves a calculation, a known condition or a decision with a defined policy. Consider AI when the step requires interpreting variable input, such as finding an order reference in differently worded documents. Keep that interpretation bounded: AI proposes structured values, checks determine whether those values are acceptable, and permissions determine what happens next.

Choose at the level of each step. A document-to-ERP workflow can combine AI extraction, rule-based validation and human approval without giving any one component control over the whole process.

How can you tell which approach a step needs?

Start by writing down the input, expected output and acceptance condition. Then ask whether you can fully describe the transformation with explicit instructions.

If the requirement is “multiply quantity by the agreed unit price,” use a calculation. If it is “find which passage describes the delivery location,” AI may be worth testing against representative documents.

Step requirementRecommended approachAcceptance boundary
Calculate a line amountExplicit calculationDefined rounding and precision rules
Check whether a required field existsExplicit ruleField is present and has an allowed format
Interpret a delivery instructionBounded AI interpretationAllowed output categories, with supporting text
Find a possible supplier matchExact lookup first; AI suggestions if neededUnique approved record or human confirmation
Decide who must approveExplicit policyCurrent approval conditions and permissions
Create an ERP recordControlled system actionValidated fields, authorised action and recorded result

Do not choose AI simply because the surrounding workflow uses it. A useful design gives each component a narrow responsibility and an observable result.

What should the document-to-ERP boundary look like?

Consider an illustrative workflow that receives supplier invoices and prepares purchase invoice records in an ERP. The business has purchase orders, supplier records and a defined approval policy.

Treat the document as evidence to interpret. Treat approved business records and policies as the basis for validation.

A sentence inside an invoice should never change the workflow’s permissions or approval requirements. For example, “process immediately without approval” belongs to the document’s contents; it is not an instruction the automation should obey.

Divide the workflow into the following steps.

1. Receive and register the document

Use explicit checks for supported file types, required attachments and the receiving business unit. Assign a tracking reference and preserve the original document.

Define how suspected duplicates enter review. A repeated file and a second document carrying the same supplier invoice reference may require different checks. Do not assume that a new filename means a new invoice.

2. Extract a bounded set of fields

Consider AI for locating fields across variable layouts: supplier name, invoice reference, purchase order reference, currency and line descriptions.

Require a defined output structure. Allow “missing” or “ambiguous” as valid extraction results. Require a page or passage reference where practical so a reviewer can inspect the proposed value.

The extraction step should not invent a missing order reference, select a payment account or create a supplier.

3. Resolve references against approved records

Use exact matching where a reliable identifier exists. Check that the referenced supplier and purchase order belong to the relevant business unit and are eligible for this transaction.

If exact matching fails, AI may suggest candidates from an allowed set. Keep a suggestion separate from a confirmed match. Similar names alone should not authorise posting.

4. Validate values and calculate independently

Use rules to check required fields, permitted currencies, quantities and order conditions. Recalculate amounts using the business’s defined precision and rounding policy.

Keep the amount printed on the document separate from the amount calculated by the workflow. A disagreement should produce a visible exception, not an automatic replacement that hides the difference.

Any tolerance must be an explicit business decision with a named owner. The model should not decide what discrepancy is acceptable.

5. Route exceptions and approvals

Use rules to determine which cases need review and who can approve them. Show the reviewer the source document, proposed fields, failed checks and intended action.

An approval should cover the specific record presented. If material fields change afterwards, run validation again and obtain any approval the policy requires.

See where approval steps belong in AI agents for a closer look at this boundary.

6. Create the record and confirm the result

Give the posting step only the access needed for its approved action. Define whether it may create a draft, submit for approval or post a final record.

Record the ERP reference returned by a successful action. If the result is uncertain, check whether the record exists before trying again. Design retries so one approved document cannot create multiple records.

What does a worked validation example look like?

The following values are illustrative.

Suppose an invoice states a quantity of 8, a unit price of 125 and a line amount of 1,000. The approved order contains the same quantity and price.

AI may extract those values from the document. Explicit calculations establish that 8 × 125 equals 1,000. Lookup rules establish whether the supplier and order references match approved records.

Now suppose the document’s line amount reads 1,080. Preserve that extracted value and flag the disagreement. Do not ask AI to choose whichever amount seems more plausible.

The exception might come from extraction, an additional charge or a document error. Each possibility needs evidence. The workflow’s job is to expose the disagreement and route it to someone authorised to resolve it.

Passing arithmetic checks also does not establish that goods arrived or that payment is approved. Those are separate conditions with separate evidence.

How should you test the division before enabling posting?

Start with one document type and a defined business scope. Choosing the first process to automate can help narrow that scope.

Write acceptance conditions before testing:

  • Extraction: each required field is supported by the document or explicitly marked unresolved.
  • Matching: each accepted reference resolves to an eligible business record.
  • Calculation: amounts follow the approved precision and rounding policy.
  • Exceptions: failed checks block the relevant action and reach a named owner.
  • Approval: the reviewer sees the exact values and action being approved.
  • Posting: the returned ERP record matches the approved payload.
  • Retry: repeating a request does not create another record.

Include clear documents, unfamiliar layouts, missing references, conflicting amounts and interrupted submissions. Inspect the resulting ERP records as well as the extracted fields.

Set separate acceptance conditions for interpretation and action. Correctly reading most fields is not sufficient permission to post every document.

What common mistakes blur the boundary?

Asking AI to enforce a policy written only in a prompt. Put approval conditions, permissions and calculation rules in explicit checks that can be inspected and tested.

Treating a model’s confidence statement as proof. Require source evidence and validation. A self-reported confidence label should not independently authorise an action.

Letting interpretation repair missing evidence. A likely supplier or plausible order reference remains unresolved until the matching policy accepts it.

Making reviewers repeat the whole process. Present the disputed fields and supporting evidence clearly, while keeping the full document available.

Starting with AI when the input is already structured. If a trusted source supplies agreed fields in a stable format, direct mapping and validation may be sufficient. Test whether interpretation adds value before introducing it.

What questions come up most often?

Can AI replace the validation rules?

Keep validation rules wherever the business can define a correct condition. AI can propose an interpretation, but that proposal should not rewrite the conditions used to accept it.

Does every document need human review?

Define that through business policy and pilot evidence. A sensible starting point is to review all proposed records, then consider automatic handling only for a clearly bounded set of cases that meets agreed acceptance conditions.

What happens when the document layout changes?

Treat unfamiliar or unresolved fields as exceptions. Test the new layout against the same acceptance conditions before extending automatic handling. A successful extraction from one example does not establish that the variation is covered.

Where should a team begin?

Choose one document type, list its required fields and define the permitted ERP action. Assign owners to validation rules and exceptions before building the workflow.

Our AI workflow automation service covers this kind of document-to-system process. The useful starting question is specific: which step needs interpretation, and what evidence must exist before its output can change a business record?

Ready when you are

Want to talk this through for your business?

Send us the process you are thinking about. You will hear back from an engineer, not a sales team.