Hiiiii!
I'm trying to show an agent action's output as a custom UI (tappable buttons) in an Enhanced Chat v2 web deployment, using a Custom Lightning Type.
Setup: an Agent Script-authored Agentforce Service Agent on Messaging for In-App and Web (embedded on a web page).
When a person asks to speak to someone, the agent offers four handoff channels — Live chat, WhatsApp, Phone, Email. Today the options surface as a text list and that works end to end; I want them as clickable buttons, with the tapped option arriving back as the user's reply.
On the live widget, the agent's text arrives but the component never renders.
What's the supported way to render agent-offered options as buttons on this channel, end to end? Specifically - does CLT output rendering on Enhanced Chat v2 work for agents connected through a Messaging channel, or only via the Agentforce Builder "Enhanced Chat v2" connection?
I am having great difficulty getting it to work - all I need is to have the agent surface options as clickable buttons.
Any ideas?
#Agentforce #Custom Lightning Component #Salesforce Developer #Help
Hi Megan, good news, your channel is fine: Custom Lightning Types are supported on Enhanced Chat v2 (the web deployment of Messaging for In-App and Web), alongside Lightning Experience and Experience Builder. They are NOT supported on In-App Chat (the mobile SDK), WhatsApp, SMS, Apple Messages, LINE, or BYOC, but plain Enhanced Web Chat is supported.
Your symptom, text arrives but the component never renders on the live widget, almost always means the renderer is not registered for the enhancedWebChat channel specifically. CLT rendering is channel-scoped: each channel that should render the type needs its own renderer.json in that channel's folder. If your type only has a renderer for the default context (or you were seeing it only in the Builder conversation preview), it renders in preview but stays blank on the live Enhanced Chat v2 widget, which is exactly what you describe.
So:
1. Add and deploy a renderer.json for your Custom Lightning Type under the enhancedWebChat channel folder, not just the default one, pointing at your LWC.
2. Redeploy and reload the embedded deployment so the new channel config is picked up.
3. For the tapped option arriving back as the user's reply, have the LWC dispatch the selected value as the utterance, that part is on the component, not the channel.
The Agentforce dev guide 'Enhance the Agent UI with Custom LWCs and Lightning Types' documents the per-channel renderer setup.
if this helps, please mark it as the Best Answer so it helps the next person, thanks 🙂