Skip to main content

PURCHASE-001: Purchase Request Flow (IM-Workflow)

Download Materials​

You can download the prompt materials (a set of Markdown files) used in this sample from the links below.

Overview​

A system in which employees request the purchase of goods (consumables, equipment, machinery, etc.) needed for business, which are ordered by the purchasing department after approval by the department manager. The amount is set in a matter property at the time of application, and a branch route runs the request through accounting department approval when the total amount is a certain threshold or higher. The order data is recorded in the business table when the final approval is completed.

Target Users​

PersonaDescription
General EmployeeAn employee who requests the purchase of goods needed for business. Wants to apply easily and check progress
Department ManagerThe direct department manager who approves a subordinate's purchase request. Decides while considering business validity and departmental budget
Accounting Department StaffPerforms the final review of high-value purchase requests. Manages purchasing results and budget consumption across the company
Purchasing Department StaffReceives approved purchase requests and places orders with vendors

User Stories​

As a General Employee​

  • Can submit a purchase request by entering the item name, quantity, unit price, and vendor of the needed goods
  • Can withdraw a request that the department manager has not yet processed, in order to revise and resubmit it
  • Can cancel a request that is no longer needed
  • Can check the comment on a sent-back request, revise it, and resubmit it

As a Department Manager​

  • Can review a subordinate's purchase request details (items, amount, vendor, purpose) and approve, send it back, or deny it
  • Can convey the reason via a comment when sending back or denying
  • Can temporarily hold processing and resume it later
  • Can withdraw an approval if a subsequent node has not yet processed it

As Accounting Department Staff​

  • Can review a high-value purchase request (totaling 500,000 yen or more) and approve, send it back, or deny it
  • Can choose the send-back destination: the applicant or the department manager
  • Can send back the request as needed, weighing it against the company-wide budget

As Purchasing Department Staff​

  • Can receive a fully approved purchase request and place the order with the vendor
  • Can complete the approval of the matter upon completing the order placement
  • The order data is automatically recorded in the business table when the approval is completed

Workflow Definitions​

For details on each definition, refer to the individual documents.

  • Flow Definition - Function settings, flow group, function policies
  • Content Definition - Screen definitions, user programs, notification definitions, branch rules
  • Route Definition - Node definitions, processing authority plugins, processing flow

Flow Definition Basic Information​

ItemValue
Flow NamePurchase Request Flow
Flow IDpurchase_request
Flow GroupTenant default group
Matter Name RulePurchaseRequest_[ApplicantName]_[VendorName]

Route Overview​

Functional Requirements​

F-001: Purchase Request​

F-001-1: Request Input​

  • The applicant can enter the required information into the purchase request form and submit the request
  • Information required for the request:
    • Vendor (required, selected from the vendor master)
    • Purpose (required, selectable: Business Consumables / Development Equipment / Office Equipment / Books / Event Supplies / Other)
    • Desired delivery date (required, on or after the day following the application date)
    • Urgency (required, selectable: Normal / Urgent)
    • Line items (required, 1 to 20 lines)
      • Item name (required, up to 100 characters)
      • Quantity (required, an integer of 1 or more)
      • Unit price (required, an integer of 1 yen or more)
      • Subtotal (auto-calculated: quantity × unit price)
    • Total amount (auto-calculated: sum of the subtotals of all line items)
    • Remarks (optional, up to 500 characters)
  • At the time of application, calculates the total amount of the line items and sets it in the matter property purchase_amount via the user program (used for branch determination)
  • Saves data to the purchase_request and purchase_request_item tables via the user program when the request is completed
  • Sends a notification email to the department manager when the request is completed

F-001-2: Withdrawing a Request​

  • The applicant can withdraw a request that the department manager has not yet processed
  • After withdrawal, the request content can be revised and resubmitted

F-001-3: Canceling a Request​

  • The applicant can cancel an unapproved request
  • After cancellation, the matter is completed (canceled)

