sf-agent-framework
Version:
AI Agent Orchestration Framework for Salesforce Development - Two-phase architecture with 70% context reduction
100 lines (80 loc) • 2.62 kB
Markdown
# Data Model Design
## Purpose
Design scalable and efficient data models in Salesforce that support business
requirements while optimizing for platform performance and limits.
## Instructions
1. **Requirements Analysis**
- Gather business entity requirements
- Document data relationships
- Identify transaction volumes
- Define security requirements
- Analyze reporting needs
2. **Object Model Design**
- Leverage standard objects where possible
- Design custom objects strategically
- Plan object relationships (lookup vs master-detail)
- Consider object limits and allocations
- Design for reporting requirements
3. **Field Design and Optimization**
- Define field types appropriately
- Plan formula field usage
- Design roll-up summaries efficiently
- Implement validation rules
- Consider field limits per object
4. **Relationship Architecture**
- Design parent-child hierarchies
- Plan many-to-many relationships
- Optimize lookup relationships
- Consider relationship limits
- Design for query performance
5. **Large Data Volume Considerations**
- Implement skinny tables where needed
- Design efficient indexes
- Plan data archival strategy
- Optimize for query selectivity
- Consider platform limits
6. **Security and Sharing Model**
- Design with security in mind
- Plan organization-wide defaults
- Consider sharing implications
- Design for field-level security
- Optimize sharing calculations
## Input Requirements
- Business requirements document
- Entity relationship diagrams
- Data volume projections
- Security requirements
- Integration specifications
- Reporting requirements
## Output Format
- Data Model Design Document containing:
- Conceptual data model
- Logical data model
- Physical implementation design
- Object relationship diagram
- Field specifications
- Security model design
- Performance considerations
## Design Principles
- **Normalization**: Balance with platform considerations
- **Scalability**: Design for growth
- **Performance**: Optimize for queries
- **Maintainability**: Keep it simple
- **Security**: Build in from start
- **Flexibility**: Allow for changes
## Platform Considerations
- Custom object limits
- Field limits per object
- Relationship limits
- Roll-up summary limits
- Sharing rule limits
- Data storage limits
- API query limits
## Best Practices
- Start with standard objects
- Denormalize thoughtfully
- Index strategically
- Avoid circular dependencies
- Document all decisions
- Test with realistic volumes
- Plan for data archival