Implement Data Cloud for Agentforce
Learning Objectives
After completing this unit, you’ll be able to:
- Explain how to prepare data for Agentforce.
- Describe how to create an agent built on unified and transformed data from Data Cloud.
Understand Data Requirements
Before you implement Data Cloud, you need to understand your project’s data requirements. It’s helpful to review the data preparation steps and the questions to consider.
Data Prep Steps | Questions to Consider |
---|---|
|
|
|
|
|
|
This table isn’t comprehensive. Learn more in the Prepare Your Data unit of the AI + Data: Project Planning module.
In the next section, follow NTO as the company identifies, connects, and processes data for its Agentforce project.
Configure Data Cloud for Agents
NTO wants to build an agent that responds to questions about product issues. NTO plans to ground its prompts with advanced Data Cloud RAG. Follow along with Pia, NTO’s enterprise architect, as she configures Data Cloud and builds an agent, starting with data preparation. Here are the initial steps she takes.
- Enables and provision Data Cloud in an org
- Sets up Data Cloud users
- Finds data about customer cases and identifies its source
In Service Cloud, NTO stores customer case data. Here are some example cases from different customers.
- Case 1: Pants style 1068 is too short
- Case 2: Pants style 2000 is too long
- Case 3: Fitness watch doesn’t charge quickly
- Now, it’s time to create a data stream that ingests the case data from Service Cloud into Data Cloud. Case data is stored in the Case data lake object (DLO).
- Pia uses a batch data transform to resolve data issues such as inconsistent names and formats. Transformed data is stored in the Cleaned Case DLO.
- Then, she adds mappings between the Cleaned Case (DLO) and Case data model object (DMO).
- Now it’s time to create and run an identity resolution ruleset to link the cases with the customer’s unified profile.
Now Pia knows more context about each case. For example, Pia sees that Case 1, about pants being too short, comes from Rachel Rodriguez. Rachel’s unified profile includes her height, 170 cm. Pia also sees that Case 2, about pants being too long, comes from a customer with height 165 cm. This context will help the agent give more relevant and effective answers.
With their data ingested, transformed, and unified, Pia is ready to set up RAG.
- She creates a search index from the Case DMO and a search index from the Unified Individual DMO.
These indexes will be used to power RAG in their agent. Data Cloud automatically creates a retriever for each index, which serves as the bridge between search indexes and prompt templates.
Optionally, Pia could create an ensemble retriever. Learn more in Create an Ensemble Retriever.
- Now, Pia creates a prompt template that calls the ensemble retriever or both individual retrievers.
The retriever populates the prompt with the most relevant information. Pia’s prompt template analyzes the customer’s question and uses its knowledge base (existing case data and unified profiles) to formulate an answer.
It’s time to use the prompt template in an agent. Pia:
- Creates a new agent from an Agentforce Service Agent template.
- Creates a permission set that includes access to Prompt Builder, the Case DMO, and the Unified Individual DMO. Then she assigns the permission set to the agent user.
- Creates an agent action named Answer Questions with Case that uses the prompt template.
- Adds a topic to the agent user.
- Adds the Answer Questions with Case action to the topic.
- Activates and tests the agent.
For example, Pia asks the agent, “I have long legs and I’m 170 cm tall. Which pant styles do you recommend and not recommend? ” The agent answers, “Customers with similar heights report that style 1068 is too short. Customers report that style 2000 is longer. I recommend style 2000, and I don’t recommend style 1068.”
After a few more rounds of testing and tweaking the prompt, Pia and team are satisfied with its performance. NTO deploys and operationalizes its agent by adding it to customer channels. After deployment, the team makes sure to consistently monitor and refine it. Remember that after you start using your agent, follow these best practices.
- Monitor the audit trail and give feedback on your agents.
- Edit prompts to address critical feedback.
- Monitor performance with Agentforce Analytics dashboards.
- Update your RAG implementation to keep your agents’ data sources current.
Wrap Up
In this module, you learned how Data Cloud supports Agentforce capabilities and the difference between enabling and implementing Data Cloud. While enabling Data Cloud unlocks some capabilities such as the Trust Layer and RAG with the Agentforce Data Library, implementing Data Cloud is the crucial next step given all its benefits.
Implemented Data Cloud provides agents with a unified data foundation that extends their knowledge across Salesforce and beyond. Also, RAG solutions built on Data Cloud have context from unified profiles; use preprocessed, transformed data; and support diverse data types and sources. When Data Cloud is implemented, agents unlock real-time capabilities and access to external zero-copy data, further expanding their potential.
You followed NTO prepare its data, implement Data Cloud for Agentforce, and build a service agent that uses unified profiles to give effective responses. Now you’re ready to implement Data Cloud for Agentforce in your business too!