enterprise-patterns

Implements production architectural patterns for enterprise Frappe apps with workflows, SLAs, and integrations.

62|23|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/lubusIN/frappe-skills --skill enterprise-patterns-lubusin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: enterprise-patterns
Source: https://github.com/lubusIN/frappe-skills/tree/main/enterprise-patterns
Command: npx skills add https://github.com/lubusIN/frappe-skills --skill enterprise-patterns-lubusin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building multi-entity enterprise systems like CRM, Helpdesk, or HRMS on Frappe requires coordinating workflows, permissions, SLAs, queues, and external integrations, and ad-hoc implementations often miss permission checks, SLA edge cases, or race conditions. ## Core Features & Use Cases - State Machines & Workflows: Design role-based state transitions using Workflow DocType, docstatus, or custom status validation with multi-level approvals. - SLA Management: Apply response and resolution deadlines with business hours, holidays, pause/resume logic, and scheduled breach detection. - Permissions & Audit Trails: Enforce row-level and field-level permissions, re-check access in RPC methods, and log activity trails for every change. - Queues & Integrations: Implement round-robin assignment, background job patterns with retry and locking, and connectors for email, telephony, and external CRMs. - Use Case: When building a helpdesk system, use this Skill to scaffold the Ticket data model, wire SLA deadlines on creation, set up escalation notifications, and sync emails into Communications via background jobs. ## Quick Start Use the enterprise-patterns skill to design a helpdesk ticket system with SLA tracking, assignment queues, and escalation notifications.

Frequently Asked Questions about enterprise-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement SLA tracking in a Frappe helpdesk app?▼

Create an SLA DocType with response_time and resolution_time per priority, then set response_by and resolution_by on document creation using after_insert. Run a scheduled job to compare current time against deadlines and mark breaches.

How to enforce row-level permissions in Frappe RPC methods?▼

Always re-check permissions inside whitelisted methods using frappe.has_permission with the loaded document, and throw frappe.PermissionError when denied. Combine User Permissions with permission_query_conditions hooks for list-level filtering.

What is the difference between Workflow DocType and docstatus in Frappe?▼

Workflow DocType provides role-based state transitions with custom states, while docstatus offers a fixed Draft (0), Submitted (1), Cancelled (2) lifecycle. Use Workflow for flexible approval chains and docstatus for submit/cancel semantics.

How do I prevent race conditions when updating Frappe documents?▼

Use frappe.db.get_value with for_update=True to acquire row locks during concurrent updates. For background jobs, use Redis-based distributed locks so only one job instance runs at a time.

Why are my SLA calculations wrong for global users?▼

SLA errors usually come from mixing timezones. Store and compare all datetimes in UTC, and use frappe.utils.convert_utc_to_timezone only for display. Also account for support hours and holidays when computing due dates.

When should I use background jobs instead of synchronous processing in Frappe?▼

Use frappe.enqueue for any long-running work such as bulk record operations, external API syncs, or report generation, since web requests will time out. Choose short, default, or long queues based on expected duration.