A custom Frappe Framework application for managing the vendor onboarding process through a workflow-driven approval system. The application validates vendor information, supports role-based approvals, automatically creates Suppliers upon approval, provides REST APIs, reports, dashboard charts, and workflow notifications.
- Custom Vendor Onboarding Request DocType
- Email and GST Number validation
- Annual Turnover validation
- Documents Submitted checkbox validation
- Workflow-based approval process
- Automatic Supplier creation after approval
- REST API for creating and retrieving requests
- Dashboard Chart for request status
- Script Report for vendor request statistics
- Custom Roles using Fixtures
cd ~/frappe-bench/apps
git clone https://github.com/praginapradeep/Vendor-Onboarding.gitcd ~/frappe-bench
bench get-app apps/vendor_onboarding
bench --site <your-site-name> install-app vendor_onboarding
bench migrate
bench startThe Vendor Onboarding Request follows the workflow below:
Draft
│
▼
Submitted
│
▼
Under Review
├──────────────► Rejected
│
▼
Approved (If no duplicate exists)
│
▼
Supplier Created
│
▼
Cancelled (Optional)
Workflow States:
- Draft
- Submitted
- Under Review
- Approved
- Rejected
- Cancelled
The application performs the following validations:
- Valid Email Address
- Valid GST Number (if provided)
- Annual Turnover must not be negative
- Documents Submitted must be checked before submitting the onboarding request
- Prevent duplicate Supplier creation using GST Number and Email
When a Vendor Onboarding Request reaches the Approved state (DocStatus = 1), a Supplier is automatically created with:
- Supplier Name
- GST Number
- Vendor Type
Duplicate suppliers are prevented using GST Number and Email ID.
Method
POST
Endpoint
/api/method/vendor_onboarding.api.v1.create_request
{
"vendor_name": "ABC Industries",
"email": "admin@abc.com",
"gst_number": "29ABCDE1234F1Z5",
"vendor_type": "Material Supplier",
"annual_turnover": 50000,
"contact_person": "John",
"phone": "+91-9876543210",
"documents_submitted": 1
}{
"success": true,
"message": "Vendor Onboarding Request created successfully."
}Method
GET
Endpoint
/api/method/vendor_onboarding.api.v1.get_request?name=VOR-0001
{
"success": true,
"request_doc": {
"vendor_name": "ABC Industries",
"email": "admin@abc.com",
"gst_number": "29ABCDE1234F1Z5",
"vendor_type": "Material Supplier",
"annual_turnover": 50000,
"contact_person": "John",
"phone": "+91-9876543210",
"documents_submitted": 1
}
}Dashboard Chart:
Vendor Onboarding Request Status
- Type: Bar Chart
- Group By: Workflow State
- Displays request count by status - Approved and Rejected
Vendor Onboarding Requests Status
The report displays:
- Vendor Type
- Total Requests
- Approved Requests
- Rejected Requests
- Pending Requests (Under Review)
A workflow notification is configured to notify users whenever the Workflow State changes.
Notification subject:
Status Update: {{ doc.name }} has been {{ doc.workflow_state }}
The following custom roles are exported as fixtures:
- Requesters
- Reviewers
- Supplier is created only after the request is approved.
- GST Number is optional but validated when provided. Validation is based on GSTIN format only, No status check provided.
- Email Address is mandatory.
- Vendor Type is mandatory.
- Annual Turnover cannot be negative.
- Duplicate suppliers are identified using GST Number and Email ID.
- Documents Submitted should be marked before progressing beyond the initial onboarding stages.
- Business validations are implemented in the DocType
validate()method to ensure consistency across UI and API. - Supplier creation is implemented in
on_submit()because the Approved workflow state changes the document todocstatus = 1. - Script Report is used to provide aggregated vendor request statistics.
- Dashboard Chart gives a quick visual summary of request statuses.
- REST APIs enable integration with external applications.
- Roles are exported as fixtures for easy deployment across environments.
MIT