mcpbeat

Workflow Automation

joellewis/workflow-automation

Design human-in-the-loop workflow orchestration for securities operations: task routing, approval chains, and SLA monitoring. Use when building multi-level approval chains with dollar thresholds and delegation of authority, enforcing four-eyes (maker-checker) controls, defining escalation rules for aging work items approaching SLA breach, designing human-in-the-loop gates, selecting a workflow engine or BPM platform (Camunda, Pega, ServiceNow), modeling a process as a state machine, adding audit trails for SEC Rule 17a-3/17a-4 or FINRA supervisory obligations, or migrating from email-and-spreadsheet tracking. For zero-touch automation rates and STP measurement, see stp-automation.

11k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
161
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/JoelLewis/finance_skills --skill workflow-automation

What comes with it

13 317 bytes besides the instruction
references/examples.md

The instruction itself

13 sections, as written by the author

Workflow Automation

Core Concepts

1. BPM Fundamentals for Financial Operations

Business process management (BPM) is the discipline of modeling, executing, monitoring, and improving operational processes. In securities operations, BPM applies to every repeatable process that involves multiple steps, multiple participants, or decision points: account opening, account maintenance requests, transfer processing, corporate action elections, reconciliation break resolution, and billing exception handling.

Process modeling. A workflow begins as a process model — a formal representation of the steps, decision points, roles, and data flows in an operational process. The model serves three purposes: (1) it documents how the process works for training, audit, and examination purposes, (2) it provides the blueprint for automation, and (3) it establishes the baseline for measurement and improvement.

Process modeling notation. BPMN 2.0 is the industry standard for process modeling; model operational processes with tasks, decision gateways, start/intermediate/end events, and swim lanes per responsible role so that handoffs between operations, compliance, and external systems are explicit and visible.

Process decomposition. Complex operations workflows are decomposed into sub-processes. An account opening workflow decomposes into: data collection, KYC verification, document review, custodian submission, confirmation processing, and account activation. Each sub-process can be modeled, automated, and measured independently while the parent process orchestrates the sequence.

State machines for financial workflows. Many operations items are best modeled as state machines — an item exists in one of several defined states, and transitions between states are triggered by events or actions. A transfer request might have states: Initiated, Validated, Submitted to ACATS, In Progress, Completed, Rejected, Cancelled. Each transition has a guard condition (e.g., the transition from Validated to Submitted requires all validation checks to pass) and an action (e.g., send ACATS message). State machines enforce that items follow valid paths and prevent invalid transitions (an item cannot move from Initiated to Completed without passing through Validated and Submitted).

2. Task Routing and Assignment

Task routing determines which person or team receives a work item when it enters the workflow. Effective routing minimizes queue wait time, balances workload, and ensures items reach someone with the appropriate skill and authority.

Role-based routing. The simplest routing strategy. Each task type is assigned to a role (e.g., "Account Opening Analyst," "Transfer Specialist," "Senior Operations Reviewer"), and any person filling that role can pick up the task. Role-based routing is sufficient when all members of a role have equivalent skills and authority.

Skill-based routing. Extends role-based routing by matching task attributes to individual skill profiles. A trust account opening routes to analysts certified in entity account processing. A cross-border transfer routes to analysts with international custody experience. Skill-based routing reduces rework by ensuring the first handler has the competence to resolve the item.

Round-robin assignment. Tasks are distributed evenly across team members in rotation. Round-robin prevents any one person from being overloaded but does not account for task complexity or individual capacity. It works well when tasks are roughly uniform in effort.

Workload-based assignment. Tasks are assigned to the team member with the lowest current workload, measured by the number of open items, the total estimated effort of open items, or a weighted score that considers both. Workload-based assignment adapts to variable throughput across team members and handles uneven task complexity better than round-robin.

Queue management. When tasks cannot be immediately assigned (because all qualified team members are at capacity), they enter a queue. Queue management includes: priority ordering within the queue (SLA deadline, dollar value, client tier), visibility into queue depth and wait time for management, and automatic re-routing if a queue exceeds a defined depth or wait-time threshold.

Capacity planning. Historical data on task volumes, processing times, and SLA targets feeds capacity models that determine how many staff are needed for each role. Workflow systems capture the data needed for capacity planning: arrival rate (tasks per hour/day), service rate (average processing time per task), and queue wait time.

3. Approval Chains and Authorization

Many operations tasks require one or more approvals before proceeding. Approval chains enforce segregation of duties, limit authority by seniority and dollar value, and create a documented decision trail.

