Agentforce Data Cloud & Data Library in Salesforce

Earlier, we saw that the AI Agent could retrieve data from different Salesforce objects to answer customer questions, and that the data was structured in a tabular format with fields.

Now, how can we store unstructured data in Salesforce so agents can access it based on customer requests? So, for that, we can upload any unstructured data, such as PDFs or Docs, to the Data Library, where the agent can access it.

In this tutorial, we will learn what the Agentforce Data Cloud & Data Library in Salesforce is, how to use it, and how to grant access to AI agents in Agentforce.

Agentforce Data Cloud & Data Library in Salesforce

Now, let’s first understand what the Data Cloud and Data Library are in Salesforce Agentforce, and how they help the AI Agent find and use the correct data to give responses.

Agentforce Data Cloud in Salesforce

Agentforce Data Cloud is a place where all your customer data from different sources—such as Sales Cloud, Service Cloud, websites, or marketing tools comes together in one central location. It helps the AI Agent understand the complete picture of a customer before responding.

Agentforce Data Library in Salesforce

The Agentforce Data Library in Salesforce is a feature that collects and organises all the unstructured data the AI Agent needs.

Earlier, if the AI Agent needed to find customer details, order information, or case records, it had to look across different Salesforce objects. Also, if we need to upload our company policy or FAQs document, we can do so to the data library.

With the Agentforce Data Library, you can define and connect important objects like Account, Case, Order, or Product in one library. Then the AI Agent can easily search and retrieve data from this single library rather than searching each object separately.

For example, suppose a customer asks, “What is company policy?” The AI Agent doesn’t need to search multiple objects.

It simply looks up the Data Library, finds the document where we have added the company policy, and provides the user with the correct information instantly.

Permission User Needs to Access Agentforce Data Cloud & Library in Salesforce

To access the Data Cloud and Data Library, you need to give the user proper access. Below, I will explain which permissions you need to assign so the user can view and use the data.

Go to the User Record Page for whom you want to grant access to the data cloud -> Advanced Details -> Click Permission Set Assignment button, and then click the Edit button to assign the permission set to this user.

Salesforce Agentforce Data Cloud

After that, you need to assign the Data Cloud User permission set to the user to give the data cloud access.

Data Cloud User Permission Set in Salesforce

Set Up Data Cloud in Salesforce Agentforce

Now, let’s set up the Data Cloud instance to connect all your customer data in Salesforce. For that, click the Gare icon -> Data Cloud Setup.

Data Cloud Setup in Salesforce Agentforce

You will see the Data Cloud Setup Home. Scroll down to Set up Data Cloud and click the Get Started button. Set up the data cloud.

This process can take 20 to 30 minutes to get ready.

Set Up Data Cloud in Salesforce Agentforce

Create a Data Library in Salesforce Agentforce

After setting up the data cloud, we can upload the documents to the data library. For that, navigate to Setup -> Quick Find, and search for Agentforce Data Library.

Click the New Library + button to create the data library.

Create New Agentforce Data library in Salesforce Agentforce

After that, provide the Name for the data library, and the API Name will be automatically populated. Then click the Save button to create a library.

Add a Data Library in Salesforce Agentforce

Upload Documents to the Data Library in Salesforce Agentforce

After creating the data library, we can add the Files, Web, and Customer Retriever to it. Below you can see these options:

  1. Files: You can upload your own files directly, including PDF, DOCX, TXT, and CSV. The AI agent will use this file to answer questions or give information related to its content.
  2. Web: You can add a website link (URL). The AI agent will read and use the content from that website as a knowledge source.
  3. Customer Retriever: This connects to your Salesforce data, including Accounts, Cases, and custom objects. The AI agent can then retrieve and use real-time customer data from Salesforce to answer user queries.
Agentforce Data Cloud & Data Library in Salesforce

Above, I have selected Files to upload to the data cloud. Then click the Upload File button, select the document you want to upload, and click Done.

Upload Files to Agentforce Data Library in Salesforce

After that, you will see the document you uploaded, and in the 1st image, you can see the Status is In Progress, which means you can use this data library until it gets Ready. When you see the status is Ready, you can assign this data library to your agent.

Agentforce Data Library Status in Salesforce

Data Cloud App in Salesforce Agentforce

When you upload any document to your created Data Library, you can see what happens behind the scenes in the Data Cloud app.

In the background, Salesforce automatically creates and stores the document details in Data Model Objects (DMOs) inside Data Cloud. These DMOs store information such as the document name, type, size, and a link to the related record.

Data Streams in Salesforce Data Cloud

Data Streams automatically ingest data from various sources, such as Sales Cloud, Service Cloud, and external systems, into Data Cloud. It keeps the data updated in real time so your AI Agent always has the latest information.

Data Lake Object (DLO) in Salesforce Data Cloud

A Data Lake Object stores raw data from Data Streams. It acts as a storage box for all incoming data before it is processed or organised.

Data Model Object (DMO) in Salesforce Data Cloud

A Data Model Object organises the data from the Data Lake into a structured format. It helps Salesforce and the AI Agent easily understand and use the data to answer questions or perform actions.

Search Index in Salesforce Data Cloud

Whenever you upload any new document to the Data Library, you need to rebuild the Search Index in Data Cloud.

This process helps Salesforce scan and update all the new or changed documents so that the AI Agent can quickly find and use the latest information when responding to customer queries. Without rebuilding the search index, the new data may not appear in search results.

Data Cloud App in Salesforce Agentforce

To rebuild the document, open the Search Index tab, then open the related record. In the Search Index Last Run Status field, you will first see the status as Ready.

Click the Rebuild button, and when you refresh the page, the status will change to In Process. It will stay in this state until the rebuild is complete.

During this time, your AI Agent cannot access information from the newly uploaded file. Once the status changes back to Ready, the agent can use the new data.

Rebuild Data Library in Salesforce Agentforce

Conclusion

I hope you have got an idea about Agentforce Data Cloud & Data Library in Salesforce. In this, I have explained how to grant access to AI agents in Agentforce, how to set up Data Cloud, create a data library and upload a document to it.

You may like to read:

Salesforce AgentForce Live Webinar

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.