Computer Applications

Chapter 10
Computational Thinking and Business Automation

Bachelor of Business Administration
Computer Applications   •   Under Graduate

Computational Thinking and Business Automation

Introduction

Business professionals increasingly work with processes that are repetitive, rule-based, data-intensive, and dependent on timely decisions. Examples include checking invoices, updating customer records, preparing sales reports, approving leave requests, and reconciling payments. Computational thinking provides a disciplined way to understand such problems and express solutions so that people, spreadsheets, software, or automated agents can execute them consistently.

Computational thinking is not limited to programming. It is a problem-solving approach based on decomposition, pattern recognition, abstraction, algorithmic thinking, evaluation, and iterative improvement. In business, these ideas help managers identify inefficiencies, specify requirements, assess automation opportunities, and communicate effectively with technical specialists.

Business automation is the use of technology to execute business activities with limited human intervention. Automation may be implemented through spreadsheet macros, low-code or no-code platforms, workflow systems, robotic process automation (RPA), or conventional software. Effective automation begins with a clearly understood process; automating a poorly designed process may merely make errors occur faster.

Learning Objectives

After studying this chapter, students should be able to:

  1. Decompose a business problem into manageable components.
  2. Explain abstraction, pattern recognition, and algorithmic thinking in business contexts.
  3. Design algorithms using structured steps, flowcharts, and pseudocode.
  4. Apply basic programming concepts such as variables, data types, operators, conditions, loops, functions, and validation.
  5. Distinguish macros, low-code tools, workflow automation, and RPA.
  6. Evaluate automation opportunities using feasibility, risk, cost, control, and performance criteria.
  7. Recognize ethical, security, governance, and maintenance requirements for automation.

1. Computational Thinking in Business

Computational thinking is a structured method for formulating problems and solutions so that they can be carried out by a human or computational system. It has four closely related practices.

Decomposition

Decomposition divides a complex problem into smaller, understandable tasks. Consider the apparently simple task “process a supplier invoice.” It can be decomposed into:

  • receive the invoice;
  • identify the supplier;
  • check whether required fields are present;
  • compare the invoice with a purchase order;
  • verify receipt of goods or services;
  • calculate tax and total amount;
  • route the invoice for approval;
  • record the transaction; and
  • notify accounts payable of exceptions.

Each component can be analysed separately, assigned to a person or system, and tested independently. Decomposition reduces cognitive complexity and exposes points where information, decisions, or controls are required.

Pattern Recognition

Pattern recognition identifies similarities across transactions or processes. For example, every approved expense claim may require an employee identifier, date, category, amount, receipt, and manager approval. Recognising this pattern permits a reusable validation rule or workflow template.

Patterns can also reveal exceptions. If most invoices are below a threshold but a small number are unusually large, the process may require an exception route rather than identical treatment for every invoice.

Abstraction

Abstraction focuses attention on relevant information while hiding unnecessary detail. A sales manager may need the customer, product, quantity, price, discount, and date, but not the technical storage format of the transaction record. A well-designed abstraction presents the information and actions needed by a user without exposing irrelevant implementation details.

Abstraction must not conceal information that is necessary for control. For example, an approval screen may hide database fields, but it should display the amount, supplier, supporting evidence, and approval history needed for a responsible decision.

Algorithmic Thinking

Algorithmic thinking expresses a solution as a finite, ordered, and unambiguous set of steps. An algorithm should specify:

  • inputs;
  • processing rules;
  • decisions and conditions;
  • outputs;
  • termination; and
  • treatment of errors or exceptional cases.

A business rule such as “give a discount to important customers” is not yet an algorithm because “important” is undefined. A more precise rule could be: “If the customer is in the Gold segment and the order value is at least 50,000 currency units, apply a 10% discount; otherwise apply no automatic discount.”

2. From Business Problem to Algorithm

A sound automation design normally follows this sequence:

  1. Define the objective. State the business result required.
  2. Identify inputs and outputs. Specify data sources, formats, owners, and destinations.
  3. Map the current process. Record activities, decisions, hand-offs, delays, and exceptions.
  4. Decompose the process. Separate major activities into smaller tasks.
  5. Specify rules. Convert informal policies into explicit conditions.
  6. Design the algorithm. Arrange steps in logical order.
  7. Test representative cases. Include normal, boundary, invalid, and exceptional cases.
  8. Select an implementation technology. Choose the simplest reliable tool that meets the need.
  9. Monitor and improve. Measure results and revise the process when requirements change.

Inputs, Processing, and Outputs