Multi-level approval workflows. A simple task may require one approval (e.g., standard account maintenance reviewed by a team lead). A high-risk task may require two or three levels (e.g., a large wire transfer reviewed by an operations analyst, then a senior manager, then a compliance officer). The number of approval levels is determined by the risk profile of the task, defined in the firm's delegation of authority matrix.

Approval matrices by dollar amount and risk level. A delegation of authority matrix maps task types and dollar thresholds to required approval levels. Example structure:

| Task Type | Amount or Risk | Approval Required |

|---|---|---|

| Cash disbursement | Under $25,000 | Operations analyst |

| Cash disbursement | $25,000 - $100,000 | Operations analyst + team lead |

| Cash disbursement | Over $100,000 | Operations analyst + team lead + operations manager |

| Account transfer (full ACAT) | Any | Operations analyst + supervisory review |

| Journal entry (different registration) | Any | Operations analyst + compliance review |

| Fee waiver or adjustment | Under $500 | Team lead |

| Fee waiver or adjustment | Over $500 | Operations manager |

Four-eyes principle. A foundational control in financial services: no single individual should be able to initiate and approve a transaction. The maker-checker pattern requires one person to prepare (make) and a different person to review and approve (check). For high-value or high-risk items, a third reviewer (four-eyes plus) may be required. Workflow systems enforce the four-eyes principle by preventing the initiator from also serving as the approver for the same item.

Delegation of authority. When an approver is unavailable (out of office, on leave), the workflow must support delegation — the designated alternate inherits the approval authority for a defined period. Delegation must be: (1) explicitly configured in advance by the primary approver or a system administrator, (2) time-limited (auto-expires at the end of the delegation period), (3) logged (the audit trail records that the delegate approved on behalf of the primary), and (4) restricted (the delegate cannot further delegate).

Timeout and auto-escalation. If an approval sits unactioned beyond a defined threshold, the workflow escalates automatically. A first-level escalation sends a reminder to the assigned approver. A second-level escalation notifies the approver's manager. A third-level escalation reassigns the item to an alternate approver. Timeout thresholds are tied to the SLA for the task type — a same-day disbursement cannot wait 24 hours for approval.

4. Escalation Rules and SLA Monitoring

Service-level agreements define the expected completion time for each task type. Escalation rules enforce SLAs by triggering progressively urgent actions as items age toward or beyond their deadlines.

SLA definition per task type. Each operational task type has a defined SLA based on regulatory requirements, client expectations, and operational capacity. Examples:

| Task Type | SLA Target | Regulatory Driver |

|---|---|---|

| ACAT transfer validation | 3 business days | FINRA Rule 11870 |

| ACAT transfer completion | 6 business days | FINRA Rule 11870 |

| Account maintenance (name change) | 2 business days | Internal service standard |

| Cash disbursement | Same day (if before cutoff) | Client expectation |

| Corporate action election submission | 1 business day before DTC deadline | DTC PTOP/ATOP rules |

| Reconciliation break resolution | 5 business days (standard), 1 business day (high value) | SEC Rule 15c3-3, fiduciary obligation |

| New account opening | 3 business days | Internal service standard |

SLAs are measured from the time the task enters the workflow (not from when it is assigned to an individual) to the time it is completed or resolved.

Aging thresholds. Work items are classified by age relative to their SLA:

  • Green — within the first 50% of the SLA window. No action needed beyond normal processing.
  • Yellow — between 50% and 80% of the SLA window. The item appears on the priority list and the assigned analyst is prompted to accelerate.
  • Red — between 80% and 100% of the SLA window. Management is notified. The item is escalated to the next tier if not actively being worked.
  • Breached — SLA exceeded. A formal breach is recorded. The item is escalated to senior management and included in the SLA breach report.

Escalation tiers. Escalation follows a defined chain:

  • Tier 1: Notification to the assigned analyst (automated reminder).
  • Tier 2: Notification to the team lead with a request to intervene or reassign.
  • Tier 3: Notification to the operations manager with a summary of the blocked item and the reason for delay.
  • Tier 4: Notification to the head of operations or COO for items that represent regulatory risk or significant client impact.

Each tier includes a defined time interval. If Tier 1 does not resolve the item within the interval, Tier 2 fires automatically.

Notification cadence. Escalation notifications follow a frequency schedule: initial alert, then periodic reminders at defined intervals (e.g., every 2 hours for same-day SLAs, every business day for multi-day SLAs). Notification fatigue is a real risk — if escalations fire too frequently or for low-priority items, recipients learn to ignore them. Calibrate notification thresholds to match the urgency and volume of each task type.

