Skip to content

salesforce-misc/DataCloudAndAgentForceForRetail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Outfitters

Welcome to Outfitters, a sample retail application. Outfitters is a fictional resort that uses Agentforce, the power of Data Cloud, and the Salesforce Platform to deliver highly personalized guest experiences. Explore ways to bring agents into business workflows, including new smart automation capabilities, Search Property, content generation.

Did you watch the demo? The following are a set of instructions to setup the end to end demo in your own environment. While the end to end demo supports multiple clouds, you have full flexibility to use only the portions relevant to what you want to try out in your own org, additionally once the packages are installed you have the ability to fully customize it based on your needs.

The Outfitters app showcases how with Data Cloud we have a true Customer 360 that then drives the right and best experience with Agentforce Agents.

1. Pre-Deployment Instructions

4 step process

1. Salesforce Org Setup Requirements for Retail App

Option 1: To support the Retail 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
- Experience
- Commerce Cloud
- Personalization
- Marketing Cloud
- MuleSoft (Optional)
Features Required - Service Agent
- Einstein Agent
- Copilot
- Prompt Builder
- Agent Force
- Real-time(Additional SKU)
- Code Builder (Optional)

Our package is designed to support all these clouds, but you have full flexibility to use only the portions relevant to your business. If you are not using a particular cloud (e.g., Loyalty Cloud), you can simply skip its configuration—the package will still install successfully, but that feature will not be available until you configure it yourself. Additionally, you can customize and enhance the existing package by adding your own features as needed.

⚠️ Important Note: Existing Trailheads playgrounds cannot be used

Option 2: To ensure a seamless integration and unlock a 360-degree view of customer interactions, we recommend enabling Salesforce Foundations in your org. This free enhancement integrates Sales, Service, Marketing, Commerce, and Data Cloud functionalities, improving efficiency and AI-readiness.