The input–process–output model is a useful starting point. For a payroll calculation, inputs may include hours worked, pay rate, tax status, and approved deductions. Processing applies the organisation’s rules. Outputs include gross pay, deductions, net pay, and a payroll record. A process should also identify errors, such as missing hours or an invalid employee identifier.

The quality of an output depends on more than the algorithm. A useful principle is “garbage in, garbage out”: incorrect, incomplete, or inconsistent input data can produce an apparently precise but unreliable result.

Decision Tables

A decision table represents combinations of conditions and their corresponding actions. For example, a credit-control rule may be expressed as follows:

Customer statusAccount overdue?Amount requestedAction
ApprovedNoAny amountApprove automatically
ApprovedYes≤ 10,000Refer for review
ApprovedYes> 10,000Reject automatically
Not approvedAnyAny amountReject automatically

Decision tables reduce ambiguity and help identify missing combinations. They are especially valuable when several conditions interact.

3. Flowcharts and Pseudocode

Flowcharts

A flowchart is a graphical representation of process logic. Standard conventions include:

  • an oval for start or end;
  • a rectangle for a process;
  • a diamond for a decision;
  • a parallelogram for input or output; and
  • arrows for the direction of control flow.

A decision should normally have clearly labelled branches such as “Yes” and “No.” Every path should eventually reach a meaningful outcome or an explicitly designed error-handling step. A flowchart for an expense claim might begin by receiving the claim, check whether the receipt is present, verify the amount against policy, route valid claims for approval, and return invalid claims for correction.

Flowcharts are useful for communicating with non-programmers and for finding redundant steps, loops, and missing exception paths. However, very large flowcharts become difficult to maintain. In those cases, a high-level process map should be supported by smaller flowcharts for individual subprocesses.

Pseudocode

Pseudocode is a structured, language-independent description of an algorithm. It uses ordinary words and programming-like structures without requiring the syntax of a particular language. Good pseudocode is precise enough to implement and simple enough for business stakeholders to review.

Example: invoice approval pseudocode

BEGIN
    READ invoice amount, supplier status, purchase-order status
    IF supplier status is not "Approved" THEN
        SEND invoice to supplier-review queue
    ELSE IF purchase-order status is not "Matched" THEN
        SEND invoice to exception queue
    ELSE IF invoice amount > 100000 THEN
        SEND invoice to senior-approval queue
    ELSE
        APPROVE invoice for normal payment processing
    END IF
    RECORD decision and reason
END

The order of conditions matters. Supplier status is checked first because an unapproved supplier should not proceed merely because other data appears correct. Pseudocode should also state what happens when data is missing, invalid, or unavailable.

4. Basic Programming Concepts for Business Users

Business users do not need to become professional software developers to benefit from programming concepts. These concepts help them specify requirements, inspect formulas and macros, and evaluate automation quality.

Variables and Constants

A variable is a named storage location whose value may change, such as invoiceTotal or unitsSold. A constant is a named value intended not to change during execution, such as an approved discount limit. Meaningful names improve readability and reduce errors.

Data Types

Common data types include:

  • Integer: whole numbers, such as number of units.
  • Decimal or floating-point number: values containing fractions, such as prices.
  • String: text, such as a customer name or invoice code.
  • Boolean: either true or false, such as isApproved.
  • Date/time: calendar dates or timestamps.

A date should not be treated as ordinary text when the system must compare dates. Similarly, an account number may contain leading zeroes and should often be stored as text rather than as a number.

Operators and Expressions

Arithmetic operators perform calculations, comparison operators test relationships, and logical operators combine conditions. For example, the expression amount > 50000 AND customerStatus = "Gold" is true only when both conditions are true. Parentheses should be used when they make the intended order of evaluation clearer.

Sequence, Selection, and Iteration

The three fundamental control structures are:

  1. Sequence: execute instructions in order.
  2. Selection: choose among alternatives using IF, ELSE IF, and ELSE.
  3. Iteration: repeat instructions using a loop, such as FOR EACH or WHILE.

Example of iteration:

BEGIN
    SET total = 0
    FOR EACH lineItem in order
        IF lineItem.quantity < 0 THEN
            FLAG order as invalid
        ELSE
            SET total = total + (lineItem.quantity × lineItem.unitPrice)
        END IF
    NEXT lineItem
    OUTPUT total
END

The loop processes each item, while validation prevents a negative quantity from being silently included. A loop must have a clear termination condition; otherwise, it may become an infinite loop.

Functions and Modularity

A function is a named, reusable unit that accepts inputs and returns an output. For instance, calculateTax(amount, rate) can be used in several processes. Functions reduce duplication and make testing easier. A function should have a clear purpose and should avoid unexpected side effects, such as changing unrelated records without the caller’s knowledge.

