
This blog explains how to integrate AWS S3 data with Salesforce Data Cloud to use inside Agentforce agents. This agentforce agent show us data based on customer question, from AWS S3 where csv file is uploaded. Let's start with following steps:
Create AWS S3 Bucket
-
Login your AWS Account
-
Search for Amazon S3 and click on this
-
Click on Create bucket
-
Enter the Bucket name. In my case bucket name is my-agentforce-bucket (Name must be unique)
-
To save click on Create bucket at the bottom
-
Go to inside bucket my-agentforce-bucket
-
Click on Create folder and Give folder name Product Order/
-
Go to inside Product Order/ folder and Click on Upload and Select you your own csv file to upload.

-
After doing this. You have to create AWS access key and AWS secret access key to connect with salesforce
-
Click on your profile and go to Security credentials
-
Click on Create access key (Note: If you have already use that)
-
Select Third-party service option.
-
Click on Next
-
Now you will get access key. Copy the access key and keep it safe place.
Create Ohter Connectors
- Go to Data Cloud Setup from Gear icon
- Search for Other Connectors in Quick Find Box
- Select Other Connectors and Click on New
- Select Amazon S3 connctor type
- Enter inforamtion like below image

- Before save click on Test Connection
- Click on Save
- Now its look like this:

Crete Data Stream
- Go to Data Stream tab in Data Cloud App
- Click on New
- Select Amazon S3 from Other Sources.
- Click on Next
- Enter the following detail as mentioned in image

- Click on Next
- Click on Properties tab and select Other option
- Select products_id as Primary Key
- Click on Next
- Enter the following details as mentioned in image

- Click on Next
- Entere the following details as mentioned in image

- Click on Deploy
- After Deploy Check that Last Run Status must be success

Check Data Lake Object (DLO) is create or not
- Go Data Lake Objects tab.
- Select All Data Lake Object from list views
- Click Product Order/Product_Records.csv Amazon from table. which is cateogry is Other

Create Data Modal Object (DMO)
- Click on Data Lake Objects tab
- Click on Start button in the Data Mapping section on the right side.
- Click on Custom Data Modal tab and click on New Custom Object
- Enter the Shopping Product in the Object Label field
- Than its should like below as mentioned in image.

- Object Label: Shopping Product
- Object API Name: Shopping_Product

- Click on Save
- Now Mappling will look like this

- Let's execute the SOQL query for Shopping Product object

- Go to the Data Explorer tab. From where you can see Shopping Product table

Create Flow to use in Agentforce
- Go to setup and Search for Flow
- Click on New Flow button and Select Autolaunched Flow (No Trigger)
- Create these below variable:(Make sure Availability Outside the Flow should be Available for input for productId and title. And apart from these 2 fields we have to make Available for output for others variable)

- Select Get element add Following details
- Label: Get Product Items
- API Name: Get_Product_Items
- Data Source: Data Cloud Object
- Data Space: default
- Object: Shopping Product
- In Filter Records - Condition Requirements:
- Field -> title Operator -> Equal Value -> title
- Field -> products_id Operator -> Equal Value -> productId
- How many Records to Store: Only the first record
- How to Store Record Data: Automatically store all fields
- Select Decision element and fill following details as mentioned in image.

- Select Assignment element for Assigned Products and fill following details as mentioned in image.

- Select Assignment element for Show Error Message and fill following details as mentioned in image.

- Click on Save and give name External Product Data Cloud Flow
Use Flow inside Agentforce
- Go to setup and Searh for Agentforce Agents
- Click on + New Agent
- Select Create From a Template and than Agentforce Service Agent
- Click on Next and Click on all Added to remove default topics
- Give name Product Service Agent and API name Product_Service_Agent
- Add about Company : This agent represents MyKart , a global technology company known for designing and delivering innovative consumer electronics, software, and digital services. Apple’s product portfolio includes iPhone, iPad, Mac computers, Apple Watch.
- Select Agent user: EinsteinServiceAgent User (custom_service_agent@00dg5000002y0z3242345.ext) (This is in my case)
- Click on Next and No need to select Data Library leave it is blank
- Click on Create
Crate Topic for Agentforce and Add Action
- Go to setup and Searh for Agentforce Agents
- Go to Product Service Agent CLick on menu button and CLick on Open in Builder
- Click on #Topic and Click on New and CLick on + New Topic.
- Name: Product Details Inquiry
- Api Name: Product_Details_Inquiry
- Classification Description: Handles customer inquiries to fetch product details based on their specific question.
- Scope: You job is only to retrieve product details as requested by the customer, ensuring the response aligns with their query, and not to address unrelated topics or perform actions outside this scope.
- Instruction 1: If the customer provides a product title or product id, use it to fetch the relevant details.
- Instruction 2: Provide concise and accurate product details based on the customer's request.
- Instruction 3: If the customer provide a product id or product title than you have to show about product based on customer request.
- Instruction 4: If customer ask for specific things like product title, price, discount percentage, discounted total, total and quantity than only show specific things.. If the customer ask for product details than show all details to a customer.
- Click on Next and Select the actions External Product Data Cloud Flow
- Click on Finish
Let's see quick demo
