Benefits of a process-led approach for Agentforce
This article is a "Quick Start guide" to get hands-on, designing, and building Agents.
So before you jump in, here's a quick summary: Elements.cloud is the platform of choice for implementing Agentforce, providing a clear and collaborative design approach. Elements allow you to:
Quickly identify and articulate agent use cases.
Engage stakeholders to agree on scope
Design complete, working agents with clear logic and behavior using AI
Identify and capture requirements for actions and use AI to generate user stories
Accelerate Agent development by automating instructions
Faster evaluation, testing, and debugging with AI-generated test cases
Provide a change log of diagram, instruction, and test case versions
Provide governance and stakeholder sign-off of diagrams and user stories
Control org complexity and tech debt with Agent metadata in the core metadata dictionary
This approach ensures transparency, reduces risks, and accelerates implementation, particularly for organizations with complex processes or strict compliance requirements.
NOTE: If you haven't seen this in action - this 4 min video shows the following approach applied to build and deploy an Agent that is Discovery Framework Coach. It has 5 actions and 26 steps to direct the Agent's reasoning and planning. In less than a week, it went from idea to production and is live in our business and working consistently.
Prerequisites
Before implementing Agentforce with Elements.cloud:
Be a registered user with Elements: If you are not an Elements user, you can register for free. If you are a Salesforce employee, register and then click on your OKTA tile for access.
Salesforce Org Agentforce Licenses: Access to Agent Builder and Prompt Builder in your Salesforce Org
Elements.cloud Agentforce License or Consulting License, or licensed through Salesforce: Access to build UPN diagrams including AI-generated, build instructions and test utterances, and manage Agentforce metadata.
User in an Elements Workspace that has Agentforce enabled: If you are completely new to Elements, you can view this article to understand and either join an existing Space or create a new one to work in. The Space needs to be enabled for your Agentforce. If you do not have access, please contact success@elements.cloud or click on the chat icon, and we will enable it for you
Implementation guide
Step 1: Document Agent Use Cases and Jobs to Be Done
1.1 Understand "Agent Interaction Map" (AIM) structure
The first step is to create a map for the agent you are designing. We are calling this map an AIM (Agent Interaction Map). The map has 3 levels
Level 1 - List of Skills/Use Cases for Agent
Level 2 - List of Jobs To Be Done (JTBD) for the Skills/Use Case
Level 3 - JTBD which is the overall process flow with instructions and actions.
You can create your Agent Interaction Map from this template!
1.1 Create Level 1 - Agent diagram in AIM
In the Level 1 - top-level - diagram, you can see the user interaction is used by the Atlas Reasoning Engine to decide which Topic to use. On the right side of the diagram, the boxes represent the Skills. Each Skill is a collection of Topics. How the Atlas Reasoning Engine decides is based on the Topic Classification Description and Scope which are on the Level 2 diagram.
You can copy the blank AIM template from the Elements Public Templates workspace to use as a starting point. It has the structure and also the color scheme.
Level 1 diagram of AIM
1.2 Create Level 2 diagram for each Skill on the Level 1 diagram
Think of a Skill as a collection of Topics. You will not find a Skill inside the Agent Builder. There are only Agents and Topics. But this diagram is a useful way of grouping Topics. You want to make the Topics tight and self-contained so that you don’t confuse the Atlas Reasoning Engine. For example, you don't want all the instructions and actions for Booking, Amending, Cancelling, and Checking Availability in one Topic. These would be 4 separate Topics, grouped under a Skill - HR Vacation Assistant.
You can see the Topic Classification description is the text on the line going into the JTBD / Topic box. And the Topic Scope is the text in the box.
Level 2 diagram of AIM
Step 2 Design the Job to Be Done (JTBD) diagram
2.1 Creating Level 3 diagram
The next step is to create a Level 3 diagram. It is a drill down from a box in the Level 2 diagram. This is the Jobs To Be Done (JTBD) diagram that describes the Topic.
There are 4 ways to create that JTBD Level 3 diagram.
You can copy an existing diagram and modify it. We and SIs are planning to build template diagrams for different JTBDs. These can be imported and used as the basis of your JTBD diagram.
Elements AI will draw a diagram from your org metadata.
You could use Elements AI to draw the diagram from a sketch, image, diagram, script or SOP.
You can start with a blank sheet in a live workshop with your stakeholders.
Whichever approach you use, it is the quickest way of designing your agent and getting consensus on the scope and outcomes for your agent.
2.2 The fundamentals of building out (or modifying) your Agentic process diagram
Whether you are using templates or starting from a blank screen, you should review this short video which explains the fundamentals of creating the most effective and reliable Agent Interaction Maps.
This covers mapping the triggers, activities, the actions with the resources used and guardrails.
2.3 Key principles for drawing diagrams
The lines are the input and the activities are the intructions. So they should read “IF {input text} THEN do {activity text}. NOTE: The red text above is to indicate context, not to be written on the diagrams!
The activity text should start with a verb that is specific. Avoid Process or Manage. If you are getting data, then Get or fetch are better verbs than Find. Be unambiguous; e.g. instead of "add" do you mean "update" or "create"
If you have 2 lines going into a box, and the text is not identical then the agent will assume it is an OR
If you want the 2 lines into a box to be AND, then start the 2nd text with AND
The instructions are created for the agent based on the activity box number. You can automatically renumber the activity boxes. (see renumbering article)
The activity boxes are either performed by Agent, User or Action. We suggest you use our color scheme so it is easy to read the diagrams. The colors have been chosen for maximum contrast (508 compliance). You can copy and paste the themes per box type from any one of our templates. (see colors styles and formats article)
The resources on the activity boxes should be Agent, User or Action.
Create user stories for each Action activity box. The action is delivered by Salesforce metadata - Apex, Flow, Prompt Builder. These may need to be created.
2.4 Understanding how to refine logic within your diagram
Capturing precise logic is important when deciding how you want to educate Agentforce with the deterministic paths. These are what you would like it to base its reasoning and planning on. Even though an agent is inherently probabilistic, you can still direct it, (in the same way you would with a human employee), by being very specific about when to follow certain paths and what to do. e.g. "IF" certain things happen or conditions are met. In this context, there is a simple but effective way to build AND/OR logic into these diagrams.
Step 3: Create the Agent
3.1 Create Agent in Salesforce Agent Builder
With your JTBD Level 3 diagram designed, the next step is to build the Agent in Salesforce Agent Builder.
First, create an Agent or use the internal “Employee Agent” BTW It used to be called Einstein Copilot.
Then create a new Topic and give it a name. This should be same as your JTBD diagram. You can copy the "Classification" and "Scope" from the Level 2 diagram input and activity box text into the Topic in Agent Builder.
You need to create Actions for each Action activity box in your JTBD diagram. Each of these is Actions is linked Salesforce metadata - Apex, Fow, Prompt Template. If they do not exist, you need to create them.
All of this work is a required before you add the Topic instructions.
3.2 Generate instructions from the process
With your Diagram in "Edit" mode, in the right panel of the JTBD Diagram you can generate the Topic instructions. It will interpret your entire process diagram and all instructions and guardrails will be generated as a single text block and put into your clipboard
Go to the Agent Builder and the Topic. Paste instructions into ONE instruction field. There is no need to paste each instruction into a separate instruction fields. Salesforce best practice is now only to use one instruction field for all the instructions and guardrails.
3.3 JTBD diagram change log
Every time you start to edit the JTBD diagram it takes a snapshot of the diagram. Also when you generate instructions it takes a snapshot of the diagram and a copy of the instructions. You can access snapshots in the right panel of the diagram. You can filter for just these snapshots
Step 4: Evaluate the Topic
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, (i.e. if the agent does not behave as intended), it is critical to address the root cause.
4.1 Generate test scenarios
Review the JTBD diagram and look at the different paths and create test scenarios. You wll use these to evaluate the agent. This is all about evaluating the logic and probable outcomes from the multiple conversation permutations that can take place in different scenarios. We are developing significant capabilities to enhance the evaluation of Agents in this context. This document (and users) will be updated as we release this critical capability in the near future.
4.2 Generate test utterances
We also generate test utterances for each path to use alongside your analysis of the JTBD diagram. In the right panel of JTBD diagram in the 'Changes' tab, Gick 'Generate Agent details' and from the dropdown select Test utterances'. The test utterances are displayed in a pop-up window and in your clipboard so you can paste them into a spreadsheet.
When you generate test utterances the diagram creates a snapshot of the diagram and a copy of the test utterances. You can access snapshots in the right panel of the diagram.
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 behaviors.
4.3 Evaluate the agent
Inside Agent Builder, firstly take your agent through the 'Happy Path'. Keep your questions and statements clear within the bounds of the instructions you have given it, don't try and 'push it'. Take the agent through its activities one at a time, tracking its progress through the process as you go.
Then take the agent through some of the fault paths to evaluate the results.
4.4 Fix failures
You need to work out why the agent failed and then how to resolve it. That is made far easier because you have the JTBD diagram:
Identify the failing step: Pinpoint where in the JTBD diagram the agent is not responding correctly. This could be due to unclear or insufficiently detailed input text, or activity text. Or you may need to change an instruction to an action.
Update the diagram: Make the changes to the diagram based on your analysis of the problem.
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
5.2 Deploy Agentforce and related metadata
Once the topic passes all evaluations, you can deploy your Agent using your chosen Salesforce DevOps tool. You will need to deploy
The Agentforce metadata (Agent, Topics, Actions)
Any metadata that you built or updated for the Actions (Apex, Flow, Prompt Templates)
Any Data Cloud metadata configuration
Any changes to the Channel where the Agent is deployed - e.g. Experience Cloud
And finally activate the Agent in your Production Org.
5.2 Governance of AIM for compliant/regulated use-cases
On top of metadata deployment, use Elements diagram versioning and governance to publish your AIM map. This creates a locked-down version and you can keep working on the "Draft" version of the diagram. (see "Diagram Versions and Publishing new Diagrams" article)
We recommend that the version management is treated as a core deliverable for building Agents. To benefit from it, the AIM content will need to be identified as ongoing operational content that will be handed over to and managed by the end-customer. At the start it may be project or POC stakeholders who are allocated. But even there, "who approved these directions and instructions for the Agent" will be very valuable.
Once in operation, this becomes an operational benefit as the auditable design documentation which is the equivalent of a "Quality Management System" (QMS) for human labor - but applicable to your Digital Labor. The more complex and critical your Agent use cases get, the more valuable this will prove to be for you.
Step 6: Post-Implementation Best Practices
***ALWAYS*** use the diagrams to modify your Instructions, Action Descriptions, Classification and Scope. You can then generate and paste these into Agent Builder. If you do it direct in Agent Builder, you will get out of sync and when you want to build on top of what is in the diagrams, they will not represent the current working agent.
Regularly review and refine agent designs based on performance metrics and feedback.
Extend the AIM to add Skills and Topics. This is your central repository of Agent documentation.
Connect Elements to your Salesforce Org, you can sync the Org metadata including Data Cloud and Agentforce. This provides documentation, impact and dependency analysis
The Agentforce metadata you have deployed (linked to documentation, analytics and dependencies in context)
The dependent metadata in your existing Org to allow you to understand the impact that changes elsewhere in your Salesforce Org will have on the function and performance of your Agent. Note: this is doubly important with Agents since they may continue to function, but simply change their behavior.
Final Word
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.