How to Enable Salesforce Foundations:

  • Log in to your Salesforce instance.
  • Navigate to Setup → Search for Salesforce Foundations.
  • Click "Add to My Contract" (It's free).
  • Select the Foundations products and proceed with checkout.
  • Return to Setup and follow the on-screen instructions to complete the configuration.
    🔗 More details: Salesforce Foundations

External Connections: The app showcases the use of structured and unstructured data ingested from AWS and the use of zero-copy with Snowflake. This section talks about the connectivtity you would need for those use cases.

Connection Details
Amazon S3 $${\color{blue} Optional}$$
Used to bring in structured and unstructured data. Unstructured data powers Agent conversations in this setup.
NOTE: If you do not have an existing Amazon S3 instance, register for the free tier and follow this guide to create a dedicated user with required permissions.

Already have an S3 instance? No need to sign up again.

Before proceeding, note your programmatic credentials (Access Key ID and Secret Access Key).
Snowflake $${\color{blue}Optional}$$
Used to showcase Data Cloud’s Zero Copy capabilities.
NOTE: If you do not have access to a Snowflake instance, follow this article to create a Warehouse, Integration User, and configure and note public/private keys that you will use with Salesforce Data Cloud.

2. Enable Features on the Org (20 minutes)

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’.
image
Enable Promotion Attribute -Go to Setup
-Search Global Promotion Management Setting
-Enable the "Global Promotions Management"
-Enable the "Product Catalog Management"
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 ‘D2C Commerce (LWR)’ template.
- Click Get Started.
image
Site Name and URL - After selecting the template, enter a site name and URL.
- Name the site ‘Outfitters’ and ensure the URL ends with /Outfitters
- Click Create. Your site will be created in Preview status.
image
Activate Site - From Setup, enter ‘Digital Experiences’ and select ‘All Sites’ under ‘Digital Experiences’.
- Click Workspaces next to Sunshine Resorts.
- Select Administration, then Emails.
- Under ‘Email Tabs,’ uncheck ‘Send welcome email’ and click Save.
- In Settings, click Activate and confirm by clicking OK.
- Your site will now be live and fully set up.
imageimage

3. Install Pre-Deployment Package (10 minutes)

Step Action and Details Images
Install package - Click on this Package Installation Link 
- Sign-in to the Org with your credentials.
- Choose Install for Admins Only option
- Choose “Rename conflicting components in package” and click the Install button.
- Wait until installation is completed, you will receive a confirmation on logged in user’s email
image image
Verify Package installation - Click Setup
- Search for package
- Click on 'Installed PAckage'
- Search for 'RetailConfigPackage' is installed
image
Step Action and Details Images
Setup Data Cloud - Enter “Data Cloud” in Quick Find box.
- Click on “Data Cloud Setup Home”.
- Click on “Get Started” if the Data Cloud instance is not set up.
- If already Data Cloud setup is done then you will not see Get Started option.
- Once the process is complete, the Data cloud instance is ready to use.
Verify Experience Delivery is Disabled - Go to Setup → Digital Experiences → All Sites.
- Click Workspaces for ‘Outfitters’.
- Click Administration.
- Click on Settings.
- Experience Delivery should be disabled. If it’s enabled, please raise a Salesforce Case with the Support team to disable this feature.
Enable Data Cloud on Experience Site - Go to Setup → Digital Experiences → All Sites.
- Click Builder for ‘Outfitters’.
- Click Settings → Integrations.
- Click Add to Site for Data Cloud.
- Enable “Share site data with Data Cloud” and click Save.
- Once enabled, a green box will appear
- Click Publish in the top-right corner
image
Verify Data Stream - Go to App Launcher → Data Cloud → Data Stream.
- Change List View to All Data Streams.
- Search for Experience_Cloud.
- 6 total Data Streams should appear
image
Create a Record on Custom Metadata - Go to Setup -> Search for Metadata type -> Click on ‘Install Package Settings Enabled’ -> Click on Manage Install Package Settings Enabled ->Click on ‘New’ -> Give Label as Package Settings Enabled and Check Checkbox of Installation Settings Enabled Field. Click Save image
Enable Personalization Setup Home - Go to Personalization Setup
- In Quick find search Data Cloud Setup Home
- From the Setup Home, In the Personalization Setup Status click on ‘Start Setup’ button
- In the Deploy Foundation Data, under the dataspace select as default and Click on Deploy
image

4. Setup the Salesforce Org (20 minutes)

Step Action and Details Images
Assign Data Cloud Permissions to Objects & Custom Fields - Click on App Launcher, search for Retail and click on Retail Setup App
- Click on “Assign Permissions for Objects” button (highlighted in the screenshot below) and wait for a confirmation message before proceeding further
image
Modify the Data Cloud Admin Permission Set - Open the Setup Menu and click Setup
- In the Quick Find, search for ‘Permission Sets’ and click ‘Permission Sets’
- Click the ‘Data Cloud Admin’ permission set
- In the Apps section, click ‘Data Cloud Data Space Management’
- In the Data Spaces panel, click Edit.
- Check the ‘Enabled’ checkbox for the default data space and click Save
- Click OK in the confirmation dialog
image
Install Standard Data Bundles Click on Data Cloud Setup
- Click on ‘Salesforce CRM’
- Under ‘Standard CRM Data Bundles’
- Click on ‘Arrow’ icon and click on ‘install’ of ‘Sales Cloud’
- it will open on new page -> click on Install
imageimage
Turn On Einstein Setup - Navigate to Setup
- Search and Select ‘Einstein Setup’
- Turn on Einstein Setup
image
Turn On Agentforce - Navigate to Setup
- Search and Select ‘Agent’
- Turn on Agentforce
Commerce Categories Setup -Go to app launcher and search Commerce.
-Toggle the Merchandising And click on Categories.

Note: - If Categories Footwear and Gear are already present, then skip it below steps.
-Note: - If Categories Footwear and Gear are already present, then skip it below steps.
Give the Name “Footwear” And Select Checkbox for “Show In Menu”, For Sort Order enter 1, For Code CAT_FOOTWEAR.
Repeat the above steps for “Gear”. And In sort order enter 2.
If Propensity To Churn (Propensity_To_Churn__c) field is not visible -Go to Setup>> Object Manager>> Search for Contact and Click on it.
-Click on Field and Relationship>>Search for Propensity To Churn and click on it
-Click on Set Field-Level Security>> check the Visible checkbox and click on Save button.

2. Salesforce Package Installation

1 step process

1. Install Outfitters Base Package (10 minutes)

Step Action and Details Images
Install Outfitters Base Package - Click on this Package Installation Link 
- Sign-in to the Org with your credentials.
- Choose Install for Admins Only option
- Choose “Rename conflicting components in package” and click the Install button.
- Click Done when installation is complete.
image
Verify Package installation - Click Setup
- Search for ‘Installed Package’
- Search for ‘RetailDataKitPackage’ is installed
image

3. Data Cloud Configuration

8 step process

1. Setup Data Streams

The Data Kit is installed as a part of the Package installation. Follow the steps below to create data streams.

Setup Salesforce Data Streams (15 minutes)

Step Action and Details Images
Verify Salesforce CRM is Active or Not In Data Cloud, select the Setup icon and then Data Cloud Setup.
- Select Salesforce CRM.
- If connection status is “Inactive”
- then click on drop down to “Active”
- Click on “Active”
image
Create Data Streams from Data Bundle - Logged into the environment where you installed the data kit
- Go to Data Cloud app and the Data Streams tab.
- Click New to create a Data Stream
- Select Salesforce CRM and click Next.
- Under Custom Data Bundles, select the Salesforce_CRM_Bundle.
- Select your Salesforce Org.
- Click Next.
- Select the data space as ‘Default’, review the fields in your data stream, and click Next.
- Review details and click “Deploy.
image
Create Website_Mobile_apps Data Stream from Data Kit - Click on Data Stream
- Click on New
- Select ‘Installed Data Kits Package’
- Select ‘RetailDataKitPackage ’ Data Kits
- Select checkbox under ‘Websites_Mobile_Apps’ click on ‘Next’
-Select Connector type ="website" & connector name "Experience_Cloud_Event_Connector".
- Click Next.
- Click on Deploy
image imageimageimage

1a. Create Data Steam for Amazon S3 (10 minutes) $${\color{blue} S3 \space Optional: \space Please \space note \space that \space some \space functionality \space in \space Experience \space Cloud \space and \space in \space the \space C360 \space will \space no\space longer \space function\space as \space expected \space if \space not \space installed. }$$

Step Action and Details Images
Upload Unstructured data to the S3 Bucket Before you continue, upload the below test files to your AWS instance, create a bucket called "hosporgfarm" or the bucket you wish to use for this demo

AWS UnStructured Data
Create a Connection to Amazon S3 in Salesforce Navigate to Data Cloud Setup
In the menu, under EXTERNAL INTEGRATIONS, click on Other Connections
- Click New, choose Data Kits as the source and click Next. Select RetailDataKitPackage
-Select hosporgfarm
-Change the name & API name of the connection "hosporgfarm".
-Put the bucket name “hosporgfarm” please feel free to change the bucket name based on your existing AWS bucket
-Fill the credentials and save.

1b. Create Data Stream for Snowflake (5 minutes) $${\color{blue} Snowflake \space Optional: \space Please \space note \space that \space some \space functionality \space in \space the \space C360 \space will \space no\space longer \space function\space as \space expected \space if \space not \space installed. }$$

Step Action and Details Images
Create a connection to snowflake in Salesforce Navigate to Data Cloud Setup
-In the menu, search SnowFlake,
- Click New, choose Data Kits as the source and click Next. Select RetailDataKitPackage
-Select SnowflakeDataFederation.
-Please feel free to change the connection name based on your existing snowflake connection
-Don’t change the API name
Fill the Account URL, Username, and Private Key and click next and save.
A Create Data Stream for Snowflake from data kit - While logged into the environment where you installed the data kit
- Go to Data Cloud app and the Data Streams tab.
- Click New to create a Data Stream
- Under "Other Sources", select "Installed Data Kits & Packages" and click Next
- Select "RetailDataKitPackage" Data Kit
- Select Snowflake_01 Bundle and click Next.
- Under Data Streams choose "Sales_Order","Sales_Order_Item","Return_Order" and "Return_Order_Item" and click Next.
- Review the Data Stream fields and click Next
- Click Deploy to create the Data Streams
imageimage

1c. Create Return_Policy_FAQs DLO Creation for Unstructured Data(10 minutes)

Complete this step only if you have setup a connection and the file notification process in AWS

Step Action and Details Images
Create Return_Policy_FAQs DLO Creation - Click on Data Lake Object Click on New
- Click on Create from Data Kits, Click on Next
- Select Return_Policy_FAQs, select “hosporgfarm’ connection. Click on Next
- Click on Deploy.

1e. Create Party Identification Collection Data Lake (5 minutes)(CHECK)

Step Action and Details Images
Create Party Identification Collection DLO Creation - Click on Data Lake Objects Tab
- Click on New
- Click on “Create from Data Kits”, Click on Next and select “RetailDataKitPackage” package
- Select Party Identification Collection.
- Click on Next
- Click on Save.

2. Create Data Transforms from Data Kit (5 minutes)

Proceed with this step only if you have setup a connection to snowflake

Step Action and Details Images
Create Order Data Transform $${\color{blue} Snowflake \space Optional}$$ -Click on Data Transforms Tab
- Click on New
- Click on Create from Data Kits, Click on Next
- Select Extract Party Identifiers from Orders
- Click on Next . Click on Save, Copy the Name , Remove the Name then Paste the same Name Again
- Click on Save
imageimageimageimage

3. Cross Verify CRM Data (5 minutes)

Proceed with this step only if you have the Real-Time SKU enabled in your org

Step Action and Details Images
NOTE - Before proceeding further, please ensure that the CRM data is available in the DMO. You can verify this by following these steps:
- Navigate to Data Explore
- Set Data Space to Default.
- Select the Data Model Object (DMO).
- From the dropdown, choose Account Contact.
- You should see Salesforce_Home listed under the Data Source column.
If you don't see the data then wait until the data is refreshed before proceeding to the next step.
image

4. Create Identity Resolution Ruleset from Data Kit (5 minutes)

Step Action and Details Images
Create Identity Resolutions -Go to Data Cloud app
- Click on the Identity Resolutions tab
- Click New
- Select Installed from Data Kit- Choose RetailDatalkitpackage
- Click on Next
- Choose ‘Customer Profile’. Click on Next
- Click on Save.
Repeat the steps for the following metrics: ‘Party Identification Match’
imageimageimage

5. Create Calculated Insights (5 minutes)

Step Action and Details Images
Create Calculated Insights - Go to Data Cloud ap
- Click on Calculated Insights tab
- Click New
- Select "Create from a Data Kit" and click Next
- Select ‘Customer Lifespan’
- Click on Next
- Click on ‘Check Syntax’
- Click on ‘Activate’
- Click Activate
- Select Schedule as ‘Every 1 hour’ Select Start Date and Time As default.
- Click on ‘Enable’
- Repeat the steps for the following metrics: ‘Average Purchase Value’, ‘Average Purchase Frequency’, ‘Customer Lifetime Value, ‘Product Cobrowse Ranked’, ‘Product Cobuy’,‘Engagement Score ’
imageimage

6. Create Data Graph (5 minutes)

Step Action and Details Images
Create Data Graph - Click on Data Graph Tab
- Click on New
- Select Create from Data Kits
- Select RetailDataKitPackage DK
- Select Web Engagement RT Profile.
- Select primary Data model object as “Unified Individual real”.
- Click on Individual and go to the right side where the error is showing and uncheck the check box.
- Now click on Save & Build.
-Repeat the above steps to select Item Non-Real Data Graph
-Now CLick on Save & Build
imageimageimageimageimageimageimage

7. Create Data Cloud Copy Field Enrichment (15 minutes)

Step Action and Details Images
Create Data Cloud Field Enrichment of ‘Average Purchase Value’ - Go to Object Manager
- Search for Contact.
- Click on Contact
- Click on Data cloud Copy Field.
-Click on New.
- Select data space as ‘default’ > Select Data Cloud Object as ‘Average_Purchase_Value__cio’
- Click on ‘Next
- Select Field APV
- Click on Next
- Give Label as ‘Average Purchase Value default’
- Click on Finish
- On Contact Select AveragePurchaseValue__c
- Save and Start Sync.
imageimage
Create Data Cloud Field Enrichment of ‘Customer Lifetime Value’ - Go to Object Manager
- Search for Contact.
- Click on Contact
- Click on Data cloud Copy Field.
-Click on New.
- Select data space as ‘default’ > Select Data Cloud Object as ‘Customer_Lifetime_Value__cio’
- Click on ‘Next
- Select Field CLV
- Click on Next
- Give Label as ‘Customer Lifetime Value default’
- Click on Finish
- On Contact Select LifetimeValue__c
- Save and Start Sync.
imageimage
Create Data Cloud Field Enrichment of ‘Engagement Score’ -> Go to Object Manager.
- Search for Contact.
- Click on Contact
- Click on Data cloud Copy Field.
- Click on New.
- Select data space as ‘default’
- Select Data Cloud Object as ‘Engagement_Score__cio’
- Click on Next
- Select Field As ‘Engagement_Score’
- Click on Next
- Give Label as ‘Engagement Score default’
- Click on Finish
- On Contact Select EngagementScore__c
- Save and Start Sync.
imageimage
Create Variation Attribute Set Go to App launcher>> Search for Commerce>> Open it
Select the "Outfitters" store
From the left navigation bar, choose "Settings", then "Product", and finally "Variation Attribute Set".
From the left navigation bar, choose "Settings", then "Product", and finally "Variation Attribute Set".
Repeat this process to create another Variation set attribute named "Tents and Sleeping bags" attribute set,but only add the "Size" attribute.

8a. Create Activation Targets

Step Action and Details Images
Create Data Cloud Activation Target Go to Data Cloud app
- Click on Activation Target
- Click on New
- Select ‘Data Cloud’ under targets.
- Click on Next.
-In Activation Target name provide ‘Data Cloud Target’
- Under dataspace, select as ‘default’
- Click on Save

8b. Create Segment from Data Kit

Step Action and Details Images
Create Segment Go to Data Cloud app
- Click on the Segment tab
- Click New
- Select "Installed from Data Kit”
- Choose "RetailDataKitPackage"
- Click on Next
- Select Segment as Individual and provide Segment name as Get Customers.
- Select Standard Publish
- Select Publish Schedule to 4 hrs and select the start and end date.
- Click on Save.
- Click on Publish now button.

8c. Create Activations

Step Action and Details Images
Create Activations By default, space is default
- Need to select the Get Customer segment and activation target as data cloud
- Click on continue
- Select Email.
-Click on Continue
- Click on add attributes
- And from individual select the following attributes
- Sold to Customer,Order Number, Product Id, Recall and Product Name
- Click on Save with name as Get Recalled Customers.

8d. Create Variation Attribute Set

Step Action and Details Images
Create Variation Attribute Set Go to App launcher>> Search for Commerce>> Open it
- Select the "Outfitters" store
- From the left navigation bar, choose "Settings", then "Product", and finally "Variation Attribute Set".
- Click on “New” and set the name “Shoe Variations” and add the attributes "star", "Durability", "Ventilation", and "Category" to the "Selected field" section.
- Repeat this process to create another Variation set attribute named "Tents and Sleeping bags" attribute set,but only add the "Size" attribute.

9. Create Search Fields

Step Action and Details Images
Create Search Fields Go to App launcher>> Search for Commerce>> Open it
- Select the "Outfitters" store
- From the left navigation bar, choose "Settings",then "Search", and finally "Search Fields".
- Click on Manage Searcheable Fields
- Add Variation Attribute Fields and Product - Standard Fields that are required.

4. Commerce Cloud Configuration

8 step process

1. Verify Organization Wide Address (5 minutes)

Step Action and Details Images
Verify Organization-Wide Address Exists or not - Go to Setup -> Search for Organization-Wide Address -> Click on Organization-Wide Addresses
- Verify if there is an organization-wide address with the name ‘Default Email’ created and verified.
- If there is none, then please create an organization-wide address by following below steps
- Click on Add button -> On the Display Name Add ‘Default Email’. On the Email Address <Add your email address> Select ‘Default No-Reply Address’ on Purpose field -> click check box ‘allow all profiles to use this from address’
imageimage

2. Install Agent and Experience Site Package (1 hour 30 minutes)

Step Action and Details Images
Install Agent & Exp Site Package
- Install VSCode Download
- Setup CLI a. Install the Salesforce CLI https://developer.salesforce.com/tools/salesforcecli or check that your installed CLI version is greater than 2.56.7 by running sf -v in a terminal.
- If you need to update the Salesforce CLI, either run sf update or npm install --global @salesforce/cli depending on how you installed the CLI.
- Install Extension
- Open VSCode > Go To> Extensions->Salesforce Extension Pack>Install
- Open Terminal Clone git Repository by using below command
git clone https://git.soma.salesforce.com/gdevadoss/DataCloudRetailDemo.git
- Open the Project
- Authorize an Org
- Type Ctrl+Shift+P Select SFDX:Authorize an Org
- Select Project Default
- Enter the Org alias
- Authorize the Org
- Open terminal and run the command sf project deploy start --source-dir force-app

NOTE: $${\color{red}Skip \space below\space steps \space 4, \space 5, \space 6, \space and \space 7 \space if \space you \space wish \space to \space bring \space in \space your \space own \space Product \space data}$$
imageimageimageimageimageimageimage

NOTE: $${\color{red} Skip \space the \space below \space steps \space if \space you \space wish \space to \space bring \space in \space your \space own \space Product \space data}$$ $${\color{red} 3.\space Create Commerce Data}$$ $${\color{red} 4.\space Search Update}$$ $${\color{red} 5.\space Upload CMS Images into the Store and}$$ $${\color{red} 6.\space Add CMS Product Images}$$

3. Create Commerce Data (5 minutes)

Step Action and Details Images
Create Data - Click on App Launcher, search for Retail Setup and click on Retail Setup App
- Click on the “Create Commerce Data” button (highlighted in the screenshot to the right) and wait for a confirmation message before proceeding further.
image

4. Search Update (5 minutes)

Step Action and Details Images
Search Update Enable Commerce App
- Click Setup and search for Commerce
- Click Settings under Feature Settings --> Commerce
- Use the toggle to switch on the Enable the Refreshed Commerce App

Enable Search Index
- Click on App Launcher, search for Commerce and select Commerce application
- In the Store dropdown, choose Outfitters Store
- Scroll down to Setting and expand it
- Click on Search
- Use the toggle to turn on Automatic Updates
image image

5. Upload CMS Images into the Store (15 minutes)

Step Action and Details Images
Upload CMS Images into Store - Download Images from CMS Images
- Click on App Launcher>> Select commerce application>> Click on Store
- Open Outfitters Store
- Scroll down to Content Manager
- Click on Add workspace
- Enter details such as Name "Outfitters Managed Content Space" and select Enhanced CMS Workspace and click on Next
- Add Outfitters Channel as Public and Outfitters site and click Next
- Keep language as it is and click on Finish
- Click on Add and select Content >> select images>>Click on Create button>> click on upload button>>Select Image>>Image and Title populated>>Enter API name (can be the same as file name)>> Save it>> Click on Publish button>> Keep Details as is>> Click on Next>> Select Publish Now>>click on publish now button
- Please repeat the above steps for all the images
image image image image image image image image image image

6. Add CMS Product Images (15 minutes)

Step Action and Details Images
Add Image to a Product - Click on App Launcher>> Select commerce application>>Click on Store
- Open Outfitters Store
- Expand Merchandise>> Product>> open one by one product
- Click on eye icon (it removes Site window) after save button
- Confirm that "Products" is selected under categories
- Scroll down >> click on Go to global product record
- Go to Media>> Click on Add image for Product details Image section >> Select appropriate image from Commerce Store image>> click on Add button
- Click on Add image for Product list Image section >> Select appropriate image from Outfitters Managed Content Space>> click on Add button
- Repeat previous steps for each product
- Go to store>> select Outfitters >>Scroll down to Website Design>> select product category from dropdown >> click on Publish button (this step maybe not be needed if you are commerce console)
- Go back to Outfitters Store>>Click on Home>> click on preview the site and see product is getting displayed
imageimageimageimageimageimageimageimageimage

7. Enable Self Registration (5 minutes)

Step Action and Details Images
Enable Self Registration - Click on App Launcher>> Select commerce application>>Click on Store
- Open Outfitters Store
- Settings >> Store
- Click on Buyer Access Tab
- Scroll down to Self Registration (enable if it’s not enabled)
- Select Account RecordType to “Person Account”
- Select Default Buyers Group to “Outfitters Buyer Group"
- Click Save
image

8. Share CMS with Site workspace (5 minutes)

Step Action and Details Images
Share CMS with Site workspace - Click on App Launcher and search for CMS Workspaces
- Select CMS Workspaces
- Click on "Outfitters Managed Content Space" (the CMS created in previous step
- Click the gear icon (at the top right) and select "Workspace Sharing" from the dropdown
- Move "Content Workspace for Marketing Cloud" and "Outfitters Managed Content Space zSlkk6kP" to the right (under Shared) and click Next
- Click Save
Note : If the images was not displaying then Go to App launcher>> Search for Commerce>> Open it
- Select the "Outfitters" store
- From the left navigation bar, choose "Website Design".
- In the Home Dropdown, select 'Product' and publish
- Next select 'Category' and publish
- select 'Search' and publish. Then exit.
image image image

5. Connect and Create Sample Data

4 step process

1. Create Sample Data (5 minutes) $${\color{blue} Optional: \space These \space steps \space are \space optional \space if \space you \space choose \space to \space use \space your \space own \space data. }$$

Step Action and Details Images
Create Sample Data - Click on App Launcher, search for Retail Setup App and click on Retail Setup App
- Click on the “Create Test Data” button (highlighted in the screenshot below) and wait for a confirmation message before proceeding further.
image

2. Create Buyer Group & Assign Buyer Group for Self-Registration (10 minutes) $${\color{blue} Optional: \space These \space steps \space are \space optional \space if \space you \space choose \space to \space use \space your \space own \space data. }$$

Step Action and Details Images
Create Buyer Group & Assign Buyer Group for Self-Registration - Click on Setup
- Search for ‘Commerce’
- Select Customer from left-hand section and go to Buyer Group.
- Click on New Button.
- For Name use Outfitters Authenticated Users.
- For Role Select Account-based.
- Click on Assign in Pricebook section.
- Select Outfitters Pricebook.
- Click on Assign in ‘Commerce Entitlement Policies’ Section.
- Assign All Access for Outfitters
- Search for ‘Contacts’ and select ‘Duncan Macintosh’.
- Select ‘Details’ tab 
- In the highlights panel, you can see the ‘Enable as buyer’ button.
- Click on Enable as Buyer
- Search for ‘Commerce’ and Select store from the left-hand side section.
- Go to ‘Buyer Access’ Tab and now you can see the newly created Buyer Group named Outfitters Authenticated Users.
- Select Outfitters Authenticated Users you can see Buyer Group Member Section
- Click on Assign button in the Buyer Group Member section and Add the Contact that we selected Enable as a Buyer.
- Go back to the Buyer Access tab and check for the Self-Registration section to make sure that we have selected Default Buyer Group as the one we created.
imageimageimageimageimageimageimageimageimageimage

2a. Assign Buyer Group Member Related List to Buyer Group Layout(5 minutes)

Step Action and Details Images
Assign Buyer Group Member Related List to Buyer Group Layout - Click on Setup and go to Object Manager tab.
- n the Quick find search box type Buyer Group.
- Click on Buyer Group.
- From the left-hand section select Page Layout.
- Select Buyer Group Layout.
- From the left hand section go to Related Lists.
- Drag and Drop Buyer Group Members.
- Save the Page Layout.
- If you go back to Commerce store and followed by there to Customer section and then select Buyer Group.
- Select the ‘Outfitters Authenticated Users’.
-You can find the Buyer Group Members Related list on the Page.
image image image

3. Create Community User and Assign User to Buyer Group (5 minutes)

Step Action and Details Images
Create Community User and Assign Buyer Account to Buyer Group - Click on App Launcher, search for Retail Setup and click on Retail Setup App
- Click on the "Create Buyer Group Member Data" button (highlighted in the screenshot on the right) and wait for a confirmation message before proceeding further.
- Note: If the confirmation message does not appear after 5 minutes, refresh the page and if the "Create Buyer Group Member Data" button is disabled, proceed.
image

4. Setup Data in Snowflake (15 minutes) $${\color{blue} Snowflake \space Optional: \space Please \space note \space that \space some \space functionality \space in \space the \space C360 \space will \space no\space longer \space function\space as \space expected \space if \space not \space installed. }$$

Step Action and Details Images
Create Table to hold Sales_Order data - Login to the Snowflake Database/Schema that is connected to Data Cloud and run the below DDL script to create Sales_Order table.
create or replace TABLE <<database_name>>.<<schema_name>>.Sales_Order
( 
    ORDER_NUMBER VARCHAR(15), 
   CUSTOMER_NUMBER VARCHAR(15), 
   ORDER_DATE TIMESTAMP_NTZ(9), 
   STATUS VARCHAR(15) 
)
Step Action and Details Images
Load data into Sales_Order table - Load data in the below csv file into Sales_Order table: SALES_ORDER_DATA csv
Create Table to hold Sales_Order_Item data - Login to the Snowflake Database/Schema that is connected to Data Cloud and run the below DDL script to create Sales_Order_Item table.
create or replace TABLE <<database_name>>.<<schema_name>>.Sales_Order_Item_DATA
(
    ORDER_ITEM_NUMBER VARCHAR(30), 
   ORDER_NUMBER VARCHAR(15), 
   PRODUCT VARCHAR(30), 
   QUANTITY NUMBER(3,0), 
   UNIT_PRICE NUMBER(16,2), 
   SUBTOTAL NUMBER(16,2), 
   LINE_NUMBER VARCHAR(3) 
)
Step Action and Details Images
Load data into Sales_Order_Item_DATA table - Load data in the below csv file into Sales_Order_Item_DATA table: SALES_ORDER_ITEM_DATA.csv
Grant Access to the Tables in the Database/Schema - While still logged in to Snowflake, execute the following statement
create or replace TABLE <<database_name>>.<<schema_name>>.Return_Order_DATA
(
    ORDER_NUMBER VARCHAR(15), 
   CUSTOMER_NUMBER VARCHAR(15), 
   STORE_NAME VARCHAR(30), 
   ORDER_DATE TIMESTAMP_NTZ(9), 
   TYPE VARCHAR(15), 
   DELIVERY_METHOD VARCHAR(30), 
   STATUS VARCHAR(15), 
   TOTAL_AMOUNT NUMBER(16,2) 
)
Step Action and Details Images
Load data into Return_Order table - Load data in the below csv file into Return_Order_DATA table: RETURN_ORDER_DATA.csv
Grant Access to the Tables in the Database/Schema - While still logged in to Snowflake, execute the following statement
create or replace TABLE <<database_name>>.<<schema_name>>.RETURN_ORDER_ITEM
(
    ORDER_ITEM_NUMBER VARCHAR(30), 
   ORDER_NUMBER VARCHAR(15), 
   LINE_NUMBER VARCHAR(3), 
   PRODUCT VARCHAR(30), 
   QUANTITY NUMBER(3,0), 
   UNIT_PRICE NUMBER(16,2), 
   SUBTOTAL NUMBER(16,2), 
   RETURN_REASON VARCHAR(255)
)
Step Action and Details Images
Load data into RETURN_ORDER_ITEM table - Load data in the below csv file into RETURN_ORDER_ITEM table: RETURN_ORDER_ITEM_DATA.csv
Grant Access to the Tables in the Database/Schema - While still logged in to Snowflake, execute the following statement
grant select on tables in <<database_name>>.<<schema>> to role sysadmin

Note: Before Creating ML Model, Go to Data Cloud>> Data Stream>> Account_Home>>Click on Refresh Now button and Wait till it get into success status Also Go to Data Stream>>Contact_Home>> Click on Refresh Now Button and Wait till it get into success status Go to Data Explorer>>Under Object select Data Model Object >> Then Select Account Contact>>Verify your Data their You can modify columns as well by click on Edit Columns.

5.Create ML Model For Propensity to Purchase (5 minutes)

Step Action and Details Images
Create ML Model For Propensity to Purchase - Click on App launcher and search for Einstein Studio
- Click on Add Predictive Model button
- Select create a model from scratch
- Click on Next
-Select data space as Default and select Account Contact DMO for data option and click next
- For training select Filter Set of Records option
- Specify the condition to filter the records and select field as Days since the last order and select operator as Is Not Null.
- Click on Next.
- For Set goal option select field name as Ordered In Last 30 Days and Select Maximize option.
- Select TRUE and Click on Next.
-For Prepare Variable select disable Autopilot and select the follow fields like. Maximum order value, Total Amount Spent (LTV), Number of Unique Products Purchased, Average Quantity per Order, Days since the last order, Average order value, Most Frequently Purchased Product, Last Purchased Product Categories, Number of orders period, Average time between orders, Total amount spent period
- For select Algorithm option Enable Automatic Selection.
- Click Next.
- Review all the things and Click on Save and Train and specify ML Model name as Propensity To Purchase Prediction.
- Lets wait the model to train it successfully.
- Click on Activate button.
image image image image image image image image

5a. Add Propensity To Purchase Prediction ML Model into Flow (5 minutes)

Step Action and Details Images
Add Propensity To Purchase Prediction ML Model into Flow - Click on Setup >> Enter Flows in quick find box>> click on flows
- Search for Data Cloud - Propensity To Purchase Prediction and open the flow
-Below Data Cloud-Triggered Flow there is plus sign>> click on the plus sign.
- Select Action >>Enter propensity to purchase prediction and select the action " Propensity To Purchase Prediction".
- Enter label as Predict Propensity Purchase , and map the fields :
- click on Triggering ssot_AccountContact__dlm >>Select Average order value.
- click on Triggering ssot_AccountContact__dlm >>Select Average Quanitity per Order
- click on Triggering ssot_AccountContact__dlm >>Select Average time between orders.
- click on Triggering ssot_AccountContact__dlm >>Select Days since the last order.
- click on Triggering ssot_AccountContact__dlm >>Select Last Purchased Product Categories.
- click on Triggering ssot_AccountContact__dlm >>Select Most Frequenlty Purchased Product.
- click on Triggering ssot_AccountContact__dlm >>Select Number of orders period.
- click on Triggering ssot_AccountContact__dlm >>Select Total Amount Spent (LTV)
- click on Triggering ssot_AccountContact__dlm >>Select Total amount spent period.
- Then Go to Update record >> click on it >> for Propensity to purchase field select value as outputs from Predict Propensity Purchase >>Select Prediction.
- Click on Save As New Version button>> click on save.
- Click Activate button.
- Go to applauncher>> enter Contact >> click on it >> Open Mark Smith ,Karen Wells, Duncan Macnitosh, Nicole Grace and edit some value under Purchase ML Data section (eg: Total Amount Spent (LTV).
- Go to Data Cloud >>Data Stream>> Open Contact_Home>> click on Refresh Now button (Wait till Success status).
- Go to contacts >> See Propensity To Purchase value.
- Still its value not populating>> then again refresh the data stream.
image image image

5b. Create ML Model For Propensity to Churn into Flow (5 minutes)

Step Action and Details Images
Create ML Model For Propensity to Churn into Flow - Click on App launcher and search for Einstein Studio
- Click on Add Predictive Model button
- Select create a model from scratch
- Click on Next
- Select data space as Default and select Account Contact DMO for data option
- Click on Next .
- For training select Filter Set of Records option
- Specify the condition to filter the records and select field Churn Score as and select operator as Is Not Null.
- click on Next.
- For Set goal option select field name as ****Churn Score and Select Minimize option .
- click on Next.
- For Prepare Variable select disable Autopilot and select the follow fields like.
**Age, Net Promotor Score(NPS),Customer Lifetime Value(CLV), Customer Satisfaction Score(CSAT),Number of Product Return, Number of Complaint, Average Order, Gender, Location, Engagement Frequency, Payment Method, Income Level, Recency Of Purchase **
- click on Next
- For select Algorithm option Enable Automatic Selection .
- Click on Next .
- Review all the things and Click on Save and Train and specify ML Model name as Propensity To Churn Prediction and click on Save button .
- Click Activate button.
- Lets wait the model to train it successfully .
- Click on Activate button .
image image image image image image image image

5c. Add Propensity To Churn Prediction ML Model into Flow (5 minutes)

Step Action and Details Images
Add Propensity To Churn Prediction ML Model - Click on Setup >> Enter Flows in quick find box>> click on flows
- Search for Predict Propensity To Churn Score and open the flow.
- Below Data Cloud-Triggered Flow there is plus sign>> click on the plus sign
- Select Action >>Enter Propensity To Churn Prediction and select the action " Propensity To Churn Prediction".
- Enter label as " To Predict Propensity Purchase" , and map the fields : .
- Click on Triggering ssot_AccountContact__dlm >>Select Age
- click on Triggering ssot_AccountContact__dlm >>Select Average Order .
- click on Triggering ssot_AccountContact__dlm >>Select Customer Lifetime Value (CLV) .
- click on Triggering ssot_AccountContact__dlm >>Select Customer Satisfaction (CSAT)
- click on Triggering ssot_AccountContact__dlm >>Select Engagement Frequency .
- click on Triggering ssot_AccountContact__dlm >>Select Gender
- click on Triggering ssot_AccountContact__dlm >>Select Income Level
- click on Triggering ssot_AccountContact__dlm >>Select Net Promoter Score (NPS)
- click on Triggering ssot_AccountContact__dlm >>Select Number of Complaint.
- click on Triggering ssot_AccountContact__dlm >>Select Number of Product Return .
- click on Triggering ssot_AccountContact__dlm >>Select Payment Method .
- Then Go to Update Churn Field>> click on it >> for Propensity to Churn field select value as Outputs from Propensity To Churn Predict>>Select Prediction.
- Click on Save As New Version button>> click on save .
- Click Activate button.
- Go to app launcher>> enter Contact >> click on it >> Open Mark Smith ,Karen Wells, Duncan Macnitosh, Nicole Grace and edit some value under Churm ML Data section (eg: Engagement Frequency ,Customer Lifetime Value(CLV)).
- Go to Data Cloud >>Data Stream>> Open Contact_Home>> click on Refresh Now button (Wait till Success status).
- Go to contacts >> See Propensity To Churn value.
- Still its value not populating>> then again refresh the data stream
image image image image

6. Finish Configuration

6 step process

1. Prepare Data Cloud

1a. Refresh Snowflake Data Streams (5 minutes) $${\color{blue} Snowflake \space Optional: \space Please \space note \space that \space some \space functionality \space in \space the \space C360 \space will \space no\space longer \space function\space as \space expected \space if \space not \space installed. }$$

Step Action and Details Images
Refresh Snowflake Data Streams - Navigate to Data Cloud app and the Data Streams tab
- Query for Sales_Order data stream
- Using drop down control on the right against the data stream select Edit
- Select “Enable acceleration”
- In frequency select “Every 15 minutes”
- Select “Refresh initial file immediately”
- Repeat above steps for Sales_Order_Item,Return_Order and Return_Order_Item data stream
- Once the data stream is refreshed, the Total Records counts for each Data Stream is not 0.
image

1b. Refresh Data Graph (5 minutes)

Step Action and Details Images
Refresh Data Graph - Navigate to Data Cloud app and the Data Graph tab
- Click on the dropdown of the data graph (Web Engagement RT Profile)
- Click Update Status
- Once the job completes successfully, this status will be set as Active.
Repeat the same steps to update the stauts of (Item Non-Real Data Graph)
image

1c. Run Calculated Insights (5 minutes)

Step Action and Details Images
Run Calculated Insights - Navigate to Data Cloud app and the Calculated Insights tab
- Query for Customer Lifespan calculated insight
- Using the drop down control on the right, click "Publish Now" to refresh the Customer Lifespan calculated insight.
- When the Calculated Insight is refreshed successfully, the Last Run Status will show as Success.
- Repeat steps b & c for the below Calculated Insights. Ensure all Insights are refreshed successfully.
- Average Purchase Value
- Average Purchase Frequency
- CustomerLifetime Value
- Product Cobrowse Ranked
-Product Cobuy
-Engagement Score
image

2. Prepare Experience Site

2a. Activate Messaging Setting (5 minutes)

Step Action and Details Images
Activate Messaging Setting - Navigate to Setup go to messaging setting
- Click on ESA Channel -> Click on ‘Activate’
- Click on Checkbox then click on Accept
imageimage

2b. Configure Digital Experience (20 minutes)

Step Action and Details Images
Configure Digital Experience. - Click on Setup, in the Quick Find Box, enter Digital Experiences, and then select All Sites
- Click on builder against the Site ‘Outfitters’
- Scroll Down and Click on ‘Embedded Messaging ‘and update as per screenshot below
- Select Site End Point as - ESW_ESA_Web_Deployment_1733127495782
- Select enhanced Service URL from dropdown - it should be same as Site URL , refer Screenshot.
-We are using default background for Retail. to Large.
imageimage.

2c. Enable Login Access (5 minutes)

Step Action and Details Images
Enable Login Access. - Go to Setup, in the Quick Find Box, enter Digital Experiences, and then select All Sites
- Against the site ‘Outfitters’, click on Workspaces
- Under My Workspaces, click on Administration
- Click on Login & Registration menu item
- Under Login Page Setup, change Login Page Type to Experience Builder Page
- For URL, choose Login
- Under Password Pages, change Forgot Password to Experience Builder Page
- Choose Forgot Password
- Under Registration Page Configuration enable "Allow customers and partners to self-register"
- Choose Registration Page Type as Experience Builder Page
- Choose Register
- Assign users to a profile and account, choose Outfitters Community User
- Assign Permission Set Group as "Commerce_Shopper"
- Click Save
imageimageimageimage

2d. Change the layout of the Login page (5 minutes)

Step Action and Details Images
Change the layout of the Login page. - Go to Setup, in the Quick Find Box, enter Digital Experiences, and then select All Sites
- Against the site ‘Outfitters’, click on Builder
- From the Pages dropdown, search for Login, and then select Login
-Remove the site logo and add a Text Box component. Enter the text as "Outfitters", make it bold and center
- Publish the changes
image

2e. Change the layout of the Register page (5 minutes)

Step Action and Details Images
Change the layout of the Register page - Go to Setup, search for Digital Experiences, and select All Sites
- Against the site 'Outfitters', click on Builder
- From the Pages dropdown, search for Register, and select Register
- Remove the site logo and add a Text Box component. Enter the text as "Outfitters", make it bold and center (perform this step only if the “Outfitters” text box doesn't exist)
- Publish the changes
image

2f. Change the email Address (5 minutes)

Step Action and Details Images
Change the email Address. - Go to Setup -> Open All Sites
- Click on Workspaces (the configured Sites) -> Click Administrator
- Click on Emails
- Change Sender email to system admin email
- Click on save
image

2g. Create Trusted URLS (10 minutes)

Step Action and Details Images
Create Trusted URLS - Navigate to Setup, in Quick Find search Trusted URLs and click on Trusted URLs (under Security)
- Click on New. Key-in 'TrustedSite2' as the API Name
- Use https://DOMAINNAME.my.site.co for URL
- Replace DOMAINNAME with actual org Domain Name.

To find the Domain name please follow the following steps:
- Navigate to Setup, in Quick find search Domain → Please add https://DOMAIN from the below path (please select domain which is related to the experience cloud Sites Domain)
- Click on Save

Add Trusted URL to Agent Sites
- Click on Setup
- Click on Sites -> Check the check box if Domain is not enabled, Click on 'Register My Salesforce Site domain' button
- Click on ‘ESW_ESA_Web_Deployment_1733127495782’
- Click on Add Domain
- Add DOMAINNAME with actual org Domain Name.

To find the Domain name please follow the following steps:
- Search for Domain in Quick find → Please copy the name which ends with .my.site.com (e.g epicorgfarm79.my.site.com)
- Navigate to Setup, in Quick Find search All Sites
- Click on All Sites (under Digital Experiences)
- Click on Builder against Outfitters
- Click on Settings and then 'Security & Privacy'
- Click on Add Trusted Sites button - Add Name as 'TrustedSite1' and add url as domain name, which you have copied on prev steps (e.g https://e.g epicorgfarm79.my.site.com)
- Click Publish
imageimageimageimageimage

2h. Create CORS (10 minutes)

Step Action and Details Images
Create CORS - In the Quick Find>Type CORS
- Click on New> Paste https://DOMAINNAME.my.site.com In Origin URL Pattern
- Replace DOMAINNAME with actual org Domain Name.
> Click Save

-Click on New .
- Paste https://*.develop.vf.force.com to 'origin URL Pattern'
- Click Save

- Click on New
- Paste https://*.live-preview.salesforce-experience.com. to ‘origin URL Pattern’
- Click Save

- Click on New
- Paste https://*.visualforce.com to ‘origin URL Pattern’
- Click Save

- Click on New
- Paste https://*.force.com to ‘origin URL Pattern’
- Click Save

- Click on New
- Paste https://*.salesforce-scrt.com to ‘origin URL Pattern’
- Click Save

- Click on New
- Paste https://*.my.site.com to ‘origin URL Pattern’

To find the Domain name please follow the following steps:

> Search for Domain in Quick find → Please copy the name which ends with .my.site.com (e.g epicorgfarm79.my.site.com)
imageimage

2i. Publish ESA (5 minutes)

Step Action and Details Images
Publish ESA - Click on Setup
- In Quick Find, search Embedded Service Deployments and click on 'Embedded Service Deployments' (under Feature Settings --> Service --> Embedded Service)
- Click on ESA Web Deployment
- Click on 'Publish' button
- Wait for confirmation Message
image

3. Prepare Agentforce

3a. Add Agent User into Agentforce Service Agent and Activate (5 minutes)

Step Action and Details Images
Add Agent User into Agentforce Service Agent & Activate - Click on setup, search for Agent
- Click on Agentforce Agents (under Einstein --> Einstein Generative AI --> Agentforce Studio)
- In the Agent list, click on 'Agentforce Service Agent'
- In the Details tab, click on the pencil icon against "Agent User", select 'Agent User'
- Check the check box 'Keep a record of conversations with Enhanced Event Logs to review agent behavior.'
- Click on Save then click on Open Builder
- Click Activate
imageimage

4. Miscellaneous Configuration

4a. Update Einstein Search Retriever (perform only if Amazon S3 Connection has been created ) (10 minutes) $${\color{blue} S3 \space Optional: \space Please \space note \space that \space some \space functionality \space in \space Experience \space Cloud \space and \space in \space the \space C360 \space will \space no\space longer \space function\space as \space expected \space if \space not \space installed. }$$

Step Action and Details Images
Update Einstein Search Retriever - Click on Setup, in the Quick Find Box, enter Prompt Builder, and then select Prompt Builder
- Search for the Prompt Template named Return Policy and click on the hyperlink
- Hover the cursor on text the next to 'Please use the below information to help you answer the question : ', click on Resource, click on Einstein Search, click on 'Return_FAQ' and click on 'Return_FAQ' Retriever
- Click on Save As New Version click Activate

4b. Assign Contact Record Page as Org Default (5 minutes)

Step Action and Details Images
Assign Contact Record Page as Org Default. - Click on Setup
- Click on Object Manager
- Click on Contact
- Click on Lightning Record Page
- Click on Contact Record Page (API Name should be 'Contact_Record_Page')
- Click on Edit -> Click on Activation -> Click on 'Assign Org Default' (Desktop and phone) -> Click on Save
imageimageimage

4c. Create a New Version of Omni-Channel Flow (10 minutes)

Step Action and Details Images
Create a New Version of Omni-Channel Flow - Click on Setup
- Search for flow on Quick Button
- Click on Flow
- Click on the Flow
- Click on Route To ESA
- Deactivate the flow and click on the Route To ESA at the end
- Remove the Service channel and select some other option and then select “Live Message” again
- In Route To Select "Agentforce Service Agent"
- In Agentforce Service Agent Select "Agentforce Service Agent"
- Go to the Fallback Queue ID 🡪 Remove the Messaging Queue and add it back (same queue)
- Save as new version and activate the flow by clicking on the Activate button.
imageimageimageimage

4d. Access email Deliverability to all email (5 minutes)

Step Action and Details Images
Access email Deliverability to all email Click on Setup
- Search for ‘Deliverability’
- Change Access Email from ‘System email Only’ to ‘All email’.
- Click Save
image

4e. Prepare User (10 minutes) $${\color{blue} Optional: \space These \space steps \space are optional \space if \space you \space choose \space to \space use \space your \space own \space data. }$$

Step Action and Details Images
Prepare Test User Note: These steps apply to both existing and new contacts. Below is an example using Duncan

To test Community functionality , please use : Duncan Macintosh contact to login as experience user
- Navigate to Setup
- In the Quick Find box, search for Digital Experiences
-Click on Settings under DigitalExperience
- Click the ‘Allow users standard external profiles for self-registration, user creation and login checkbox
- Click Okay and click Save

Enable Community User

- Click the App Launcher
- Select the Outfitters Retail app
- Navigate to the Contact of Duncan Macintosh
- Click the 'Enable as Customer' button (Goto classic page, if the button is not visible)
- Update the User License to Customer Community Profile
- Update the Profile to Outfitters Customer Profile
- Update the Email field to your personal email
- Click Save

Optional: Update Duncan’s email address in her contact record if you want to receive notifications. Otherwise, this step is not necessary.

- Click the App Launcher
- Select the Outfitters Retail Trails app
- Navigate to the Contact of Duncan Macintosh
- Click the Edit button
- Update the Email field to your personal email
- Click Save
imageimageimageimageimage

5. General Notes (30 minutes)

Step Action and Details Images
General Notes for new community User To test Community functionality , please use : Duncan Macintosh contact to login as experience user
Note: If user self register from experience site sign up page, admin needs to add below permission set to that new community user
- Buyer
- Customer Community Plus Permissions
image (44)
Enable EPSessionIdHelper Visualforce Page
 - Log into Salesforce, click the gear icon in the top-right corner, and select Setup
 - In the Quick Find box, search for Visualforce Pages and select it.
 - Locate EPSessionIdHelper in the list.
 - Click the Security link next to the Visualforce page label
 - In the Available Profiles list, select the following profiles:
  Einstein Agent User
  Sunshine Resort Profile
  System Administrator
 - Move them to the Enabled Profiles list using the arrow button
 - Click Save to apply the changes

6. Connected App Configuration (20 min)

Step Action and Details Images
Connected App Configuration -In the Top Right, Click on the Profile Icon then Click on the Name of the profile(for e.g OrgFarm Epic), then click on User Details, after you land on User Detail Page, click Edit
-Change the Email Address Of Orgfram Epic User to your Email Id
-Wait for 5-10 minutes till your Email is Verified
-Go to Setup, search App Manager, Click on App Manager Then, search for ‘GuestUserCometD’ Connected App, scroll to the Right, click on drop-down arrow button, click on View, once you are on Connected App Page, click on ‘Manage Consumer Details’
-Copy the Consumer Key and Consumer Secret and Keep it in Notepad, we will be using them in the steps below.
-Perform the below script from anonymous window to get the Secret key and then store in Secret_Key__mdt -->Secret_Key__c Field ‘String secretKey = EncodingUtil.base64Encode(Crypto.generateAesKey(256)); System.debug('Generated Key: ' + secretKey);’ Metadata record name must be Label=HMAC_Secret, Client_Id__c = Consumer Key Client_Secret__c= Consumer Secret

-Search for the connected app again ‘GuestUserCometD’
-From Setup Go to the connected app again ‘GuestUserCometD’ Scroll to the Right, click on drop-down arrow button, click on View, once you are on Connected App Page, click on ‘Manage’, Scroll down to ‘Client Credentials Flow’ as 'Run as user of Admin profile' Then Add the profiles in profile section of connected app "Einstein agent, system admin, outfitter profile" and Save

-Go to Auth Provider Search for ‘GuestUserAuth’ Click on Edit and Paste the Consumer Secret and Consumer key that you have in your notepad, also If you are performing this in Sandbox change the Authorization Endpoint as and Authorization Token, if Performing in Production add the Authorization Endpoint as and Authorization Token.
-Save the Auth Provider, from the same Auth Provider Scroll down to Salesforce Configuration Section, Copy the Callback URL and Paste It in Notepad.
Go To Setup , Search App manager, Search for ‘GuestUserCometD’, Scroll to right Click on dropdown arrow and view, once you are in connected app, Click on Edit Paste the callback URL you copied inThe Callback URL Field and Save the App
-Go to Setup Search for Named Credentials
-Search for GuestCometDNew1 And Click on Edit
-Update the URL to current org domain URL (Go to setup>>search>>MyDomain )
-Save the Named Credentials and you will Get authenticated
-If you get an Error Wait for 10 minutes and Save the Named Credentials again.

-Connected App Configuration 2
-Go to Setup, search App Manager, Click on App Manager Then, search for ‘Data Cloud API’ Connected App Click on Manage Consumer Details
-Copy the Consumer Key, Consumer Secret and Keep it in Notepad, we will be using them in below steps.
-Go to Setup, search for Auth. Provider Auth Search for ‘Data_Cloud_Auth ‘Click on Edit and Paste the Consumer Secret and Consumer key that you have in your notepad, If you are performing this in Sandbox change the Authorization Endpoint as https://test.salesforce.com/services/oauth2/authorize and Authorization Token
-if Performing in Production add the Authorization Endpoint as https://login.salesforce.com/services/oauth2/authorize and Authorization Token
-Save the Auth Provider, from the same Auth Provider Scroll down to Salesforce Configuration Section, Copy the Callback URL and Paste It in Notepad.
-Go To Setup , Search App manager, Search for Data Cloud API, Scroll to right Click on dropdown arrow and view, once you are in connected app, Click on Edit Paste the callback URL you copied inThe Callback URL Field and Save the App.

7. Named Credentials (10 min)

Step Action and Details Images
Named Credentials -Search for Named Credentials
-In Named Credentials search for ‘GuestCometDNew1’
-click on edit
-Update the URL to current org domain URL (Go to setup>>search>>MyDomain )
-Save the Named Credentials and you will Get authenticated.
-If you get an Error Wait for 10 minutes and Save the Named Credentials again.

-Follow the same steps for named Credentials DataCloud
Named Credentials1Named Credentials2Named Credentials3

8. Tableau Dashboard

Step Action and Details Images
Create Semantic Model -Go to app launcher
-Click on Tableau Next
-Create a new folder and name it “Retail”
-Add following DMOS(Location Product Inventory, Product,Sales Order, Sales Order Product)
-Create Logical Views by joining all the above DMOS.
Create Visualizations and Computed fields -Create new Visualization on Return rate, sales performance and Inventory Dashboards.
Create Reports and Dashboards -Create Sales Performance dashboard, Retail dashboard and Inventory Dashboards.

7. After Creating Self Registration User

### $${\color{blue} \space Below \space Steps \space from \space 1a \space to \space 1c \space only \space need \space to \space perform \space after \space Creating \space self- \space registration \space user }$$

1a. Add Membership into Account/contact as well snowflake after Self Registration Personal Account creation

Step Action and Details Images
Scenario 1: When Existing Membership Number value present in snowflake and user want to use it - Go to App launcher>> Search for Data Explorer >> Select object type as data model>> Select Return Order
- Now Result will show under Customer Complaint column>> copy any of any of the value(eg: RC-925126791)
- Go to contact tab>> open recently created record via self registration form
- Edit Membership Number field and replace with new value.
- click on save
- Wait for 10 to 15 min so that Contact_Home data stream will refresh.
- Log in self registration created user in experience site and run your agentforce scenario
image image image
Scenario 2: When Existing Membership Number value present in snowflake and user want to use it - Go to contact tab>> open recently created record via self registration form
- Copy the Membership Number field value
- Same Membership Number need to present in snow flake : Download the below file, use the same format to create data entries, under And add the membership number from self registration created contact under Return Order File Column Customer Account
https://infosystechnologies-my.sharepoint.com/:x:/g/personal/sreeram_v01_ad_infosys_com/EX3SFbQeeIhKsI_sSrS8NvIBbmUtEPLsPrp9-Nw5W3QoQw?email=snehal.salve01%40infosys.com&wdOrigin=TEAMS-MAGLEV.p2p_ns.rwc&wdExp=TEAMS-TREATMENT&wdhostclicktime=1747143700048&web=1
- Go to Snowflake>> under table RETURN_ORDER ,upload the file
- Download the below file, use the same format to create data entries, for Return Order Line Item
https://infosystechnologies-my.sharepoint.com/:x:/g/personal/sreeram_v01_ad_infosys_com/EX3SFbQeeIhKsI_sSrS8NvIBbmUtEPLsPrp9-Nw5W3QoQw?email=snehal.salve01%40infosys.com&wdOrigin=TEAMS-MAGLEV.p2p_ns.rwc&wdExp=TEAMS-TREATMENT&wdhostclicktime=1747143700048&web=1
- Go to Snowflake>> under table RETURN_ORDER_ITEM ,upload the file
- Wait for 15 to 20 min to refresh the data stream named as Third Party Survey.
- Go to App launcher>> Search for Data Explorer >> Select object type as data model>> Select Return Order Product>> Result will pop up, verify your new data entry
- Go to App launcher>> Search for Data Explorer >> Select object type as data model>> Select Return Order line>> Result will pop up , verify your new data entry
- Log in self registration created user in experience site and run your agentforce scenario.
Note: Before asking any questions to agentforce and copilot please wait 15 to 30 min for all data stream to be refresh so that you will see the data under contact 360
2. You can only create 1 self register users because we have only 5 license.

1b. Publish Segments and Calculated Insights

Step Action and Details Images
Publish Calculated Insights After Self Registration Go to App launcher>> Go to Data cloud>> Go to Calculated Insights>> open Average Purchase Value >> click on publish now.
- Go to Calculated Insights>> open Average Purchase Frequency >> click on publish now.
- Go to Calculated Insights>> open Customer Lifespan> click on publish now.
- Go to Calculated Insights>> open Customer Lifetime Value>> click on publish now.
- Go to Calculated Insights>> open RFM >> click on publish now.
- Go to Calculated Insights>> open Engagement Score >> click on publish now.
- Go to Calculated Insights>> open ProductCoBrowse Ranked >> click on publish now.
image image image image image image image
Publish Segment After Self Registration Go to App launcher>> Go to Data cloud>> Go to Segments
- Click on Get Customers
- Click on Publish Now button and wait till Segment Status as Active.
image

1c.To enable real time for the new contact on Self Registration (5 min)

Step Action and Details Images
To enable real time for the new contact on Self Registration Go to App launcher>> Go to Data Cloud>> Go to Identity Resolution
- Click on Customer Profile>>click on Run Ruleset button((once Status Succeeded then process with next step )
Repeat the above step for Party Identification Match>> click on Run Ruleset button(Once Status Success then process with next step)
- Go to App launcher>> Enter Data Graphs>>Click on it >>Scroll to right of Web Engagement RT Profile data graph>> click on arrow >> click on Refresh Now and wait for Status Active
Repeat the above for Item Non – Real Data Graph>> Click on Refresh Now button and wait till get into Success Status.
- Go to Experience site>> login with newly created user from self registration form Click on product tab>>select any product
- Go back to salesforce org and open Contact Record page to see the Real Time Product Details.
image image image image

Behind the Scenes - how is the agent powered?

Curious to see the all the possible utterances and how they are powered by the Agent. Here is a list of all the possible coversations, the corresponding topics and the components that power them.

There are two contacts populated with all the relevant information to drive these conversations - Duncan Macintosh and Mark Smith. You can login to experience cloud as either of these contacts to have these full agent conversations.

$${\color{blue} Using \space the \space Agent \space to \space search \space for \space a \space hotel \space and \space create \space a \space reservation }$$

Sl. No. Utterance Behind the Scene Topic Components
1. Greeting saying 'Hi' or 'Hello' An Apex class accepts a ContactId, retrieves the associated Activation records to check for Recall Products. First Interaction on Greeting a. Apex
- ActivationAudienceResult.

b. Activation
-Get Recalled Customers
2. I am running a marathon next month can you suggest suitable shoes? Based on the user's login status, we tailor the experience accordingly. For guest users, we gather preference details through a few questions before providing personalized footwear suggestions. Logged-in users receive direct marathon shoe recommendations based on their query and profile Footwear Suggestion a. Apex
- GuestUserShoeRecommendation.
- DisplayProductList.
- GuestORLoggedInUserCheck
3. The marathon is in Mexico This is where we leverage WeatherAPI to analyze upcoming weather patterns for the next week and deliver tailored product recommendations based on forecast data Weather Forecast a. Apex
- CheckMexicoWeather

b. Platform Event
- WeatherBasedShoeFlyout__e
4. How does this compare to my last shoes? We use real-time browsing behavior and data graphs to identify the product the user is currently viewing. The system also queries the Product DMO and Sales_Order DMO based on the user's Contact ID via the agent. This enables retrieval of relevant product and purchase history. A prompt then generates a product comparison using both real-time and historical data. Product Comparison a. Flow
- Get Comparison Product Details.
- Call RT DG for CURRENT product.

b. Apex
-DisplayComparisonFlyout.

c. Prompt

-ShoeComparisonTemplate.

c.Platform Event
-ShoeComparisonPopup__e.
5. I'll go with this which size should be good for me? Looks at the Return_Order DMO based on the Contact ID of the user using the agent. Size Recommendation Assistance a. Flow
- Size Recommended From Return.
6. Are there any discount? Looks at the Promotion DMO and Promotion_Product DMO based on the ProductId of the user using the agent from Real-time. Check for Discounts a. Flow
- Check_For_Discount.
- Call RT DG for CURRENT product.
7. What is the Return Policy? Reads unstructured data from PDFs that has been ingested into Data Cloud where it is chunked, vectorized and indexed for easy retrieval Return Policy Details a. Prompt
- Return Policy
8. I would like to place an order The system authenticates the user to verify their validity as a contact before creating a record in the Sales_Order DMO based on the product the user is interested in. Place New Order a. Apex
- Get Customer Details by Messaging_Session.
-Place Order.
-Call RT DG for CURRENT product.
9. I am also interested in Homestead Domey 3 Tent The system checks the ProductItem DMO to verify the availability of the product. If the product is unavailable, it suggests similar product options to the user. Check Product Stock a. Flow
- Check Product Availability

b.Apex
-GuestORLoggedInUserCheck.

c.Prompt Action
-Up Sell Products
10. Where is my Order Looks at the Sales_Order DMO based on the Contact ID of the user using the agent. Order Enquiry a. Flow
- Fetch_Recent_Order
11. I would like to process a return The system queries the Sales_Order DMO using the user's Contact ID to check the delivery status of the order. Based on the delivery status, it will prompt the user to generate a return label if applicable. Return Request Assistance
Generate Return Label
a. Flow
- Fetch Order Details for Returning.

b. Apex
-ReturnLabelEvent.

c.Platform Event
-returnLabelEvent__e

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •