Welcome to the DIY Storefront, a sample retail application. DIY Storefront is a fictional retail store that uses Data 360, Agentforce, and the Salesforce Platform to deliver highly personalized customer experiences.
The DIY Storefront app showcases Data 360, Agents, and Prompts by using both structured and unstructured data, including Intelligent Context, to process complex information. It includes a comprehensive enriched user powered by Data 360, Agentforce agents using structured and unstructured data to drive contextual conversations, a product carousel in the agent and more..
Watch the video on what is included in this end to end solution before you get started.
There are two ways in which you can install this solution kit, you can use Claude to run the installation process for you, or you can manually setup the solution in your org. The instructions for both are provided below.
To ensure a successful install, please ensure your environment is properly configured
| Step | Details |
|---|---|
| 1 | Ensure you have Claude, Git, and Visual Studio Code installed before running the installer. Also ensure that you have permissions to debug the Chrome browser. |
| 2 | Create a folder on your local desktop to store the project. This will ensure that any CLAUDE.md file you may have already created won’t interfere with the install |
| Step | Details |
|---|---|
| 1 | Request a demo org from the partner learning camp here https://partnerlearningcamp.salesforce.com/s/demo-org. If you want to use your own developer org ensure that it has Sales, Service, Experience, Commerce, Field Service, Data Cloud and Loyalty Management licenses/features enabled |
| 2 | Set the login user’s email to yours; make sure to confirm the email change |
| 3 | Update your password in the demo org environment |
| 4 | Make note of your Username and Password as you’ll need it later |
| Step | Details |
|---|---|
| 1 | Open VS Code |
| 2 | Select 'Clone Git Repository |
| 3 | Enter this Git Code Repo URL in the pallet (https://github.com/salesforce-misc/Data360AgentforceSolutionKitRetail) |
| 4 | Select your local folder (see the pre-deployment instructions section) to download the repository to |
| 5 | Once downloaded, select “Yes, I trust the authors” if prompted |
| 6 | When prompted, select “yes” to open the cloned project folder in VS Code |
| Step | Details |
|---|---|
| 1 | Open Claude chat session within VS code as shown below |
| 2 | Claude requires some information to get started. The instructions (prompt), an alias (can be anything), your new Demo Org username and password. |
| 3 | Start with the prompt "Install Data 360 Retail Installer into Alias: ALIASNAME Username: USERNAME Password: PASSWORD" Replace the alias(can be anything), username and password with your own credentials (from when you created your org) and then hit enter to being the installation. Here is an example prompt:Install Data 360 Retail Installer into Alias: Data360RetailSolution Username: XXX.com Password: XXXXX |
You’ll then receive the following prompt:
The installer needs confirmation on which mode to run. Based on your request for the complete Data360 Retail Installer, you'll want Mode 2 which includes all 21 steps - the full Data Cloud + Commerce + Experience Cloud solution. Should I proceed with Mode 2 (the complete installation with all 21 steps)?
Choose your adventure! We recommend option 2
- Mode 1 = Data Cloud Only
- Mode 2 = Data Cloud + Commerce + Experience Cloud + Agentforce
- Playwright MCP launches a browser window
- Log in using the org username and password
- Click 'Allow Access'
Claude will begin installing everything from the code repo. Claude will orchestrate a series of sub-agents to do the work for you. We do suggest checking in on the installtion once in awhile, as there are times where Claude may require additional permissions from you, depending on your settings.
**It takes close to three + hours to complete so let claude do it’s work. ** Once installation is complete, navigate to Sales Cloud and search for Mark Smith, this is the featured unified profile. From Mark Smith’s profile, go to details and from there you can login to experience cloud to try the logged in user agent experience. All possible conversations are in the video as well as in the “behind the scenes” section in the Git repo.
There are 3 required steps, these steps allow you to set up Data 360, import data (both structured and unstructured), and setup the employee agent within your Salesforce instance. After completing the first three steps, the employee agent will be automatically set up within your org, if you want to install the service agent on your own website use Step 4, and if you want to install the agent on an Experience Cloud site follow step 5. If you are satisfied with the employee agent - that has the same functionality as the service agent, then Steps 4 & 5 are optional.
Once installation is complete, you can navigate to Sales Cloud or the DIY Store front app and search for "Mark Smith" to view all the data unified to enrich Mark Smith's profile. The list of possible agent interactions are under the behind the scenes section below.
To support the DIY app, you can either create a new Salesforce Org or use an existing one, provided it includes the following features and licenses:
| Requirement | Details |
|---|---|
| Licenses Required | - Data Cloud - Sales Cloud - Service Cloud -Loyalty Cloud -Experience- -Commerce Cloud |
| Features Required | - Service Agent - Einstein Agent - Copilot - Prompt Builder - Agentforce Data Library - Agentforce Studio - Process Content - Intelligent Context |
[!IMPORTANT] It is recommended to start with a brand-new environment to avoid conflicts with any previous work you may have done. A developer org can also be used.
- Install VSCode Download
- Install the Salesforce CLI or Verify that your installed CLI version is greater than
2.56.7by runningsf -vin a terminal. - Open VS Code > Go To> Extensions->Search for Salesforce Extension Pack>Click Install
- Install Git(Ignore if already installed) Git
- Open VS Code > Go To Extensions->Search for Git Extension Pack>Click Install
-
Clone this repository:
git clone https://github.com/salesforce-misc/Data360RetailSolutionKit.git
-
Authorize your org with the Salesforce CLI.
- Ctrl+Shift+P Select SFDX:Authorize an Org -> Select Project Default -> Enter the Org alias -> Authorize the Org.
-
Deploy the base app metadata.
sf project deploy start -d diy-base
-
Assign Base Permission Set to Default User.
sf org assign permset -n DIYRetailBasePS
-
Activate Standard PriceBook.
sf apex run -f scripts/apex/activatePricebook.apex
-
Replace the Standard Price Book variable in the JSON file with the actual Standard PricebookId by following the steps below in order. *Choose PowerShell in VS code Terminal
$pbQuery = sf data query -q "SELECT Id FROM Pricebook2 WHERE IsStandard = true AND IsActive = true LIMIT 1" --json | ConvertFrom-Json
$STD_PB_ID = $pbQuery.result.records[0].Id
Write-Output "Standard Price Book Id: $STD_PB_ID"(Get-Content data\pricebookentries.json) -replace "STANDARD_PRICEBOOK_ID", $STD_PB_ID | Set-Content data\pricebookentries.json
-
Import Sample data.
sf data tree import -p data/plan.json
-
Adjust Order Effective Date.
sf apex run -f scripts/apex/updateEffectiveDatesonOrder.apex
-
Activate Orders Data Using Anonymous Apex.
sf apex run -f scripts/apex/activateOrderStatus.apex
| Step | Action and Details | Image |
|---|---|---|
| Navigate to Documents folder in GitHub Repository | - Open a web browser and go to GitHub. - Once inside the repository, you will see the DIY Documents at the root level. - Click on a folder name to open it and view its contents. - Click on Customer Affinities to open the file - Click on Download to save in your system Note: Follow the above procedure to download the following documents: POS, Website, Customer Engagements, Bathroom_Remodelling_Instructions, Building Deck, and DIY Seasonal.Ensure that all files are securely saved to your local system, as they will be required for subsequent processing and configuration steps. |
This section outlines the high-level steps required to install and configure the Agentforce Service Agent. It covers agent setup, user and permission configuration, retriever assignment for supported use cases, record page activation, and basic testing to ensure the agent is ready for use.
This section guides you through the steps required to configure Commerce Cloud and Experience Cloud for the DIY Storefront. This step is required if you want to deploy the Agentforce Service Agent on the Experience Cloud site. It covers storefront setup, site configuration, user access, content management, search indexing, and branding updates to prepare the website for deployment and customer interactions.
| Step | Action and Details | Images |
|---|---|---|
| Enable Commerce Cloud | - From Setup, enter Commerce in the Quick Find box. - Select Settings under Commerce. - Turn on Enable Commerce. |
![]() |
| Create a Basic Experience Builder Site | - From Setup, enter Digital Experiences in the Quick Find box. - Select All Sites under Digital Experiences. - Click New to open the Creation wizard with template options. - Select the Commerce Store (LWR) template. - Click Get Started. - Provide Store Name as ‘DIYStorefront’ and ensure the URL ends with /DIYStorefront - Click Create. Your site will be created in Preview status. |
![]() ![]() |
| Activate Site | - From Setup, enter Digital Experiences and select All Sites under Digital Experiences. - Click Workspaces next to DIYStorefront. - Select Administration. - In Settings, click Activate and confirm by clicking OK. - Your site will now be live and fully set up. |
![]() |
| Register Site Setting | - Go to Domains from Setup under User Interface and copy the Experience Cloud Sites Domain. - Open the ESW Web Deployment site. - Under Trusted Domains for Inline Frames, click New. - Paste the copied domain URL and Click Save. |
![]() |
| Digital Experience | - From Setup, search for Digital Experiences and select Settings. - Enable Allow using standard external profiles for self-registration, user creation, and login. - Click OK in the dialog box. |
![]() |
| Experience Cloud Automated Setup | - Deploy Experience Cloud packagesf project deploy start -d diy-pd-experience-optional- Create Experience Site User sf apex run -f scripts/apex/createSiteUser.apex |
|
| CORS Configuration | - From Setup, search for CORS and click New. - Add https://*.my.salesforce-scrt.com and Save. - From Setup, search for and select Domains under User Interface. - Copy the My Domain URL and the Experience Cloud Sites Domain. - Add both URLs separately in CORS and Click Save. -Click New and Add https://d2rn326tyl2v2c.cloudfront.net. -Click Save |
![]() ![]() |
| Trusted URL | - Go to Domains under User Interface and copy the Experience Cloud Sites Domain. - From Setup, search for Trusted URLs and click New Trusted URL. - Enter the Name as DIYStore and paste the copied domain URL, ensuring it starts with https://. - Make Sure to select all the CSP directives. -Click Save. -Click New Trusted Domain and Enter the Name as CloudFrontImages and the URL as https://d2rn326tyl2v2c.cloudfront.net. -Make sure select all the CSP directives and click save |
![]() |
| Step | Action and Details | Images |
|---|---|---|
| Enable Search Index | - Click on App Launcher, Search and Select Commerce application. - Scroll down to Setting and expand it - Click on Search - Use the toggle to turn on Automatic Updates. |
![]() |
| Enable Guest access | - Click on the App Launcher, search for and select the Commerce application and select DiyStoreFront. - On the left-hand side, click Stores under Settings. - Go to Buyer Access Tab. - Navigate to the Buyer Access tab. - Scroll down to the Guest Access section. - Click on Enable button and click on Continue. |
![]() |
| Assign Guest User to Buyer Group | - In the DiyStoreFront store, On the left-hand side, click Stores under Settings. - Click on Buyer Access Tab - Click on DIYStorefront Guest Buyer Profile under Guest Access . - Click on Related ->Click on Buyer Groups , Click on Assign Button -Select the checkbox for DIYStorefront Buyer Group and click on Assign Button |
![]() |
| Assign Customer User to Buyer Group | - Go to the App Launcher, search for Accounts, and open it. - Open the Mark Smith account and click Enable as Buyer. - In DIYStoreFront, navigate to Settings > Buyer Access. - Open the DIYStorefront Buyer Group. - Under Buyer Group Members, click Assign, search for Mark Smith, and Click Save. |
![]() ![]() ![]() |
| Execute Commerce Script | - Create Commerce Data:sf apex run -f scripts/apex/createCommerceData.apex - Create Store Pricebook: sf apex run -f scripts/apex/storePricebookCreation.apex |
|
| Create CMS Workspace | - Click on the App Launcher >> Select the Commerce application >> Click on Stores. - Open DIYStorefront Store - Scroll down to Content Manager - Click on Add workspace - Enter details such as Name "DIYStoreFront CMS". - click on Next - Add DIYStoreFrontChannel & DIYStoreFront. - Click Next - Keep language as it is and click on Finish |
![]() ![]() |
| Adding Images into CMS | - Download Images from CMS Images - Click on the App Launcher >> Select the Commerce application >> Select DIYStorefront Store - Scroll down to Content Manager - Open DIYStoreFront CMS - click on Add >>Select Content >>Select Image and click on Create button. - Click Upload and select the downloaded images from local and click Done. - Copy the Title and paste the value in API Name field. - Click Save >>Click Publish and click on Next and Click on Publish Now. - Follow the above steps for the remaining images |
![]() |
| Link Image to a Product | - Click the App Launcher. - Select the Commerce application. - Open Stores and select DIYStorefront. - Navigate to Merchandise > Products and open the required product. - Scroll down to the Media section. - Click Add and select Add Image from Library. - Choose the appropriate image and Click Save. |
![]() ![]() |
| Publish Website Design | - Click on the App Launcher. - Select the Commerce application. - Go to Stores and select DIYStoreFront. - Scroll down to Website Design. - From the dropdown, select Product, Category, then Click Publish (this step may not be required if you are using the Commerce Console). - Go back to the DIYStoreFront store. - Click Home, then click Preview to verify that the products are displayed on the site. |
![]() ![]() |
| Update Search Index | - From Commerce App Go to Setting >> Search. - Under Search Index Tab >> Click on Update Button on the top Right corner. - Select Full Update. - Wait until the update completes to see the product in ExperienceSite. |
![]() ![]() |
This section guides you through the steps required to deploy the Agentforce Service Agent on an external website. Upon completion, users will be able to interact with the agent directly from the external site.
| Step | Action and Details | Image |
|---|---|---|
| Configure CORS Settings | - From Setup, search for CORS and , click New. - Enter the external website URL. Do not include a trailing “/”. - Click New and Add. https://*.my.salesforce-scrt.com - Click New and Add https://d2rn326tyl2v2c.cloudfront.net. |
![]() |
| Step | Action and Details | Image |
|---|---|---|
| Configure Trusted URL | - In Setup, search for Trusted URLs and select it, then click New Trusted Domain. -Enter the API Name and URL — use the same external site URL provided earlier. - Select frame-src (iframe content). - Click Save. - Click New Trusted Domain. -Enter the Name as CloudFrontImages and the URL as https://d2rn326tyl2v2c.cloudfront.net. - Select the required CSP Directives as shown in the screenshot, then Click Save. |
![]() |
| Step | Action and Details | Image |
|---|---|---|
| Script for Executing Agent in External Site | - From Setup, search for Embedded Service Deployments. - Select ESA Web Deployment, scroll down, and click Install Code Snippet. - Copy the code snippet. |
That’s it! You’re all set. The Agentforce widget should now be visible on your external website.
Behind the Scenes - how is the agent powered?
Curious to see the all possible utterances and how they are powered by the Agent. Here is a list of all the possible conversations, the corresponding topics, and the components that power them.
| Sl. No. | Utterance | Behind the Scene | Topic | Components |
|---|---|---|---|---|
| 1. | What is on sale right now? | Based on the structured data ingested into Data Cloud, we are fetching the promotional products and displaying them. | DIY Store Assistant | a) Apex ItemsOnSale |
| 2. | Do I need anything for seasonal prep? | An initial prompt evaluates the current weather data. Based on the evaluated conditions, a subsequent prompt dynamically fetches weather-specific product | DIY Store Assistant | a) Flow Seasonal Product Recommender b) Prompt Season Predictor Fetch Seasonal Products |
| 3. | How do I protect my plants over the winter? | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | plant Seasonal Recomendation | a) Prompt Action seasonalPlantRecomendation |
| 4. | What is the process to build a deck? | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | DIY Projects | a) Prompt Action Building Deck Prompt b)Retriever Building_a_Deck Retriever |
| Sl. No. | Utterance | Behind the Scene | Topic | Components |
|---|---|---|---|---|
| 1. | I’m stopping by the store later — anything I should pick up? | Use LLM to analyze customer past purchase history about power tools and but does not have any storage products, and recommend suitable storage options used an prompt | Customer Purchase Order | a) Prompt Action combineRecomendationMethod b) Apex Class GenericProductService GenericProductInvocable |
| 2. | That storage cabinet looks huge. Not sure how I’d get it home | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | Customer Purchase Order | a) Prompt Action storageCabinetDetails b)Retriever DIY_Bathroom Retriever |
| 3. | Do I need anything for seasonal prep? | An initial prompt evaluates the current weather data. Based on the evaluated conditions, a subsequent prompt dynamically fetches weather-specific product | DIY Store Assistant | a) Flow Seasonal Product Recommender b) Prompt Season Predictor Fetch Seasonal Products |
| 4. | What are the current sales that would interest me? | The system leverages structured data ingested into Data Cloud to analyze the customer’s historical purchase records. Any products that overlap with active promotions are filtered out, and only the remaining eligible promotional products are displayed. | DIY Store Assistant | a) Apex Generic Product Engine |
| 5. | My furnace has been acting up | The system uses structured Data Cloud data to verify installation and maintenance records. It evaluates whether the product has exceeded its warranty period and provides the corresponding warranty status (in-warranty or out-of-warranty). If requested, it also suggests an appropriate basic maintenance plan. | DIY Store Assistance | a) Apex HVACWarrantyService |
| 6. | I’m remodeling my bathroom — what do I need? | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | DIY Projects | a) Prompt Action Bathroom Remodeling Prompt b)Retriever DIY_Bathroom Retriever |
| 7. | What is the process to build a deck? | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | DIY Projects | a) Prompt Action Building Deck Prompt b)Retriever Building_a_Deck Retriever |
| 8. | I bought composite decking — is my blade okay? | Use LLM to analyze customer past purchase history about blade product and provide information as blade product description and features | Blade Product | a) Prompt Action BladeProductRecomendation b) Flow Fetch Seasonal Products |
| 9. | I’m thinking about upgrading my tools. | Use LLM to analyze customer past purchase history about battery product and recommends environmentally friendly alternatives. | Customer Purchase Products | a) Prompt Action BatteryProductRecomendation b) Apex Class GenericProductService GenericProductInvocabler |
| 10. | Anything interesting on sale right now? | Structured data stored in Data Cloud is used to analyze the customer’s past purchase history and derive product categories. Based on the identified categories, relevant products are recommended. | DIY Store Assistant | a) Apex CurrentSalesRecommendation |
| Sl. No. | Utterance | Behind the Scene | Topic | Components |
|---|---|---|---|---|
| 1. | I’m stopping by the store later — anything I should pick up? | Customer purchase history is retrieved from structured Data Cloud datasets and analyzed to identify previously purchased product categories, such as power tools | DIY Store Assistant | a) Flow StorageProductEnquiry b) Apex storageProducts storageProductInvocable c) LightningType storageProducts |
| 2. | That storage cabinet looks huge. Not sure how I’d get it home | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | Customer Purchase Products | a) Prompt Action storageCabinetDetails b) Retriever DIY_Bathroom Retriever |
| 3. | Do I need anything for seasonal prep? | An initial prompt evaluates the current weather data. Based on the evaluated conditions, a subsequent prompt dynamically fetches weather-specific product | DIY Store Assistant | a) Flow Seasonal Product Recommender b) Prompt Season Predictor Fetch Seasonal Products c) Apex seasonalProducts d) LightningType seasonalProducts |
| 4. | What are the current sales that would interest me? | The system leverages structured data ingested into Data Cloud to analyze the customer’s historical purchase records. Any products that overlap with active promotions are filtered out, and only the remaining eligible promotional products are displayed. | DIY Store Assistant | a) Flow PromotionEligibility b) Apex Get Promotion Details promotion c) LightningType promotion |
| 5. | My furnace has been acting up | The system uses structured Data Cloud data to verify installation and maintenance records. It evaluates whether the product has exceeded its warranty period and provides the corresponding warranty status (in-warranty or out-of-warranty). If requested, it also suggests an appropriate basic maintenance plan. | DIY Store Assistance | a) Apex HVACWarrantyService |
| 6. | I’m remodeling my bathroom — what do I need? | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | DIY Projects | a) Prompt Action Bathroom Remodeling Prompt b) Retriever DIY_Bathroom Retriever |
| 7. | What is the process to build a deck? | Reads unstructured data from a PDF that has been ingested into Data Cloud, where it is chunked, vectorized, and indexed for easy retrieval. | DIY Projects | a) Prompt Action Building Deck Prompt b)Retriever Building_a_Deck Retriever |
| 8. | I bought composite decking — is my blade okay? | Uses LLM to analyze customer past purchase history about blade product and provide information as blade product description and features | Blade Product | a) Prompt Action BladeProductRecomendation |
| 9. | I’m thinking about upgrading my tools. | Customer past purchase history is retrieved from structured Data Cloud datasets to identify battery-related products. Based on predefined product attributes and sustainability classifications, environmentally friendly alternatives are recommended accordingly. | Customer Purchase Products | a) Flow UpgradingToolsSuggestion b) Apex storageProducts batteryProductRecomendationCls c) LightningType storageProducts |
| 10. | Anything interesting on sale right now? | Structured data stored in Data Cloud is used to analyze the customer’s past purchase history and derive product categories. Based on the identified categories, relevant products are recommended. | DIY Store Assistant | a) Flow SalesRecommendation b) Apex Current Sales Recommendations seasonalProducts c) LightningType seasonalProducts |
































































.png)



























.png)