Validation and Error Handling

Validation checks whether input meets defined requirements. Examples include checking that an amount is numeric and non-negative, a date is valid, or a required field is not blank. Error handling specifies what the system does when a problem occurs: reject the input, request correction, place the item in an exception queue, or alert a responsible employee.

Validation is different from authorisation. Validation asks whether data is structurally and logically acceptable; authorisation asks whether a person or transaction is permitted to perform an action.

5. Types of Business Automation

Spreadsheet Macros

A macro is a recorded or programmed sequence of actions in an application such as a spreadsheet. A macro can format reports, consolidate worksheets, import data, calculate results, or generate emails. Macros are attractive because they are accessible, inexpensive, and useful for local, repetitive tasks.

Their limitations include dependence on a particular file structure, user device, application version, and person who created the macro. Poorly designed macros may overwrite data, conceal logic, or execute malicious code. Macro-enabled files should therefore be controlled, tested, stored securely, and enabled only when their source is trusted.

Macros are appropriate when the process is relatively stable, the data volume is moderate, and users need a quick solution within an existing application. They are less appropriate for enterprise-wide workflows requiring central monitoring, strong segregation of duties, high availability, or integration across many systems.

Low-Code and No-Code Tools

Low-code platforms provide visual development components, configuration, forms, connectors, and limited custom code. No-code tools target users who configure applications without writing conventional code. They can support approval apps, dashboards, simple databases, notifications, and integrations.

Their strengths are rapid development, participation by business users, and reduced demand for specialist programming. Their risks include uncontrolled “shadow IT,” inconsistent data models, vendor dependence, insufficient testing, and difficulty managing complex logic. Low-code does not mean risk-free or maintenance-free. Organisations still need architecture standards, security review, access control, documentation, and ownership.

Workflow Automation

Workflow automation routes work, information, and decisions between people and systems according to defined rules. A leave-request workflow may accept a form, check available balance, route the request to a manager, update a human-resources system, and notify the employee.

Workflow automation is particularly suitable when the process involves approvals, queues, deadlines, notifications, and a known sequence of activities. It can improve transparency by recording status, timestamps, decisions, and responsibility.

Robotic Process Automation

RPA uses software bots to imitate user interactions with applications, such as reading a file, copying data between systems, selecting menu options, and generating a report. It is useful where systems lack modern integration interfaces and the task is repetitive, rule-based, high-volume, and relatively stable.

RPA is not equivalent to artificial intelligence. A conventional bot follows configured rules, whereas an AI system may infer patterns or classify unstructured content. RPA can be combined with optical character recognition or AI, but adding AI introduces further concerns about accuracy, explainability, bias, and human oversight.

RPA can be fragile when screen layouts, field names, passwords, or business rules change. It should not be used to conceal a fundamentally defective process or as a substitute for replacing an obsolete core system when a better integration option exists.

6. Evaluating an Automation Opportunity

Automation should be selected through structured analysis rather than enthusiasm for a particular tool. Important criteria include:

CriterionQuestions to ask
Volume and frequencyDoes the task occur often enough to justify automation?
Rule stabilityAre the rules clear and unlikely to change frequently?
Data qualityAre inputs complete, standardised, and accessible?
Exception rateHow often is human judgement required?
IntegrationCan systems exchange data reliably?
Risk and controlCould an error cause financial, legal, or reputational harm?
User impactWill automation improve service or create new barriers?
Cost and capabilityCan the organisation build, operate, and maintain it?
AuditabilityCan actions, approvals, and changes be traced?

A simple financial assessment may compare annual benefits with annual operating and implementation costs. If implementation cost is 24,000 currency units and expected annual savings are 36,000 currency units, a simple payback period is:

Payback period = Implementation cost ÷ Annual net benefit

The payback period is therefore 24,000 ÷ 36,000 = 0.667 years, or approximately eight months. This measure assumes that benefits and costs are estimated consistently and does not account for the time value of money, risk, or benefits that are difficult to quantify. It should support, not replace, a broader business case.

Potential benefits include lower processing time, fewer transcription errors, faster response, standardisation, improved compliance evidence, and employee release from monotonous work. Costs include licences, design, testing, training, support, cybersecurity, integration, and process redesign.

7. Case Study: Automating Supplier Invoice Routing

The following is an illustrative case, not a report of a specific organisation.

Background

A medium-sized distributor receives approximately 3,000 supplier invoices each month. Accounts-payable employees manually read email attachments, enter invoice details, check purchase-order information, and forward invoices for approval. Processing is slow, and managers have limited visibility into overdue items.

