Why Implement Agentforce?
Agentforce is the future of Salesforce automation and customer success. It allows organizations to build and customize autonomous AI agents that operate 24/7, supporting both employees and customers. These agents streamline operations, eliminate bottlenecks, and ensure consistent, reliable service delivery at scale.
By leveraging AI agents, businesses can reduce manual effort, enhance operational efficiency, and focus on strategic priorities—all while delivering faster, error-free outcomes.
When to Use Elements.cloud for Agentforce Implementation?
Elements.cloud is the platform of choice for implementing Agentforce, providing a clear and collaborative design approach. Elements allows you to:
Quickly identify and articulate agent use cases.
Design complete, working agents with clear logic and behavior.
Identify and capture requirements for actions.
Secure governance and stakeholder approval with easy-to-understand visual diagrams.
Accelerate Agent development by automating instructions and test cases.
This approach ensures transparency, reduces risks, and accelerates implementation, particularly for organizations with complex processes or strict compliance requirements.
Prerequisites
Before implementing Agentforce with Elements.cloud:
Agentforce Licenses: Ensure access to Agentforce within your Salesforce Org.
Elements.cloud Professional License: Access to build UPN diagrams, generate instructions, and manage Agentforce metadata.
Implementation guide
Step 1: Document Agent Use Cases and Jobs to Be Done
1.1 Understand Agent map structure
The first step is to create a map for the agent you are designing.
Elements is a hierarchical diagramming tool, meaning you can capture child diagrams for further detail to organize your designs logically.
We propose following diagram hierarchy:
Top level diagram features boxes that articulate broad use-cases for the Agent
Child diagram for every use-case features boxes that articulate specific Jobs To Be Done that will turn into your Agent Topics
Child diagram for every Job To Be Done which will articulate the detailed logic for your Topic (which we will automatically turn into a set of logical instructions).
1.2 Create top level Agent diagram
In the top-level diagram, define stand-alone boxes representing broad use cases for the single agent. While these use cases do not correspond directly to agent metadata, they logically group what you want the agent to do. For example, for internal Einstein CoPilot, you may create boxes for different business units like Sales, HR, Customer Service, or Finance.
1.3 Create child diagram to define Jobs To Be Done (Topics)
Each use case box then leads to a child diagram, where you articulate individual Jobs to Be Done (JTBD) as separate boxes. A JTBD corresponds directly to a ‘topic’ in the Agent Builder and should represent a single, scoped, discrete process.
By focusing on discrete jobs, you control the complexity of each topic, making both the design and execution more manageable.
Best Practices for Defining JTBD
Write each JTBD as a clear, action-oriented statement using verb + subject format, such as:
“Schedule appointment for installation or repair.”
"Book a vacation"
"Validate and schedule refunds"
Avoid vague verbs like:
Manage
Handle
Support
Process
as they broaden scope unnecessarily and complicate design. For instance:
Instead of “Manage customer orders”, write “Track order status and update customers” to clearly define the task as monitoring order progress and notifying users.
Instead of “Handle refund requests”, write “Approve or reject refund requests based on eligibility” to clarify the specific action required.
Instead of “Support onboarding process”, write “Guide new users through account setup and training” to specify the task's outcomes.
By choosing precise, specific verbs, you control scope, make the job easier to design, and ensure the agent’s behavior is clearly aligned with the desired outcomes.
Step 2: Design the Job to Be Done diagram
2.1 Decide if to use a template or start from scratch
The next step is to create a child diagram for your Job To Be Done box, which will correspond to the specific topic you will end up configuring for your Salesforce Agent.
There are two ways you can get started with that diagram:
You can start diagramming from scratch, if you are dealing with a very distinct and unique use-case. In this case, navigate to the next step in this guide.
You can use one of the pre-defined agent template diagrams. Here are the steps:
Create a new map and choose 'From template' option
Use the search bar and type 'Agentforce'. This will bring back all Agentforce specific templates.
Select the template that is closest to the use-case you are focused on.
Once the new map is created, go back to your Agent map. Select the Job To Be Done box, and import the Agentforce template as a child diagram.
2.2 Refine your process diagram
For each JTBD, design a business process diagram using UPN (Universal Process Notation).
If you are not familiar with this notation, we strongly recommend you familiarize yourself with our solution guide on UPN, as this is a different type of diagramming than your standard flowcharting.
Below is an example business process diagram, in UPN notation, for 'General FAQ service cloud' agent. Let's review some key diagramming principles for designing your topics!
2.2.1 Define your guardrails
Guardrails are rules you put in place to ensure your Agent NEVER performs certain actions or gives certain responses. Guardrails are a way of ensuring compliance of your agents with company policies and to mitigate risks with hallucinations.
In Agent Builder, there is no specific place to document your guardrails. Instead, you would document your guardrails as instructions for the topic.
As you map out your agent process diagram, you will discover that your guardrails will be covered by the process logic. However, we recommend that you document some key guardrails as text boxes on the canvas. They will guide your process design and will be a reference point for what to cover in the process.
2.2.2. Capture 3 types of activities
Universal Process Notation is a modelling technique that relies on using just one building block:
Read more on UPN notation in our solution guide.
The purpose of UPN is to take away all cognitive effort from choosing what shapes to use, and instead focus deeply on describing each distinct process activity using when, what, who, with what, and why information.
However, for the purpose of the Agent diagram, there are a few specific rules you should follow, to ensure our agent instruction generation works accurately.
Assume you will only have one resource per activity, and you will only use 3 types of resources, thereby leading you to three types of activities:
Human activities: Any step that is performed by the customer / user (human), should have that one resource attached to it. Activities with 'Customer/User' resource will not be used to generate instructions for the agent. But they are important for design, as you need to think about and map out all the different ways a customer or a user may respond to the agent.
AI Agent activities: Any step (answer to be provided, question to be asked etc.) performed by the agent.
Actions: Any step the agent needs to perform to get new information, or perform any database operation.
2.2.3 Determine which steps require Agent Actions
As a rule, you need to have an action when you have an activity being performed by the Agent that covers any of the following scenarios:
Agent perform a database action : creates a new record, updates a record, deletes a record. For instance "Create a case", "Update reservation", "Cancel booking" etc.
Agent needs to use customer information: by default, the Agent does not know anything specific about any of your customers and their data, unless you tell it. Whenever there is an activity where the agent needs to find some specific record about the customer, you need to have an action. For instance, "Get account details", "Check order history", etc.
Agent needs to notify someone: If you want the Agent to send an email, a notification, and SMS or perform other form of communication, you need to have an action.
Agent needs to perform geolocation or time-based assessments: Salesforce Agents are not current context aware, meaning that they do not know what date it is today or from where a customer may be contacting you. Therefore you need an action to determine those details.
Agent needs to perform complex decision making: You may need your Agent to perform a complex set of checks and conditions to qualify customer question as one of N categories, which then drive different actions or decisions by the Agent. If this is the case, assume you will need a Prompt action. An action that calls a predefined Agent prompt where you can store complex reasoning logic.
2.2.4 Define distinct, verifiable, and detailed outcomes
What truly sets apart UPN from other diagramming notations is the emphasis on capturing distinct, verifiable outcomes of each process step.
Keep these rules in mind:
This outcome provides the business rationale for the activity and signals its completion
The outcome also acts as a catalyst or requirement for the following activity
Outcome must provide clear, unique, verifiable set of conditions for completing the task (ask yourself, how would we know and verify that someone has done this?)
Read more on UPN principles in our solution guide.
To verify if your Agent process makes sense, try reading it in the following format:
IF input condition
THEN perform activity
This is the way Elements will end up generating your instructions - as set of logical, natural language programming statements.
Ensure that each "IF...THEN..." pair is detailed and verifiable. Ask yourself if a freshly hired intern would understand the process. For instance:
Wrong: "IF details are missing, THEN Ask customer to provide their email address or name and surname and account name"
Good: "IF email address is not provided, OR user provided only name and surname but no account name, THEN Ask customer to provide their email address or name and surname and account name"
Whilst it may seem logical in context of the instruction what details are required, you are going to minimize agent errors and mistakes if you discard any vagueness from the process.
2.3. Capture stories for actions
Your complete Agent business process will be automatically transformed into a set of instructions you will be able to simply paste into the Agent Builder. However, before you get to that step, you need to address building the required Agent actions.
Select all the boxes with 'Action' resource on them. And then capture user stories, either manually or automatically with ElementsGPT. As part of analysis later on, you will have to decide if there is an existing flow or apex that can be reused by the agent (at which point you just need to create an Action pointing at that automation), or if there is a new, custom requirement and an automation will have to be built from scratch.
Step 3: Build the Topic
3.1 Prepare topic actions
With JTBD processes designed, the next step is to build the topic in the Agent Builder and associated actions.
First, create a new topic for your Agent and give it a name (the same as your business process) and a description.
Based on user stories captured earlier:
create required automations
create actions in Agent Builder that reference those automations
describe the action based on what the invoked automation does
All of this work is required prerequisite before you define your specific topic instructions.
3.2 Update process diagram
When you were designing your Agent business process, you documented every activity that requires an Agent action with a resource 'Action'. However, to make instructions generation accurate, we recommend that you go through your process and replace those generic 'Action' resources with a new, custom resource for each activity in the format of 'Activity: [API name of the action]'
3.3 Generate instructions from the process
In your updated Agent process, open the right panel for your diagram. Then select the 'Changes' tab. Click 'Generate Agent details' and from the dropdown select 'Generate topic instructions'.
Our Agent instruction generator will interpret your entire process diagram and generate your topic instructions in the following format:
IF input condition,
THEN perform activity,
USING Action resource
For example:
IF “start date for vacation request is missing,” THEN “prompt user to input start date,” USING Action: apiName.CalendarVerify
.
All instructions will be generated as a single text block and put immediately into your paste buffer. Simply go to the Agent Builder app, and paste instructions into the instruction field.
Tip!
Whilst Agent Builder provides you multiple 'Instruction' fields, they are put in random order for the Agent, which may affect the Agent behaviour.
We recommend that you paste ALL of your instructions into a single instruction field. That way you will control the order in which the Agent reads and interprets the instructions to preserve logical sequence of steps.
Step 4: Test the Topic
4.1 Generate test cases
With the topic ready, you know need generate test cases directly from the process diagram.
In your Agent process, open the right panel for your diagram. Then select the 'Changes' tab. Click 'Generate Agent details' and from the dropdown select 'Generate test cases'.
These test cases represent inputs the agent is expected to process, grouped logically by process pathway. And for every step, we generate totally positive, totally negative, and partially positive scenarios, to test different behaviours.
The test cases are automatically copied into your paste buffer and you can just paste them into a spreadsheet.
4.1 Test Agent behaviour
Testing involves running each test case systematically to confirm whether the agent behaves as designed. If the agent responds as expected, the test passes. However, if something fails—if the agent does not behave as intended—it is critical to address the root cause.
Key Approach to Resolving Failures:
Identify the Failing Step: Pinpoint where in the process diagram the agent is not responding correctly. This could be due to unclear or insufficiently detailed outcomes or the need for a custom action.
Update the Diagram: Improve the diagram by making outcomes more explicit or by substituting generic agent responses with targeted actions.
Regenerate Instructions: Once the diagram is updated, regenerate both the agent instructions and the test utterances.
Retest the Topic: Run the updated utterances again to validate the changes.
This iterative process ensures that agent behavior aligns precisely with the designed logic, maintaining clarity and consistency across all steps. And it also helps you keep your design documentation up to date.
Step 5: Deploy Agent
Once the topic passes all tests, you can deploy your Agent!
You need to deploy:
Any automations that you built for the actions,
Any specific metadata configuration (like Data Cloud),
And finally activate the agent in your Production Org.
On top of metadata deployment, use diagram versioning to publish your design map for the Agent. In the future, if any changes are required to the topic, or you want to expand the agent with more topics, you can keep working on the To Be version of the diagram while still preserving the As Is version until the release is ready.
Post-Implementation Best Practices
Regularly review and refine agent designs based on performance metrics and feedback.
Keep UPN diagrams updated to reflect improvements or changes to logic.
Outcome
By implementing Agentforce with Elements.cloud, you gain a structured, iterative approach to designing, building, testing, and deploying AI agents. This methodology ensures clear logic, stakeholder approval, and measurable business value while enabling continuous improvement.