Loading
Prepare for Email to Become the Default Login ExperienceRead More
Contact Center
Run Custom Components as the Logged-In User in Enhanced Web Chat

Run Custom Components as the Logged-In User in Enhanced Web Chat

When you add a custom Lightning web component to your embedded service deployment, it runs as an unauthenticated guest user in the chat window, even when a user is logged in to your Experience Cloud site. To run the component as a logged-in site user instead, add the user's profile or permission set to the Embedded Service site's member list. Running the component as the logged-in user gives the custom component access to read and act on the user's data.

Required Editions

View supported editions.
Checkmark This article applies to: Enhanced Web Chat channels
X icon This article doesn’t apply to: Enhanced In-App Chat, Enhanced WhatsApp, Enhanced Facebook Messenger, Standard and Enhanced SMS, Enhanced Apple Messages for Business, Enhanced LINE, and Bring Your Own Channel
User Permissions
To set up this feature:

Customize Application

AND Modify Metadata Through Metadata API Functions

To modify permission sets and profiles: Manage Profiles and Permission Sets
To add the Embedded Messaging component to an Experience Builder site: Create and Setup Experiences

Before you begin:

  1. Identify the profiles and permission sets that you want to give the custom component access to.
    1. From Setup, in the Quick Find box, enter All Sites, and then select All Sites.
    2. Next to your Experience Cloud site, select Workspaces.
    3. Click Administration and then select the Members tab.
    4. Review the selected profiles and permission sets and determine which ones you want to add to the Embedded Service site's member list.
  2. Add the profiles and permission sets that you identified earlier as Embedded Service site members. By default, the Salesforce admin profile is a member of the Embedded Service site.
    1. On the All Sites Setup page, select Workspaces next to your Embedded Service site. Embedded Service site names start with ESW.
    2. Click Administration and then select the Members tab.
    3. Select the profiles and permission sets.
    4. Save your changes.
  3. To confirm that the custom component runs as the logged-in user, open your Experience Cloud site and log in as a user whose profile you added. Then open the chat window and confirm that the custom component shows the logged-in user's data instead of the guest user's data. Repeat the test as a user whose profile and permission sets you didn't add.

To stop the component from running as a logged-in user, remove that user's profile or permission set from the Embedded Service site's member list.

 
Loading
Salesforce Help | Article