Problem Analysis

Process observation identifies four major activities: capture, validation, matching, and approval. Invoices arrive in different formats, supplier names are inconsistent, and some invoices do not contain a purchase-order number. The exception rate is 18%, mainly because of missing information or price differences.

The high-volume capture and routing tasks are repetitive, but exceptions require judgement. This distinction is important: automation should handle predictable cases and direct exceptions to trained employees.

Proposed Approach

A workflow platform receives invoices through a controlled mailbox. Text extraction captures supplier, invoice number, date, and amount. Validation checks mandatory fields and duplicate invoice numbers. A matching service compares the invoice with the purchase order and goods-receipt record. Matched invoices below the delegated approval threshold proceed automatically; unmatched invoices or high-value invoices enter an exception or senior-approval queue.

The algorithm is tested with normal invoices, duplicate invoices, missing purchase orders, different currencies, tax discrepancies, and invoices at exactly the approval threshold. A human remains responsible for resolving exceptions and approving high-risk transactions.

Outcome Measures

The organisation should measure average processing time, percentage of invoices processed without manual re-entry, exception-resolution time, duplicate-payment incidents, approval-cycle time, and user satisfaction. It should compare these measures with a baseline established before implementation.

Learning Points

The case demonstrates that decomposition reveals automation candidates, pseudocode clarifies decision rules, and exception analysis prevents unrealistic claims of “fully automatic” processing. It also shows that data quality and controls are as important as the selected technology.

8. Governance, Ethics, and Professional Practice

Automation changes responsibility; it does not eliminate it. Organisations should establish a process owner who is accountable for purpose, controls, performance, and continued suitability.

Important governance practices include:

  • documenting the process, rules, data sources, and assumptions;
  • applying least-privilege access;
  • separating development, testing, and production environments;
  • maintaining version histories and change approval;
  • recording bot and user activity in audit logs;
  • protecting credentials through secure credential stores;
  • testing failure and recovery procedures;
  • reviewing outputs rather than assuming automation is correct; and
  • defining a human escalation route.

Ethical concerns include unfair treatment caused by inappropriate rules, exclusion of users who cannot access digital channels, excessive employee surveillance, and unclear responsibility for automated decisions. Personal data should be collected and used only for legitimate purposes, retained for no longer than necessary, and protected against unauthorised access. Legal requirements differ by jurisdiction, so organisations should consult applicable privacy, employment, financial, accessibility, and records-management obligations.

A responsible automation design asks not only “Can this be automated?” but also “Should it be automated, who may be affected, and how can harm be detected and corrected?”

9. Implementation and Continuous Improvement

A practical implementation normally proceeds through discovery, design, prototype, testing, deployment, and review. A small pilot can expose data and exception problems before enterprise-wide adoption. Testing should include:

  • normal cases;
  • boundary values, such as an amount exactly equal to a threshold;
  • invalid and missing inputs;
  • duplicate records;
  • system outages;
  • unauthorised users; and
  • changes to source-system formats.

Acceptance criteria should be measurable. For example, “the workflow is successful” is weak, whereas “at least 98% of complete invoices are routed to the correct queue and every rejected invoice receives a recorded reason” is testable.

Performance should be monitored after deployment. A bot that processes transactions quickly but produces incorrect records is not successful. Monitoring should therefore include accuracy, exception rates, completion time, availability, control breaches, and user feedback. Processes should be redesigned when policies, systems, volumes, or customer expectations change.

Chapter Summary

Computational thinking provides a disciplined foundation for solving business problems. Decomposition divides complex work into manageable tasks; pattern recognition identifies reusable structures; abstraction separates essential information from implementation detail; and algorithmic thinking expresses a finite, unambiguous solution.

Algorithms can be communicated through flowcharts, decision tables, and pseudocode. Basic programming concepts—variables, data types, operators, sequence, selection, iteration, functions, validation, and error handling—enable business professionals to specify and evaluate automated solutions.

Macros, low-code tools, workflow automation, and RPA serve different purposes. Their suitability depends on process stability, data quality, volume, exceptions, integration, risk, cost, and governance. Automation should improve a well-understood process rather than accelerate a defective one. Effective implementation requires testing, security, auditability, human oversight, ethical consideration, and continuous monitoring.

Key Terms

Computational thinking: A structured approach to formulating problems and solutions for people or computational systems.

Decomposition: Breaking a complex problem or process into smaller components.

Pattern recognition: Identifying similarities, repetitions, or exceptions in data or processes.

Abstraction: Representing essential features while hiding irrelevant implementation detail.

Algorithm: A finite, ordered, and unambiguous set of steps for solving a problem.

