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.
- Download all: purchase-of-goods-prompt.zip
- Individual files:
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
| Persona | Description |
|---|---|
| General Employee | An employee who requests the purchase of goods needed for business. Wants to apply easily and check progress |
| Department Manager | The direct department manager who approves a subordinate's purchase request. Decides while considering business validity and departmental budget |
| Accounting Department Staff | Performs the final review of high-value purchase requests. Manages purchasing results and budget consumption across the company |
| Purchasing Department Staff | Receives 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
| Item | Value |
|---|---|
| Flow Name | Purchase Request Flow |
| Flow ID | purchase_request |
| Flow Group | Tenant default group |
| Matter Name Rule | PurchaseRequest_[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_amountvia the user program (used for branch determination) - Saves data to the
purchase_requestandpurchase_request_itemtables 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_requestandpurchase_request_itemtables and resets the matter propertypurchase_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_orderstable 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
| ID | Rule |
|---|---|
| BR-001 | Line items must number between 1 and 20 |
| BR-002 | For 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-003 | When 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-004 | The desired delivery date must be on or after the day following the application date |
| BR-005 | Only a vendor that exists in the vendor master can be selected |
| BR-006 | The total amount must match the sum of the subtotals of all line items (recalculated and saved on the server side) |
| BR-007 | The user program records the order data in the purchase_orders table when the approval is completed |
| BR-008 | A denied or canceled request does not generate order data. The purchase_request data is retained as history |
Screen List
| Screen ID | Screen Name | IM-Workflow Screen Type | Overview |
|---|---|---|---|
| SCR-001 | Purchase Request | Application Screen / Resubmission Screen | Input form for a purchase request. Supports dynamically adding/removing line items. Displays the send-back comment on resubmission |
| SCR-002 | Processing | Processing Screen | Screen where an approver reviews the request and approves, sends it back, denies it, or holds it |
| SCR-003 | Processing Detail | Processing Detail Screen | Screen where an assignee views the details of a matter |
| SCR-004 | Reference Detail | Reference Detail Screen | Screen where a viewer views the details of a matter |
Screen Field Definitions
SCR-001: Purchase Request Screen (Application Screen / Resubmission Screen)
| Field Name | Input Type | Required | Notes |
|---|---|---|---|
| Applicant | Display only | - | Automatically displays the login user's name |
| Organization | Display only | - | Automatically displays the login user's organization |
| Vendor | Select | ○ | Selected from the vendor master |
| Purpose | Select | ○ | Business Consumables / Development Equipment / Office Equipment / Books / Event Supplies / Other |
| Desired Delivery Date | Date | ○ | Calendar picker. On or after the day following the application date |
| Urgency | Radio | ○ | Normal / Urgent |
| Line Items | Dynamic table | ○ | Rows of item name/quantity/unit price/subtotal, addable/removable within 1-20 rows |
| ┗ Item Name | Text | ○ | Up to 100 characters |
| ┗ Quantity | Numeric | ○ | An integer of 1 or more |
| ┗ Unit Price | Numeric | ○ | An integer of 1 yen or more |
| ┗ Subtotal | Display only | - | Auto-calculates quantity × unit price |
| Total Amount | Display only | - | Auto-calculates the sum of the subtotals of all line items |
| Remarks | Text | - | Up to 500 characters |
| Send-Back Comment | Display only | - | Shown only on resubmission. Displays the approver's send-back comment |
SCR-002: Processing Screen (For Approvers)
| Field Name | Input Type | Required | Notes |
|---|---|---|---|
| Applicant | Display only | - | Applicant's name |
| Organization | Display only | - | Applicant's organization |
| Vendor | Display only | - | Displays the request details |
| Purpose | Display only | - | Displays the request details |
| Desired Delivery Date | Display only | - | Displays the request details |
| Urgency | Display only | - | Displays the request details |
| Line Items | Display only | - | Displays the item name/quantity/unit price/subtotal as a list |
| Total Amount | Display only | - | Displays the request details |
| Remarks | Display only | - | Displays the request details |
| Comment | Text | △ | Required when sending back or denying. Up to 300 characters |
SCR-003: Processing Detail Screen (For Assignees)
| Field Name | Input Type | Notes |
|---|---|---|
| Applicant | Display only | Applicant's name |
| Organization | Display only | Applicant's organization |
| Vendor | Display only | Displays the request details |
| Purpose | Display only | Displays the request details |
| Desired Delivery Date | Display only | Displays the request details |
| Urgency | Display only | Displays the request details |
| Line Items | Display only | Displays the item name/quantity/unit price/subtotal as a list |
| Total Amount | Display only | Displays the request details |
| Remarks | Display only | Displays the request details |
| Processing History | Display only | Displays 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 Key | Set At | Purpose |
|---|---|---|
| purchase_amount | On application | Total amount. Used for branch route determination and email replacement |
| vendor_name | On application | Vendor name. Used for matter name generation and email replacement |
Glossary
| Term | Description |
|---|---|
| Vendor | The supplier from which goods are purchased. Only a company pre-registered in the vendor master can be selected |
| Line Item | A row for each item included in a single purchase request. 1 to 20 rows can be registered per request |
| High-Value Request | A purchase request totaling 500,000 yen or more. Passes through the accounting department approval node |
| Order Placement | The act of the purchasing department requesting a purchase from a vendor after the approval is completed |