Hello Trailblazers,
I am preparing an Agentforce Solution Design for a client and would like guidance from experienced architects and consultants on how to approach the design comprehensively.
The use case may involve Employee Agent, Coworker Agent, and Out-of-the-Box Salesforce Agents
, Flex Prompt Template and I want to ensure I am covering all important aspects from business requirements through implementation, licenses, Flex Credit model, governance, and deployment.
Any sample templates, reference designs, or lessons learned from real implementations would be greatly appreciated.
Thank you in advance for your guidance! 🚀
#Agentforce #SalesforceAI #Solution Architects #AgentforceBuilder #Enterprise ArchitectureHey Jiyaulla,
Here’s how I would approach the solution design:
1. Agent Boundaries & Routing
- Split by persona: Don't build one monster agent. Keep Employee Desk (IT/HR Q&A via Knowledge), Coworker (sales/service reps on record pages), and OOTB Service Agent in clean, separate buckets.
- Topics & Hand-offs: Limit each agent to 4–6 tightly scoped Topics. Write explicit "When to use" instructions so the reasoning engine doesn’t cross wires. Always map human escalation via Omni-Channel, carrying the chat summary over.
2. Actions & Grounding (The Engine)
- Actions: Use Autolaunched Flows for standard CRM updates and Invocable Apex for external API lookups. Keep JSON outputs short; feeding raw multi-page payloads burns tokens and slows reasoning down.
- Flex Prompt Templates: Stick to a 4-part prompt: Role, Grounded Context, Guardrails (what NOT to do), and exact Output Format.
- Knowledge & Data Cloud: If grounding with PDFs or policies, ensure your Data Cloud search indexes chunk properly. Watch Field-Level Security—if the running agent user can’t see the field, the LLM hallucinates.
3. Trust, Guardrails & Security
- Einstein Trust Layer: Decide upfront if PII needs data masking and where audit logs get retained.
- Hard Refusals: Put explicit negative prompts inside each topic (e.g., "Never disclose salary bands; route user to Workday").
4. Licenses & Consumption Reality Check
- Cost control: Agentforce bills per conversation, and custom prompt calls burn credits. Don't use the LLM for things a simple Flow lookup or formula can solve deterministically.
- Token limits: Heavy record grounding causes latency spikes. Keep grounding payloads minimal.
5. ALM & Deployments (Where Projects Trip Up)
- Metadata API: Topics, Actions, and GenAiPromptTemplate deploy through standard DevOps pipelines (Copado, Flosum, SFDX).
- Manual Post-Deploy: Playbooks always break here. You must manually:
- Assign permissions and FLS to the Agent Execution User.
- Activate the Agent version in Target Org.
- Validate Data Cloud search index syncs.