SLA breach handling. When an SLA is breached, the workflow system records the breach with: the task identifier, the SLA target, the actual completion time (or that the item remains open), the root cause (if determined), and the responsible party. Breach data feeds management reporting, trend analysis, and process improvement prioritization.

Management reporting. SLA dashboards provide real-time and historical views:

  • Current queue depth by task type and age band (green/yellow/red/breached)
  • SLA compliance rate by task type (percentage completed within SLA)
  • Trend analysis: SLA compliance over time, identifying improving or degrading processes
  • Top breach causes: categorized root causes for the most frequent SLA misses
  • Analyst-level metrics: individual throughput, average processing time, SLA compliance

5. Process Orchestration Patterns

Orchestration defines how individual tasks are sequenced, parallelized, and conditioned to form a complete workflow.

Sequential processing. Tasks execute in a defined order. Each task must complete before the next begins. Example: account maintenance request received, then validated, then executed, then confirmed. Sequential processing is appropriate when each step depends on the output of the previous step.

Parallel processing. Multiple tasks execute simultaneously. Example: during account opening, KYC verification, document review, and custodian pre-validation run in parallel because they are independent. A synchronization point (join gateway) waits for all parallel tasks to complete before the workflow proceeds to the next step. Parallel processing reduces total cycle time.

Conditional branching. The workflow takes different paths based on data conditions. Example: if the account type is individual, route to the simple opening path; if the account type is trust, route to the entity review path; if the account type is estate, route to the legal documentation review path. Conditional branching is implemented with exclusive (XOR) gateways.

Sub-process invocation. A parent workflow delegates a portion of its work to a self-contained sub-process. The sub-process has its own tasks, gateways, and error handling. Example: the account opening workflow invokes a "KYC verification" sub-process that handles identity verification, screening, and risk scoring. Sub-processes promote reuse (the same KYC sub-process is invoked by account opening, account maintenance, and periodic review workflows) and maintainability (changes to KYC logic are made in one place).

Event-driven triggers. The workflow starts or advances in response to an external event rather than a timer or human action. Example: a custodian sends a settlement confirmation message, which triggers the reconciliation workflow for that transaction. A corporate action announcement from a data vendor triggers the event setup workflow. Event-driven processing requires a message bus or event broker (Kafka, RabbitMQ, or a cloud-native equivalent) to decouple the event source from the workflow engine.

Timer-based triggers. The workflow starts or advances based on a schedule or elapsed time. Example: daily reconciliation runs at 7:00 AM after custodian files arrive. An account maintenance request that has been in "pending documentation" state for 30 calendar days triggers an auto-close workflow. Timer-based triggers are essential for deadline-driven processes like corporate action elections and regulatory filings.

Human-in-the-loop gates. At defined points in an otherwise automated workflow, the process pauses and waits for a human decision. Example: an automated KYC check returns a "review required" result; the workflow assigns the review to a compliance analyst and waits for an approve/reject decision before continuing. Human gates should be the exception, not the rule — each gate adds latency and staffing requirements. Design the workflow to minimize human gates by handling the most common cases automatically and reserving human review for genuinely ambiguous items.

6. Workflow Engines and Tooling for Financial Services

Selecting a workflow platform for securities operations requires evaluating both technical capabilities and financial-services-specific requirements.

Platform categories:

  • Enterprise BPM suites (Pega, Appian). Full-featured platforms with visual process designers, case management, analytics, and AI-assisted routing. Strong in regulated industries. High license cost, significant implementation effort, and vendor lock-in risk.
  • Open-source workflow engines (Camunda, Flowable, Temporal). Developer-oriented engines that provide workflow orchestration as code. Camunda supports BPMN 2.0 natively, integrates via REST APIs, and can be self-hosted or SaaS. Lower license cost, greater flexibility, but requires engineering staff to build and maintain.
  • IT service management platforms (ServiceNow). Originally designed for IT operations but increasingly used for business process workflows. Strong in ticketing, SLA management, and escalation. May require customization to handle securities-specific workflow semantics.
  • Custom-built workflow engines. Built in-house using state machine libraries, message queues, and database-backed task tables. Maximum flexibility and zero license cost, but high development and maintenance burden. Appropriate when the firm's workflows are highly specialized and commercial platforms cannot accommodate them without excessive customization.

