Introduction to Lightning Types
Lightning Types are JSON-based data types to structure, validate, and display data for the default Agentforce agent in Lightning Experience.
With Lightning Types, you can manage the representation and shape of data types. You can use Lightning types to create consistent and flexible data interactions in Lightning Experience.
Salesforce provides standard Lightning types, such as text and multiline text, to structure your data type. Additionally, you can create Lightning types to customize the UI experience for Agentforce (Default) in Lightning Experience based on your business requirements.
Lightning Type consists of these artifacts.
- Schema defines the structure of data and the rules for its validation, such as maximum length, type, and format.
- Editor defines the input UI component that you use to enter or edit data.
- Renderer defines the output UI component that displays data.
Not all data types that you use in an Apex class are supported in Lightning types.
Lightning types support these data types.
- Primitives, including Integer, Double, Long, Date, Datetime, Time, String, ID, and Boolean
- sObjects, either a generic or specific sObject, such as Account, Contact, and MyCustomObject__c
- Collections
- A list or array of primitives, sObjects, user-defined Apex classes, and collections
- A map, represented as
Map<key, value>
, where the key is always a string and the value can be a primitive, sObject, or collection
- User-defined Apex classes