Skip to content

KYC with approval

When a new account application arrives, check the customer’s identity with your KYC provider, decide the path with clear rules, have a reviewer approve anything that is not straightforward, activate the account in your core system, and keep evidence of every decision.

Step ids are shown in brackets; later steps refer to them.

  1. API / webhook start: input fields applicationId, customerName, phone (phone), pan, declaredIncome (number), product (choice: savings, current). Duplicate key applicationId. Respond Immediately.
  2. MCP tool kyc: your KYC provider’s server, tool verify_pan, inputs pan = input.pan, name = input.customerName. Store result as kyc. Retries 2.
  3. Condition verified: kyc.verified == true.
    • true: go to step 4.
    • false: go to step 11.
  4. Mask PII: fields input.pan, mask as last4, for the rest of the run.
  5. Decision (rules) rules: outcomes auto_approve, review. Rules, first match wins:
    • input.declaredIncome > 2500000 → review
    • input.product == "current" → review
    • default → auto_approve
  6. Approval review (on review): approver role KYC reviewer, instructions Review application {{ input.applicationId }} for {{ input.customerName }}., SLA 24h, approvals needed 1, the person who started the run cannot approve, a rejection needs a reason, remind 4h before the SLA, then escalate to role KYC lead.
    • approved: go to step 7.
    • rejected: go to step 11.
    • timeout: go to step 12.
  7. Audit checkpoint: evidence name kyc_decision, evidence applicationId = input.applicationId, kyc = steps.kyc, review = steps.review, retention regulated_7y.
  8. MCP tool activate: your core system, tool activate_account, inputs from run data. Store result as account. Retries 3.
  9. End: outcome activated, output accountNumber = account.accountNumber.

The auto_approve outcome of step 5 also goes to step 7.

Exception paths:

  1. Error handler on the On error ports of both MCP tool steps: action escalate to Account operations, then end with outcome kyc_system_error.
  2. End: outcome rejected, result failed.
  3. Escalation: queue KYC lead, reason Review of {{ input.applicationId }} is overdue, then an End with outcome review_overdue.

Your system learns the result from the run’s outcome: read GET /runs/{runId} or subscribe to run.completed and run.failed webhooks, and tell the customer from there.

{
"input": {
"applicationId": "APP-30017",
"customerName": "Ravi Kumar",
"phone": "+919800000000",
"pan": "ABCDE1234F",
"declaredIncome": 1800000,
"product": "savings"
},
"correlation": {"caseRef": "APP-30017"}
}

These are sample values. Never use real identity numbers in tests.

  • The MCP tool calls your KYC provider. The Condition checks the verified field it returns.
  • Mask PII replaces the PAN with its last four characters, so later steps and the run view never see the full number.
  • The Decision keeps risk rules in one table you can read and change. Add Test cases to it (sample inputs and the expected outcome); a rule change that breaks one cannot be published.
  • The Approval is a maker-checker step: the person who started the run cannot approve it, and a rejection must say why. The reviewer works from Workflows → Tasks.
  • The Audit checkpoint records the evidence with a hash chained to earlier checkpoints of the run, so later changes are detectable.
  • The Error handler opens a case for operations if a system call still fails after its retries.
  1. Open Test workflow and start from the API trigger with the payload above. Set Speed to Hours as seconds. Point the MCP tool steps at sandbox servers, because tool calls run for real.
  2. Use a declaredIncome above 2500000 to reach the Approval. Approve or reject it in the window as the KYC reviewer role.
  3. Check the run view: the PAN shows as masked after step 4, and the audit entry is in the timeline.
  • Two approvers for high values: set Approvals needed to 2.
  • Approval on the activation call itself: turn on Needs approval before running on the activate MCP tool step instead of a separate Approval.
  • Built-in identity check (beta): the Identity check step wraps the KYC call and adds OTP. Test it end to end in the test window first.
  • Let your back office decide via API (beta): approvals of live runs can be listed and decided through the public tasks API. See the Workflows API guide.