Evaluation criteria for financial services:

  • Audit trail completeness. Every state change, assignment, approval, and escalation must be logged with timestamp, actor, and action. The audit trail must be immutable — entries cannot be modified or deleted. This is non-negotiable for SEC Rule 17a-3/17a-4 compliance.
  • Integration capabilities. The engine must integrate with custodian systems, portfolio management platforms, CRM, compliance screening tools, and document management systems. REST APIs, message queue connectors, and file-based integration are minimum requirements.
  • Role-based access control. Fine-grained permissions that restrict who can view, process, approve, and administer each workflow type. FINRA's supervisory obligations (Rule 3110) require that supervisors have visibility into and control over the workflows they oversee.
  • Scalability. The platform must handle peak volumes (quarter-end rebalancing, corporate action clusters, market volatility events) without degraded performance or SLA breaches.
  • Business continuity. The workflow engine is a critical operations system. It must support high availability, disaster recovery, and documented failover procedures.

Build vs. buy. The decision depends on the firm's size, engineering capability, and workflow complexity. Firms with fewer than 50 operations staff and standard workflows typically benefit from commercial platforms. Firms with large, specialized operations teams and highly customized workflows may find that the cost of customizing a commercial platform exceeds the cost of building a purpose-fit engine.

7. Audit Trail and Regulatory Compliance

In regulated financial services, every workflow action is a potential examination artifact. The audit trail must be complete, immutable, and retrievable.

Every action logged. The workflow system must record: who performed the action (user identity, not just role), what action was performed (state change, approval, rejection, reassignment, data modification), when the action occurred (timestamp with timezone), why the action was taken (approval reason, rejection reason, override justification), and the data state before and after the action.

Immutable records. Audit log entries must be write-once. No user — including administrators — should be able to modify or delete audit entries. This is a direct requirement of SEC Rule 17a-4, which mandates that records be preserved in a non-rewriteable, non-erasable format. Workflow systems that store audit logs in a standard relational database must implement application-level immutability controls or use append-only storage.

Books-and-records requirements for automated workflows. SEC Rule 17a-3 requires broker-dealers to create and maintain specified records, including records of all orders, transactions, and communications. When workflows automate the creation, routing, or approval of these records, the workflow itself becomes part of the books and records. The automated rules, decision logic, and configuration that govern the workflow must be documented and preserved alongside the transaction records. If a workflow rule is changed (e.g., the approval threshold for cash disbursements is raised from $25,000 to $50,000), the change must be documented with the effective date, the business justification, and the approver.

FINRA Rule 3110 (Supervision). FINRA requires member firms to establish and maintain supervisory systems, including written supervisory procedures, reasonably designed to achieve compliance with applicable securities laws and regulations. When operations workflows enforce supervisory controls (approval chains, exception reviews, compliance gates), the workflow configuration is part of the supervisory system. The workflow design must be reviewed and approved by compliance, and the firm must be able to demonstrate that the workflow enforces the supervisory procedures as written.

Examination defensibility. During a regulatory examination (SEC, FINRA, state regulators), examiners may request: a description of the workflow for a specific process, the audit trail for specific transactions or time periods, evidence that approval controls were functioning as designed, documentation of any workflow rule changes, and SLA performance data. The workflow system must support efficient retrieval of this information.

8. Measuring Workflow Effectiveness

Quantitative measurement is essential to identify bottlenecks, justify investments, and demonstrate operational improvement.

Cycle time. The elapsed time from when a work item enters the workflow to when it reaches a terminal state (completed, rejected, cancelled). Cycle time includes both processing time (time actively being worked) and wait time (time in queues, awaiting approval, waiting for external input). Measuring cycle time by task type and by process step reveals where delays accumulate.

Throughput. The number of work items completed per unit time (per hour, per day, per month). Throughput per analyst measures individual productivity. Throughput per process measures operational capacity. Declining throughput with stable volume indicates a capacity or efficiency problem.

Queue depth. The number of work items waiting to be processed at any point in time. Persistently growing queue depth indicates that arrival rate exceeds processing capacity. Queue depth by task type identifies which processes are under-resourced or under-automated.

SLA compliance rate. The percentage of work items completed within their defined SLA. Calculated as: items completed within SLA divided by total items completed. SLA compliance below target triggers root cause analysis and process improvement.

Rework rate. The percentage of work items that are returned to a previous step due to errors, missing information, or rejected approvals. Rework consumes capacity without producing throughput. High rework rates indicate unclear procedures, inadequate training, or poor upstream data quality.

Automation rate. The percentage of work items that complete without any human intervention (fully automated, or STP). Automation rate is the inverse of the exception rate. Tracking automation rate over time measures the effectiveness of STP initiatives and rule-based processing enhancements.

First-contact resolution rate. The percentage of work items resolved by the first person who touches them, without reassignment or escalation. Low first-contact resolution indicates routing problems (items are reaching the wrong person) or skill gaps (the assigned person cannot resolve the item).

Worked Examples

