salesforce-custom-lightning-type

Define JSON Schema-based Custom Lightning Types for Lightning Platform actions.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/afv-library --skill salesforce-custom-lightning-type
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salesforce-custom-lightning-type
Source: https://github.com/forcedotcom/afv-library/tree/main/skills/salesforce-custom-lightning-type
Command: npx skills add https://github.com/forcedotcom/afv-library --skill salesforce-custom-lightning-type

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps architects and developers create Custom Lightning Types (CLTs) to describe structured inputs and outputs for the Lightning Platform and Einstein Agent actions, enabling precise data contracts and UI behavior.

Core Features & Use Cases

  • Create JSON Schema-based CLTs for structured inputs/outputs and drive editor/renderer experiences.
  • Configure CLTs for Einstein Agent actions and Lightning editor configurations to support custom UI components.
  • Troubleshoot deployment errors related to Custom Lightning Types in enterprise Salesforce projects.

Quick Start

Define a CLT schema for a new object and wire up its editor/renderer configuration to a custom UI.

Frequently Asked Questions about salesforce-custom-lightning-type

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define Custom Lightning Types for Einstein Agent actions?

Custom Lightning Types are defined as JSON Schema-based objects that describe structured inputs and outputs for Einstein Agent actions. You create a root object constrained by type: object, title, lightning__objectType, and unevaluatedProperties false to enforce data contracts.

What are the metaschema constraints for Custom Lightning Types?

Custom Lightning Types must enforce root object constraints including type: object, a title, lightning:type set to lightning__objectType, and unevaluatedProperties false. The metaschema rules also govern lists, nested objects, and allowed primitive types within the schema.

How do I configure editor and renderer configurations for Lightning Platform custom UI components?

You apply Custom Lightning Type schemas to editor and renderer configurations to drive custom UI component behavior on the Lightning Platform. This involves wiring the CLT schema definitions to the specific editor and renderer configs for your interface.

Can I use Apex classes to drive Custom Lightning Type definitions?

Yes, Custom Lightning Type definitions support Apex-class-driven definitions. This allows developers to define structured inputs and outputs using Apex classes as the basis for the JSON Schema objects.

Why are my Custom Lightning Types failing deployment in Salesforce?

Custom Lightning Type deployment failures often stem from violating metaschema rules, such as missing root object constraints like unevaluatedProperties false or incorrect lightning:type settings. Troubleshooting involves validating schema structure against required constraints.

When do I need a Custom Lightning Type for Lightning Platform actions?

You need a Custom Lightning Type when creating structured inputs and outputs for Lightning Platform and Einstein Agent actions that require precise data contracts and specific UI behavior through editor and renderer configurations.