Understanding Custom Lightning Types in Agentforce
Custom Lightning types can be created for custom agent actions’ input and output in Agentforce Service agents via Enhanced Chat V2. To create custom Lightning types, you can follow the example provided in the Salesforce documentation.
Steps to Resolve the Issue
The community member had already taken several steps to resolve the issue, including switching to Enhanced Chat V2, publishing the custom Lightning type, and adding Enhanced Chat V2 to their Agent Builder connections.
The root cause of the issue is that custom lightning types are not yet supported in Enhanced Chat V2, as stated in the Salesforce documentation.
However, if you face issues with V2, logging a case with Support can help resolve the problem.
Using Custom Lightning Types in Agentforce
To use custom Lightning types in Agentforce, you need to create a custom Lightning type and then use it in your Service Agent. You can create a custom Lightning type by following the example provided in the Salesforce documentation.
ApexClass.cls
public class CustomLightningType { public String label { get; set; } public String value { get; set; } public CustomLightningType(String label, String value) { this.label = label; this.value = value; }}
Best Practices for Custom Lightning Types
When creating custom Lightning types, it is essential to follow best practices to ensure that they work correctly. Some best practices include testing your custom Lightning type thoroughly and ensuring that it is compatible with Enhanced Chat V2.
Checklist for Custom Lightning Types
- Test your custom Lightning type thoroughly
- Ensure that your custom Lightning type is compatible with Enhanced Chat V2
- Follow the example provided in the Salesforce documentation
- Log a case with Support if you face issues with V2
- Use the correct version of Enhanced Chat
- Check the Salesforce documentation for any updates or changes
What is a custom Lightning type?
A custom Lightning type is a custom input or output type that can be used in Agentforce Service agents.
How do I create a custom Lightning type?
You can create a custom Lightning type by following the example provided in the Salesforce documentation.
What is Enhanced Chat V2?
Enhanced Chat V2 is a version of Enhanced Chat that supports custom Lightning types.
Why is my custom Lightning type not working?
Your custom Lightning type may not be working due to compatibility issues with Enhanced Chat V2. Logging a case with Support can help resolve the issue.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.