generating-clt-components
generating-clt-components — Building & rendering Custom Lightning Types from Agent Script
A Custom Lightning Type (CLT) is the only reliable way to display a custom-designed UI component (cart, carousel, file uploader, recommendation card, confirmation receipt) inside Agentforce conversations. Unlike plain text replies, CLT output bypasses Atlas's final-response paraphraser and renders verbatim — that's why every demo-grade UI in Agentforce ships through a CLT and not through styled markdown.
This skill encodes the end-to-end recipe from a working production demo (AcmeRetail FDE engagement, two custom CLTs in service: checkoutReview_46d7f6 for an order-change cart, asaCarousel for a TV-selection carousel, plus a third that failed — exchangeCheckout — and was abandoned). The lessons from the failure are baked in.
Provenance: verified 2026-05-26 against agent EnhancedChatV2Test on agentforce-sandbox (org 00Dxxxxxxxxxxxxxxx), Atlas v2 planner, Embedded Messaging V2 deployment.
When to use
Trigger this skill when the user:
- Wants to render a custom UI (cart, carousel, picker, receipt, confirmation card) in an Agentforce conversation, not just a text bubble.
- Has a non-rendering CLT — payload looks right in Apex/Flow logs, but the card is blank in chat.
- Has a CLT that the planner refuses to call — Atlas replies with text only, no
ACTION_STEPever fires. - Says "my CLT preview is broken in Setup" — the Lightning Type Builder shows blank or errors.
- Wants to port a working CLT to a new agent or new field shape — needs the value-handling pattern that survives both Builder preview and runtime.
- Asks "why doesn't my action get invoked" in a multi-step Agent Script flow.