Three worked examples — a high-value account transfer approval matrix ($500K/$2M tiers, third-party and senior-investor triggers), Salesforce-based SLA monitoring for account maintenance requests, and a Day -10 through Day 0 escalation timeline for corporate action elections — are in references/examples.md; load it when designing a concrete approval chain, SLA program, or escalation framework.

Common Pitfalls

  • Designing the workflow around the current org chart rather than the process. Organization structures change. Workflow routing and approval logic should reference roles and authority levels, not named individuals. When a team lead leaves, the workflow should need only a role reassignment, not a redesign.
  • Setting SLA targets without measuring the baseline. If the current average cycle time for account re-registrations is 8 business days, setting a 2-day SLA without process changes guarantees chronic breaches and erodes confidence in the SLA program.
  • Building approval chains that are too deep. Each approval tier adds latency. A five-level approval chain for a routine account maintenance request slows processing without adding commensurate risk reduction. Calibrate the number of approval tiers to the actual risk of the task.
  • Ignoring the timeout and delegation problem. Approval workflows that do not handle approver absence (vacation, illness, turnover) create bottlenecks. Every approval tier must have a configured delegate and a timeout escalation. Without these, a single absent approver can halt an entire process queue.
  • Treating workflow automation as a one-time project. Workflows require ongoing maintenance: rules change as regulations evolve, SLA targets are adjusted based on operational experience, new task types emerge, and routing logic needs recalibration as teams grow or restructure. Budget for ongoing workflow administration.
  • Failing to log the "why" in the audit trail. Recording that an item was approved is insufficient. The audit trail must capture the reason for the decision, especially for overrides, exceptions, and rejections. A bare approval/reject stamp without justification does not satisfy SEC or FINRA examination standards.
  • Sending too many notifications. Escalation systems that fire alerts for every aging item, regardless of priority, train recipients to ignore alerts. Use threshold-based alerting (only alert when a meaningful percentage of the queue is at risk) and prioritize high-value, high-risk items in notifications.
  • Not integrating the workflow engine with downstream systems. A workflow that tracks task status but requires separate manual entry into the custodian portal, CRM, and portfolio management system does not reduce effort — it adds a layer of tracking on top of the existing work. The workflow engine must trigger actions in downstream systems or the automation is illusory.
  • Modeling every process as a linear sequence. Real operations workflows have parallel paths, conditional branches, and loops. Forcing a naturally parallel process (e.g., document review and KYC verification running concurrently during account opening) into a sequential model unnecessarily lengthens cycle time.
  • Neglecting capacity planning when volumes increase. Workflow automation makes work visible, but it does not eliminate work. When volumes increase, queue depths grow and SLAs breach unless staffing or automation is adjusted. Use queue depth trends and arrival rate data from the workflow system to anticipate capacity needs before SLAs degrade.
  • Automating without documenting the rules. If automated routing, approval, and escalation rules are embedded in code or configuration without corresponding written documentation, the firm cannot demonstrate to examiners how its supervisory system works. Written supervisory procedures must reflect the automated workflow logic.
  • Skipping user acceptance testing for workflow changes. Changing an approval threshold, routing rule, or escalation timer in production without testing can cause items to route incorrectly, approvals to be skipped, or escalations to fire inappropriately. All workflow configuration changes should follow the same change management discipline as software releases.

Cross-References

  • stp-automation (client-operations plugin) — STP is the end goal of operations automation; workflow automation handles the exceptions and human-in-the-loop steps that STP cannot yet cover.
  • account-opening-workflow (client-operations plugin) — Account opening is a primary domain for workflow automation, with multi-step approval chains, conditional routing by account type, and custodian submission orchestration.
  • account-maintenance (client-operations plugin) — Maintenance requests (name changes, beneficiary updates, re-registrations) are routed, tracked, and SLA-monitored through workflow systems.
  • account-transfers (client-operations plugin) — Transfers require multi-step approval workflows with dollar-based thresholds, FINRA-mandated timelines, and escalation for aging items.
  • corporate-actions (client-operations plugin) — Voluntary corporate actions have deadline-driven workflows for client notification, election collection, escalation, and DTC submission.
  • reconciliation (client-operations plugin) — Reconciliation break resolution follows escalation workflows with aging thresholds, priority routing, and management reporting.
  • operational-risk (trading-operations plugin) — Workflow controls (approval chains, four-eyes principle, SLA monitoring) are operational risk mitigations that reduce processing errors and missed deadlines.
  • books-and-records (compliance plugin) — Workflow audit trails are regulatory records subject to SEC Rule 17a-3/17a-4 preservation requirements and FINRA examination review.

How to use it

Copy the folder

Take joellewis/workflow-automation from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.