57 lines
4.3 KiB
Markdown
57 lines
4.3 KiB
Markdown
---
|
||
title: "Specialized Salesforce Architect"
|
||
type: source
|
||
tags: []
|
||
date: 2026-04-20
|
||
---
|
||
|
||
## Source File
|
||
- [[raw/Agent/agency-agents/specialized/specialized-salesforce-architect.md]]
|
||
|
||
## Summary(用中文描述)
|
||
- 核心主题:Salesforce 平台企业级解决方案架构师 Agent — 多云架构设计、企业集成模式、技术治理
|
||
- 问题域:Salesforce 组织从试点到企业规模扩展过程中的架构设计、技术债务规避、governor limits 规划
|
||
- 方法/机制:ADR(架构决策记录)、Governor Limit Budget 追踪、Integration Pattern Template、数据模型审查清单
|
||
- 结论/价值:提供从发现评估 → 架构设计 → 实施指导 → 审查治理的完整工作流,强调 declarative-first 原则和 bulkification 强制性要求
|
||
|
||
## Key Claims(用中文描述)
|
||
- Governor limits 是不可协商的铁律,每项设计必须提前计入 SOQL(100)、DML(150)、CPU(同步10s/异步60s)、堆(同步6MB/异步12MB) 等限制
|
||
- 业务逻辑必须放在 Handler 类中,Trigger 只负责委托分发,且每个对象只允许一个 Trigger
|
||
- Bulkification 是强制要求 — 若代码在 200 条记录下失败,则该代码就是错误的
|
||
- Declarative first,代码第二:优先使用 Flows、公式字段和验证规则,只在 declarative 方案变得不可维护时才考虑 Apex
|
||
- 集成模式必须处理失败场景:每次外部调用都需要重试逻辑、断路器和死信队列
|
||
- 数据模型是基础:在生产上线后再改数据模型,成本是设计阶段的 10 倍
|
||
- PII 数据必须加密存储,使用 Shield Platform Encryption 或自定义加密方案
|
||
|
||
## Key Quotes
|
||
> "Governor limits are non-negotiable. Every design must account for SOQL (100), DML (150), CPU (10s sync/60s async), heap (6MB sync/12MB async). No exceptions, no 'we'll optimize later.'" — 核心设计原则
|
||
> "If the code would fail on 200 records, it's wrong." — Bulkification 强制性标准
|
||
> "Data model is the foundation. Changing the data model after go-live is 10x more expensive." — 数据模型优先级
|
||
> "Be direct about technical debt. If someone built a trigger that should be a flow, say so." — 沟通风格示例
|
||
|
||
## Key Concepts
|
||
- [[GovernorLimits]]:Salesforce 平台执行上下文的硬性资源限制,包括 SOQL 查询数(100)、DML 语句数(150)、CPU 时间(同步10s)、堆大小(同步6MB)等
|
||
- [[Bulkification]]:批量处理模式 — 要求所有触发器和 Apex 代码必须能在单次交易中处理多条记录(通常按 200 条/批次测试)
|
||
- [[PlatformEvents]]:Salesforce 平台事件 — 用于跨系统集成的异步事件驱动机制,支持 72 小时重放窗口和高容量标准(10万/天)
|
||
- [[ChangeDataCapture]](CDC):变更数据捕获 — 自动追踪 sObject 字段级变更,适合 Salesforce 原生事件同步场景
|
||
- [[ADR]](Architecture Decision Record):架构决策记录 — 文档化记录重要技术决策的上下文、备选方案、后果和复审日期
|
||
- [[SalesforceDX]]:Salesforce 开发者体验框架 — 基于 Scratch Org 的源代码驱动部署方式,与 DevOps Center 并行
|
||
- [[Agentforce]]:Salesforce AI Agent 框架 — Agent 在 Salesforce governor limits 内运行,需设计在 CPU/SOQL 预算内完成的动作,使用 Einstein Trust Layer 进行 PII 脱敏
|
||
|
||
## Key Entities
|
||
- [[MuleSoft]]:Salesforce 收购的企业级集成中间件,用于跨系统集成模式中的中间转换层(DataWeave 转换、3x 指数退避重试、死信队列)
|
||
- [[ShieldPlatformEncryption]]:Salesforce 原生 PII 加密方案,与自定义加密并列作为敏感数据保护选项
|
||
- [[DevOpsCenter]]:Salesforce 原生 CI/CD 平台,与 Salesforce DX 并行的另一种部署方式
|
||
|
||
## Connections
|
||
- [[SalesforceDX]] ← supports ← [[ADR]]
|
||
- [[PlatformEvents]] ← extends ← [[ChangeDataCapture]]
|
||
- [[Bulkification]] ← enforces ← [[GovernorLimits]]
|
||
- [[Agentforce]] ← bounded_by ← [[GovernorLimits]]
|
||
|
||
## Contradictions
|
||
- 与 [[DevOpsCenter]] 关系:
|
||
- 冲突点:Salesforce DX 与 DevOps Center 是两种并行的部署策略,文档将两者并列但未明确优先选用哪个
|
||
- 当前观点:Salesforce DX 基于 Scratch Org 源码驱动是现代标准实践
|
||
- 对方观点:DevOps Center 作为 Salesforce 原生工具对非技术用户更友好
|