Agentforce Examples

This section provides example Agentforce implementations to help you get started building and using agents. Each example explains the main concepts it demonstrates and gives you what you need to build it yourself.

End-to-End Agents 

Build and deploy a complete Agentforce solution from start to finish.

ExampleDescription
Build the Palonia Resort Demo with a Coding AgentUse an AI coding assistant to build and deploy a complete solution — custom objects, sample data, a flow, a Lightning web component, a prompt template, and a service agent — to your org.
Customer Support AgentA support agent that verifies a customer’s identity and looks up their orders — built three ways: headlessly with an AI coding agent, with code in Agent Script, or with clicks in Canvas.
Collect Customer Information to Create a RecordAn agent that collects required details across multiple turns, then creates a record through a flow — with safeguards against dropped values, duplicate records, and false confirmations.
Build and Deploy an Enhanced Chat AgentBuild a chat agent, test and activate it, and deploy it to an Enhanced Chat v2 channel.

Agent Script Techniques 

Learn specific Agent Script techniques through focused, code-first examples.

ExampleDescription
Enforce Subagent Sequencing With VariablesA step-based interview agent that enforces question order while handling natural conversation.

Extend Your Agent with Data and Actions 

Ground your agent in your own knowledge and add custom logic that the standard actions don’t cover.

ExampleDescription
Demystify Jargon with KnowledgeEnsure that your grounded agent understands your organization’s evolving jargon without having to update your information sources.
Custom Apex Action for Complex QueriesA custom action built in Apex to search product inventory.

Agent Script Recipes 

For more Agent Script examples, see Agent Script Recipes.

Agent Script Recipes

Related Topics