layout | title | parent | nav_order |
---|---|---|---|
default |
System Architecture |
Overview |
1 |
BoxFresh Gardens needs a Salesforce-native app to manage:
- Service scheduling and job tracking
- Inventory and resource management using Theory of Constraints principles
- Customer communication and contract management
- Reporting and performance analysis
The BoxFresh app is suitable for an LLM system because:
- It involves routine tasks that require common sense (scheduling, resource allocation)
- It requires structured information processing (inventory tracking, job status updates)
- The data schema and processing rules can be clearly defined
The BoxFresh app requires the following core utilities:
get_inventory_status(inventory_id)
: Retrieves current inventory levels and capacity constraintsget_resource_availability(date_range)
: Checks resource availability in a given periodupdate_job_status(job_id, status)
: Updates the status of a jobcreate_contract(customer_id, service_details)
: Creates a new service contract
generate_schedule_recommendation(resources, jobs, constraints)
: LLM-powered scheduling optimizationclassify_customer_request(request_text)
: Auto-categorizes incoming service requestssummarize_job_performance(job_history)
: Generates performance summaries
-
Node A: Request Intake
- Purpose: Capture and validate incoming service requests
- Type: Regular node
exec
:classify_customer_request()
-
Node B: Resource Assignment
- Purpose: Assign appropriate resources to the job
- Type: Batch node (handles multiple resource assignments)
exec
:get_resource_availability()
-
Node C: Schedule Creation
- Purpose: Create optimal service schedule
- Type: Regular node
exec
:generate_schedule_recommendation()
-
Node D: Notification
- Purpose: Notify staff and customers of assignments
- Type: Async node
exec
:send_notifications()
-
Node A: Stock Check
- Purpose: Check current inventory levels against capacity constraints
- Type: Regular node
exec
:get_inventory_status()
-
Node B: Depletion Forecast
- Purpose: Predict future inventory needs
- Type: Regular node
exec
:forecast_inventory_needs()
-
Node C: Reorder Decision
- Purpose: Determine if reordering is needed based on buffer status
- Type: Regular node (with branching)
exec
:evaluate_reorder_decision()
-
Node A: Status Update
- Purpose: Record job completion status
- Type: Regular node
exec
:update_job_status()
-
Node B: Performance Analysis
- Purpose: Analyze job performance metrics
- Type: Regular node
exec
:summarize_job_performance()
-
Node C: Invoice Generation
- Purpose: Generate customer invoice
- Type: Regular node
exec
:create_invoice()
shared = {
"inventory": {
"material_skus": [...], // Catalog of materials
"material_stock": [...], // Current stock levels with capacity consumption
"locations": [...], // Storage locations with capacity constraints
"buffer_status": [...] // Buffer status for each container
},
"resources": {
"staff": [...], // Staff resources
"equipment": [...], // Equipment resources
"availability": {...} // Availability calendar
},
"jobs": {
"scheduled": [...], // Upcoming jobs
"in_progress": [...], // Jobs currently being worked
"completed": [...], // Finished jobs
"performance_metrics": {...} // Job analytics
},
"customers": {
"accounts": [...], // Customer accounts
"contracts": [...], // Service contracts
"properties": [...] // Service locations
},
"assignments": {
"resources": [...], // Resource assignments
"inventory": [...], // Inventory allocations with capacity tracking
"schedule": [...] // Schedule details
}
}
-
Service Request Flow:
prep
: Read customer and resource datapost
: Update jobs and resource availability
-
Inventory Flow:
prep
: Read current inventory, capacity constraints, and buffer statuspost
: Update inventory status, buffer zones, and orders
-
Job Completion Flow:
prep
: Read job details and resource assignmentspost
: Update job status, performance metrics, and customer billing
The implementation follows a phased approach:
- Creating custom objects in Salesforce with capacity constraints
- Material_SKU__c, Material_Stock__c, Inventory__c
- Resource__c, Assignment__c, Job__c
- Contract__c, Property__c
- Implementing capacity tracking and buffer management
- Capacity fields on Inventory__c and Material_Stock__c
- Junction relationship through Assignment__c
- Buffer status visualization and alerts
- User Security Implementation
- Role configuration and permission sets
- Field-level security and sharing rules
- Case Management Implementation
- Case creation and assignment processes
- Escalation and SLA enforcement
- Reporting Implementation
- Capacity dashboards and operational metrics
- Client-facing reports
Initial optimization focuses on:
- Streamlining job assignment process
- Improving inventory forecasting accuracy based on buffer status
- Enhancing user experience for field staff
Reliability measures include:
- Data validation rules for capacity constraints
- Comprehensive test cases for allocation scenarios
- Error handling and notifications for buffer violations
- Backup and recovery procedures
This content has been migrated as part of the Documentation Consolidation Initiative (April 3-11, 2025) from its original location at design.md
.