F-001-4: Resubmission After Send-Back​

  • A sent-back request can be revised and resubmitted
  • The revision is made after checking the send-back comment
  • On resubmission, the user program updates the purchase_request and purchase_request_item tables and resets the matter property purchase_amount

F-002: Approval Process​

F-002-1: Department Manager Approval​

  • The department manager reviews a subordinate's purchase request and can approve, send it back, deny it, hold it, or release the hold
  • Items to check when approving:
    • Request details (items, quantity, unit price, vendor, total amount)
    • Business validity of the purpose
    • Consistency with the departmental budget
  • A send-back comment is required when sending back (up to 300 characters)
  • The send-back destination is the application node
  • A denial reason is required when denying (up to 300 characters)
  • While on hold, processing by any assignee other than the person who placed the hold is prohibited
  • If a subsequent node has not yet processed the request, the department manager can withdraw the approval
  • Sends a result notification email to the applicant when processing is completed

F-002-2: Accounting Department Approval (Only When the Total Amount Is 500,000 Yen or More)​

  • Accounting department staff review a high-value purchase request already approved by the department manager, and can approve, send it back, deny it, hold it, or release the hold
  • Accounting department approval is reached only when the total amount (matter property purchase_amount) is 500,000 yen or more, via the branch route (BR-003)
  • Items to check when approving:
    • Request details (items, quantity, unit price, vendor, total amount)
    • Consistency with the company-wide purchasing budget
    • The vendor's creditworthiness and reliability
  • A send-back comment is required when sending back (up to 300 characters)
  • The send-back destination can be selected as the application node or the department manager approval node (any already-processed node)
  • A denial reason is required when denying (up to 300 characters)
  • While on hold, processing by any assignee other than the person who placed the hold is prohibited
  • Sends a result notification email to the applicant when processing is completed

F-002-3: Purchasing Department Order Placement​

  • Purchasing department staff receive a fully approved purchase request and can complete the approval by carrying out the order placement
  • Items to check when completing the approval:
    • Request details (items, quantity, unit price, vendor, total amount)
    • Order details for the vendor
  • The user program performs an INSERT of the order data into the purchase_orders table when the approval is completed
  • On send-back, the destination can be selected as the application node or the accounting department approval node (if it was reached)
  • Sends a result notification email to the applicant when processing is completed

F-003: Automatic Calculation of the Total Amount​

  • Automatically calculates the subtotal (quantity × unit price) and the total amount on the client side each time a line item is entered on the application screen
  • Recalculates on the server side when the Apply button is pressed, and sets the confirmed value in the matter property purchase_amount

Non-Functional Requirements​

Performance Requirements​

  • Screen display: within 3 seconds
  • Application/approval processing: within 2 seconds
  • Concurrent users: 300

Business Rules​

IDRule
BR-001Line items must number between 1 and 20
BR-002For each line item, the quantity must be an integer of 1 or more and the unit price must be an integer of 1 yen or more
BR-003When the total amount is 500,000 yen or more, the request passes through the accounting department approval node (determined by the matter property purchase_amount)
BR-004The desired delivery date must be on or after the day following the application date
BR-005Only a vendor that exists in the vendor master can be selected
BR-006The total amount must match the sum of the subtotals of all line items (recalculated and saved on the server side)
BR-007The user program records the order data in the purchase_orders table when the approval is completed
BR-008A denied or canceled request does not generate order data. The purchase_request data is retained as history

Screen List​

Screen IDScreen NameIM-Workflow Screen TypeOverview
SCR-001Purchase RequestApplication Screen / Resubmission ScreenInput form for a purchase request. Supports dynamically adding/removing line items. Displays the send-back comment on resubmission
SCR-002ProcessingProcessing ScreenScreen where an approver reviews the request and approves, sends it back, denies it, or holds it
SCR-003Processing DetailProcessing Detail ScreenScreen where an assignee views the details of a matter
SCR-004Reference DetailReference Detail ScreenScreen where a viewer views the details of a matter

