A comprehensive Frappe app for managing customer visits and interactions within your CRM system. This app provides a complete solution for tracking, scheduling, and analyzing customer visits, helping sales teams and customer success managers maintain detailed records of all customer interactions.
- Visit Tracking: Complete lifecycle management of customer visits from planning to completion
- CRM Integration: Seamless integration with Frappe CRM for contacts, leads, and organizations
- Status Management: Track visit progress with customizable status workflows
- Rich Documentation: Capture detailed notes, outcomes, and follow-up actions
- Duration Tracking: Monitor visit duration for performance analysis
- User Permissions: Role-based access control for different user types
- API Support: RESTful API endpoints for external integrations
- Comprehensive Logging: Detailed audit trails and error handling
- Frappe Framework: Version 15.0.0 or higher
- Frappe CRM: Must be installed and configured
- Python: Version 3.10 or higher
- Node.js: Version 18.0.0 or higher (for frontend assets)
- Redis: For caching and background jobs
- MariaDB/MySQL: Version 8.0 or higher
- Operating System: Linux (Ubuntu 20.04+, CentOS 8+, or similar)
- RAM: Minimum 4GB, recommended 8GB
- Storage: Minimum 20GB free space
- Network: Outbound internet access for package installation
-
Get the app:
cd ~/frappe-bench bench get-app https://github.com/promise4all/visit_management.git
-
Install on your site:
bench --site your-site install-app visit_management
-
Build assets (REQUIRED):
bench build
-
Restart services:
bench restart
Run the post-install fix script:
cd ~/frappe-bench
./apps/visit_management/post_install_fix.shSee PRODUCTION_INSTALL.md for comprehensive troubleshooting.
-
Build frontend assets:
bench build
-
Restart the bench:
bench restart
-
Clone the repository:
cd apps git clone https://github.com/your-org/visit_management.git cd visit_management
-
Install Python dependencies:
pip install -e . -
Install Node.js dependencies:
npm install
-
Build assets:
npm run build
-
Install the app in your site:
bench --site [your-site-name] install-app visit_management
After installation, configure the app through the Frappe Desk interface:
- Navigate to Settings: Go to "Visit Management" in the module list
- Configure Permissions: Set up user roles and permissions
- Customize Fields: Modify visit fields as needed for your business process
Add these variables to your site_config.json or environment:
{
"visit_management": {
"auto_sync_crm": true,
"default_visit_duration": 60,
"enable_notifications": true,
"log_level": "INFO"
}
}- Verify CRM Installation: Ensure Frappe CRM is properly installed and configured
- Configure Custom Fields: The app automatically adds necessary fields to CRM entities
- Set Up Webhooks (Optional): Configure webhooks for real-time synchronization
-
Access Visit Management: Navigate to "Visit Management" > "Visit"
-
Create New Visit: Click "New" button
-
Fill Basic Information:
- Title: Brief description of the visit
- Description: Detailed purpose
- Visit Date: Schedule date and time
- Status: Set initial status (Planned, In Progress, etc.)
-
CRM Integration:
- Contact: Link to existing contact or create new
- Lead: Associate with lead if applicable
- Organization: Link to organization
-
Visit Details:
- Purpose: Specific objectives
- Duration: Expected duration in minutes
- Notes: Additional context
- Planned: Initial status for scheduled visits
- In Progress: Active visit in progress
- Completed: Successfully completed visits
- Cancelled: Cancelled visits with reason
- Modify visit details anytime before completion
- Add notes and outcomes after visit completion
- Track duration and follow-up actions
Access built-in reports:
- Visit Summary by Status
- Visit Duration Analysis
- Contact/Lead Visit History
- Organization Visit Trends
All API endpoints require authentication. Use Frappe's built-in API key authentication:
curl -H "Authorization: token [api-key]:[api-secret]" \
https://your-site.com/api/resource/VisitGET /api/resource/VisitParameters:
fields: Comma-separated list of fields to returnfilters: JSON filters (e.g.,{"status": "Completed"})limit_start: Starting offset for paginationlimit_page_length: Number of records per page
POST /api/resource/Visit
Content-Type: application/json
{
"title": "Customer Meeting",
"description": "Quarterly business review",
"visit_date": "2024-01-15 10:00:00",
"status": "Planned",
"contact": "John Doe",
"organization": "Acme Corp"
}PUT /api/resource/Visit/[visit-name]
Content-Type: application/json
{
"status": "Completed",
"outcome": "Successful",
"notes": "Great meeting, follow up scheduled"
}DELETE /api/resource/Visit/[visit-name]GET /api/method/visit_management.api.get_visit_statisticsParameters:
from_date: Start date (YYYY-MM-DD)to_date: End date (YYYY-MM-DD)organization: Filter by organization (optional)
POST /api/method/visit_management.api.bulk_update_visits
Content-Type: application/json
{
"visits": ["VISIT-001", "VISIT-002"],
"updates": {
"status": "Cancelled"
}
}Issue: bench install-app fails with dependency errors
Solution:
- Ensure Frappe CRM is installed first
- Check Python version compatibility
- Clear bench cache:
bench clear-cache - Reinstall with verbose output:
bench install-app visit_management --verbose
Issue: Frontend assets not loading Solution:
- Run
bench buildto rebuild assets - Clear browser cache
- Check file permissions in
sites/assets/
Issue: CRM integration not working Solution:
- Verify CRM app is active in
apps.json - Check custom fields are properly installed
- Review logs:
bench mariadbthenUSE [site-name]; SHOW TABLES; - Restart bench services
Issue: Permission errors when creating visits Solution:
- Check user roles in User doctype
- Verify Visit permissions are set correctly
- Ensure user has "Visit" doctype permissions
Issue: Slow visit loading times Solution:
- Optimize database indexes
- Enable Redis caching
- Check for large attachment files
- Monitor background job queue
Enable debug logging for troubleshooting:
# In hooks.py or site_config.json
"developer_mode": 1,
"logging": 1Check these log locations:
- Frappe Logs:
sites/[site-name]/logs/ - Bench Logs:
logs/bench.log - Nginx Logs:
/var/log/nginx/
- Check Documentation: Review this README and docs/ folder
- Frappe Community: Post questions on Frappe Forum
- GitHub Issues: Report bugs and feature requests
- Professional Support: Contact maintainers for commercial support
-
Install pre-commit hooks:
cd apps/visit_management pre-commit install -
Run tests:
bench run-tests visit_management
-
Code formatting:
pre-commit run --all-files
visit_management/
├── visit_management/ # Main app directory
│ ├── doctype/ # DocType definitions
│ │ └── visit/ # Visit doctype
│ ├── api.py # API methods
│ ├── utils.py # Utility functions
│ ├── crm_integration.py # CRM integration logic
│ └── hooks.py # App hooks
├── docs/ # Documentation
├── tests/ # Test files
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
The app includes comprehensive tests:
- Unit Tests: Individual function testing
- Integration Tests: Module interaction testing
- API Tests: Endpoint testing
- Performance Tests: Load and timing tests
Run all tests:
bench run-tests visit_management --coverageThis project is licensed under the MIT License - see the LICENSE file for details.
- Initial release
- Basic visit management functionality
- CRM integration
- API endpoints
- Comprehensive documentation
For more information, visit the project repository or contact the development team.