Flowchart: A graphical representation of process logic using standard symbols.

Pseudocode: A language-independent, structured description of an algorithm.

Variable: A named storage location whose value may change.

Data type: A classification defining the kind of value that data can hold.

Boolean: A logical value that is true or false.

Selection: A control structure that chooses an action based on a condition.

Iteration: Repetition of instructions while a condition holds or for each item in a collection.

Function: A reusable unit of logic that accepts inputs and produces an output.

Validation: Checking whether data satisfies defined requirements.

Macro: A recorded or programmed sequence of actions within an application.

Low-code: Application development using visual configuration with limited conventional coding.

Workflow automation: Technology that routes tasks, information, and decisions according to rules.

Robotic process automation: Software bots that imitate structured user interactions with applications.

Exception: A condition that cannot be handled by the normal automated path.

Auditability: The ability to trace actions, decisions, changes, and responsibility.

Review Questions

Short Answer Questions

  1. Define computational thinking and explain why it is useful to business professionals.
  2. What is the difference between validation and authorisation?
  3. State the three fundamental programming control structures.
  4. Give two strengths and two limitations of spreadsheet macros.
  5. Why must an automation process include exception handling?

Long Answer Questions

  1. Explain decomposition, pattern recognition, abstraction, and algorithmic thinking using a business process of your choice.
  2. Compare flowcharts and pseudocode as methods for communicating business logic.
  3. Describe the basic programming concepts needed by a business user evaluating an automation proposal.
  4. Compare macros, low-code tools, workflow automation, and RPA in terms of use cases, strengths, and risks.
  5. Explain the governance and ethical responsibilities involved in deploying business automation.

Analytical / Application Questions

  1. A retailer wants to automate refund approvals. Design a decision table with at least three conditions and explain which cases should be escalated to a human.
  2. A company proposes an RPA bot for a process with many exceptions and frequent changes to a web interface. Evaluate the proposal and recommend an alternative or redesign.
  3. Design pseudocode for processing expense claims that checks for a missing receipt, a negative amount, a policy limit, and manager approval. Explain how your design handles invalid inputs.

Multiple Choice Questions with Answers

Question 1

Which computational-thinking practice divides a complex business process into smaller tasks?

A. Abstraction

B. Decomposition

C. Iteration

D. Encryption

Correct Answer: B. Decomposition

Question 2

Which representation is language-independent but expresses algorithmic logic in structured written steps?

A. Pseudocode

B. Database schema

C. Source-code compiler

D. Audit log

Correct Answer: A. Pseudocode

Question 3

Which control structure repeats instructions for each item in a collection?

A. Selection

B. Sequence

C. Iteration

D. Validation

Correct Answer: C. Iteration

Question 4

A customer receives a discount only when status is Gold AND order value is at least 50,000. What type of logic is being used?

A. A logical condition combining two tests

B. A data type declaration

C. A file-compression rule

D. A user-interface layout

Correct Answer: A. A logical condition combining two tests

Question 5

Which automation technology is most directly designed to route tasks and approvals between people and systems?

A. Workflow automation

B. Spreadsheet formatting

C. Data compression

D. Operating-system booting

Correct Answer: A. Workflow automation

Question 6

Which situation is generally most suitable for RPA?

A. A highly creative task requiring continual judgement

B. A stable, repetitive, rule-based task across applications

C. A process with no defined inputs or outputs

D. A task requiring constant redesign every hour

Correct Answer: B. A stable, repetitive, rule-based task across applications

Question 7

What is the primary purpose of validation?

A. To determine whether a user is authorised to act

B. To check whether data meets defined requirements

C. To guarantee that a process earns profit

D. To replace all human decisions

Correct Answer: B. To check whether data meets defined requirements

Question 8

An implementation costs 24,000 currency units and produces annual net benefits of 36,000 currency units. What is the simple payback period?

A. 0.25 years

B. 0.50 years

C. 0.667 years

D. 1.50 years

Correct Answer: C. 0.667 years

Question 9

Which is a major limitation of macros?

A. They can never perform calculations

B. They may depend heavily on a particular file structure and user environment

C. They cannot be tested

D. They always require an internet connection

Correct Answer: B. They may depend heavily on a particular file structure and user environment

Question 10

Why should an automation design retain a human escalation route?

A. Because every automated task must be performed manually first

B. Because exceptions and high-risk decisions may require judgement and accountability

C. Because automation cannot process any structured data

D. Because audit logs are unnecessary without humans

Correct Answer: B. Because exceptions and high-risk decisions may require judgement and accountability

Computer Applications
Chapter 10 of 15