Troubleshooting Custom Lightning Types in Enhanced Chat v2

Solve common issues with rendering custom Lightning types in Enhanced Chat v2.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.

Check markThis article applies to: Agentforce Service agents

Cross markThis article doesn't apply to: Agentforce Employee agents

To learn about channel support for other agent types, see the documentation for that type.

Before you begin, test your custom Lightning type with the Enhanced Chat v2 connection in Agentforce Builder preview. If a custom Lightning type doesn't render in the preview, troubleshoot the agent's Agent Script. See Agentforce Developer Guide: Get Started with Agent Script.

If your custom Lightning types still don't render, verify these settings.

  • On the Session Settings Setup page, make sure that Use Lightning Web Security for Lightning web components and Aura component is enabled.
  • In Agentforce Builder, make sure that the agent user has access to the objects and fields that the custom Lightning type uses.
  • In Agentforce Builder, make sure that the output of the agent action that uses the custom Lightning type has the correct component and has Show in conversation selected.

After your custom Lightning types render consistently in the preview, activate your agent and republish your embedded service deployment.

My custom Lightning types don't render.

To make sure that custom Lightning types render completely, republish your embedded service deployment after you:

  • Add a new agent in your Omni-Channel routing flow or change the agent in your messaging channel's Omni-Channel routing settings
  • Add new actions to your agent
  • Edit the inputs or outputs for existing actions
  • Change the output rendering type for any output
  • Activate a different version of your agent

My custom Lightning types render as text.

If you see a text response instead of the expected custom Lightning types, verify these settings.

  • In Agentforce Builder, make sure that your agent has the Enhanced Chat v2 connection.
  • On the Embedded Service Deployment Setup page, confirm that your embedded service deployment is v2, not v1.
  • Make sure that the Agent User profile and the System Administrator profile have access to the invocable Apex classes and flows. See Set Apex Class Access from Profiles and Provide Access to Use Flows.

If you created an agent in the legacy builder that's connected to Telephony and Enhanced Chat v2, custom Lightning types can render as text.

My custom Lightning types don't render for Experience Cloud site users.

Salesforce creates an embedded service site when you create an embedded service deployment. When a signed-in user is a member of both sites, Enhanced Chat v2 passes that user's access to the custom Lightning types in the chat.

If a custom Lightning type doesn't render for signed-in users, give your embedded service site the same members as your Experience Cloud site. See Run Custom Components as the Logged-In User in Enhanced Web Chat.