Screen Field Definitions​

SCR-001: Purchase Request Screen (Application Screen / Resubmission Screen)​

Field NameInput TypeRequiredNotes
ApplicantDisplay only-Automatically displays the login user's name
OrganizationDisplay only-Automatically displays the login user's organization
VendorSelect○Selected from the vendor master
PurposeSelect○Business Consumables / Development Equipment / Office Equipment / Books / Event Supplies / Other
Desired Delivery DateDate○Calendar picker. On or after the day following the application date
UrgencyRadio○Normal / Urgent
Line ItemsDynamic table○Rows of item name/quantity/unit price/subtotal, addable/removable within 1-20 rows
┗ Item NameText○Up to 100 characters
┗ QuantityNumeric○An integer of 1 or more
┗ Unit PriceNumeric○An integer of 1 yen or more
┗ SubtotalDisplay only-Auto-calculates quantity × unit price
Total AmountDisplay only-Auto-calculates the sum of the subtotals of all line items
RemarksText-Up to 500 characters
Send-Back CommentDisplay only-Shown only on resubmission. Displays the approver's send-back comment

SCR-002: Processing Screen (For Approvers)​

Field NameInput TypeRequiredNotes
ApplicantDisplay only-Applicant's name
OrganizationDisplay only-Applicant's organization
VendorDisplay only-Displays the request details
PurposeDisplay only-Displays the request details
Desired Delivery DateDisplay only-Displays the request details
UrgencyDisplay only-Displays the request details
Line ItemsDisplay only-Displays the item name/quantity/unit price/subtotal as a list
Total AmountDisplay only-Displays the request details
RemarksDisplay only-Displays the request details
CommentText△Required when sending back or denying. Up to 300 characters

SCR-003: Processing Detail Screen (For Assignees)​

Field NameInput TypeNotes
ApplicantDisplay onlyApplicant's name
OrganizationDisplay onlyApplicant's organization
VendorDisplay onlyDisplays the request details
PurposeDisplay onlyDisplays the request details
Desired Delivery DateDisplay onlyDisplays the request details
UrgencyDisplay onlyDisplays the request details
Line ItemsDisplay onlyDisplays the item name/quantity/unit price/subtotal as a list
Total AmountDisplay onlyDisplays the request details
RemarksDisplay onlyDisplays the request details
Processing HistoryDisplay onlyDisplays the processing history of each node

SCR-004: Reference Detail Screen (For Viewers)​

Uses the same layout and fields as SCR-003 (Processing Detail Screen).

Data Model (Overview)​

User Data (User Content Management Scope)​

Purchase Request Header (purchase_request)
├── User Data ID (PK)
├── Applicant User ID
├── Vendor ID
├── Purpose Category
├── Desired Delivery Date
├── Urgency Category (normal/urgent)
├── Total Amount
├── Remarks
├── Created At
└── Updated At

Purchase Request Line Item (purchase_request_item)
├── Line Item ID (PK)
├── User Data ID (FK)
├── Line Number
├── Item Name
├── Quantity
├── Unit Price
├── Subtotal
├── Created At
└── Updated At

Purchase Order (purchase_orders)
├── Order ID (PK)
├── User Data ID (FK)
├── Vendor ID
├── Order Date
├── Total Amount
├── Orderer User ID (Purchasing Department Staff)
├── Created At
└── Updated At

Matter Properties​

Property KeySet AtPurpose
purchase_amountOn applicationTotal amount. Used for branch route determination and email replacement
vendor_nameOn applicationVendor name. Used for matter name generation and email replacement

Glossary​

TermDescription
VendorThe supplier from which goods are purchased. Only a company pre-registered in the vendor master can be selected
Line ItemA row for each item included in a single purchase request. 1 to 20 rows can be registered per request
High-Value RequestA purchase request totaling 500,000 yen or more. Passes through the accounting department approval node
Order PlacementThe act of the purchasing department requesting a purchase from a vendor after the approval is completed