Feature #7861
closedFeature #7906: Enquiry module in POS
Enquiry to Request Workflow Implementation
Description
Currently working on the Enquiry to Service Request conversion flow.
Implementing approval-based auto request creation, action history tracking, and ensuring direct request creation works without enquiry dependency.
Subtasks
Related issues
Updated by Pavan Kumar Murala 22 days ago
- Status changed from New to In Progress
Updated by Pavan Kumar Murala 21 days ago
- Due date changed from 02/24/2026 to 02/23/2026
- % Done changed from 0 to 60
Updated by Pavan Kumar Murala 21 days ago
- Due date changed from 02/23/2026 to 02/24/2026
Updated by Pavan Kumar Murala 21 days ago
- Status changed from In Progress to Closed
- % Done changed from 60 to 100
1. Create Enquiry
Create a new service enquiry for a customer.
URL: /api/v1/enquiry
Method: POST
Description: Initializes a new enquiry with one or more services and an optional property association.
Request Body
json
{
"customerId": "65d...123",
"serviceId": ["65d...456", "65d...789"],
"propertyId": "65d...000",
"followUpDate": "2024-03-01",
"description": "Consultation for landscaping",
"priority": "HIGH"
}
2. Dashboard Statistics (Enhanced)
Get high-level analytics and actionable follow-up lists for the dashboard.
URL: /api/v1/enquiry/stats
Method: GET
Description: Provides counts, 6-month trends, service popularity, and specific lists of Overdue, Today's, and Upcoming follow-ups.
Response Structure (Stats)
json
{
"summary": { ... },
"followUpSummary": { "overdue": 5, "today": 2, "upcoming": 10 },
"overdueItems": [ ... ],
"todayItems": [ ... ],
"upcomingItems": [ ... ],
"trends": [ ... ],
"servicePopularity": [ ... ]
}
3. List Enquiries
Retrieve a paginated list of enquiries with advanced filters.
URL: /api/v1/enquiry
Method: GET
Query Parameters:
page, limit: Pagination
status: PENDING, ACTIVE, CLOSED
priority: LOW, MEDIUM, HIGH, URGENT
itemStatus: PENDING, APPROVED, FOLLOW_UP, etc.
search: Search by customer name or email.
fromDate, toDate: Filter by creation date.
4. Update Item Status
Update the workflow status of the specific service item (the enquiry itself).
URL: /api/v1/enquiry/{id}/item-status
Method: PATCH
Description: Transitions the item through its lifecycle (e.g., from PENDING to APPROVED).
5. Add Note & Reschedule
Add an internal note and optionally update the follow-up date for an enquiry.
URL: /api/v1/enquiry/{id}/notes
Method: POST
Description: Appends a note. If followUpDate is provided and different from the current date, it reschedules the enquiry, resets reminder flags (so the cron can re-notify), and logs the "From/To" dates in history.
Request Body
json
{
"content": "Followed up via phone; customer requested to reschedule for next week.",
"followUpDate": "2024-03-15T10:00:00"
}
6. Action History (Enhanced)
View a log of all actions, now including Automated System Reminders and Rescheduling Events.
URL: /api/v1/enquiry/{id}/history
Method: GET
New Events:
SYSTEM_REMINDER_SENT: Logs when the cron sends automated emails.
FOLLOW_UP_RESCHEDULED: Logs "rescheduled from [Old Date] to [New Date]".
7. Soft Delete
Remove an enquiry from view (soft delete).
URL: /api/v1/enquiry/{id}
Method: DELETE
8. Send Manual Reminder
Manually trigger a follow-up reminder notification to admins and the customer.
URL: /api/v1/enquiry/{id}/send-reminder
Method: POST
Description: Uses a centralized template to send a "Manual Follow-up" email. Records the action in
ActionHistory
.
9. Reschedule Enquiry
Dedicated endpoint for changing the follow-up date without adding a note.
URL: /api/v1/enquiry/{id}/reschedule
Method: PATCH
Description: Updates the followUpDate, resets automated reminder flags, and logs the old/new dates in the action history.
Request Body
json
{
"followUpDate": "2024-03-25T14:00:00",
"remarks": "Rescheduled per client request via email."
}