How to use Custom Lightning Types in Agentforce Service Agents? – 1

Custom Lightning types allow developers to customize the appearance and behavior of UI for Agentforce Employee agents in Lightning Experience. They use the LightningTypeBundle metadata component (available in API version 64.0+) to override the default user interface for agent actions.

Key Characteristics:

  • JSON-based data types that structure, validate, and display data
  • Can only override the default UI for agent actions that use Apex classes as input or output
  • Consist of three main artifacts:
    • Schema.json: Defines data structure and validation rules
    • Editor.json (optional): Defines the input UI component
    • Renderer.json (optional): Defines the output UI component

Are you looking forward to how to setup custom lightning type in Agentforce Service agent? Cool, Follow these steps:

In order to use the Custom Lightning type in Service Agent, We need to use Enhanced Chat v2. Enhanced Chat v2 is the redesigned customer-facing interface for Enhanced Web Chat in Salesforce. It’s built to support modern, multimodal, and AI-powered (agentic) experiences.

Applicability

  • ✔ Applies to: Enhanced Web Chat
  • ✘ Does NOT apply to: In-App Chat, WhatsApp, Facebook Messenger, SMS, Apple Messages for Business, LINE, and BYOC channels.

Setup Enhanced Chat V2 for Service Agent

We need to do these:

  • Setup Messaging Channel
  • Setup Embedded Deployment Setting V2
  • Setup Routing Configrations
  • Setup Agentforce Service Agent with Custom Lightning Type
  • Configure Omni Channel routing in Messsaging Channel
  • Publish the Embedded Deployment Setting v2 again
  • Test the Service Agent using Embedded Deployment Setting

Create a messaging channel

  1. In the Setup Quick Find, search for and select Messaging Settings.
  2. Click on New Channel.
  3. Click on Start.
  4. Select Enhanced Chat and click on Next.
  5. Set field values as follows:
  6. Click on Save.

You can verify the Messaging channel list:

How to use Custom Lightning Types in Agentforce Service Agents? We can do by setting Messaging setting and Embedded Deployment Setting v2

Create an embedded service deployment

Create an Embedded Service deployment that can be used to distribute your agent.

  1. In the Setup Quick Find, search for and select Embedded Service Deployments.
  2. Click on New Deployment.
  3. Select Enhanced Chat.
    Custom Type, Agentforce, Lightning Types, Service Agent, Embedded Deployment Setting
  4. Click on Next.
  5. Select Web.
  6. Configure the deployment as follows:
  7. Click save
  8. Now, click on switch to V2 button to enabled Enhanced Chat V2
  9. Click on Switch & Publish

Next Steps continue here: https://salesforcediaries.com/2025/11/23/how-to-use-custom-lightning-types-in-agentforce-service-agents-2/

Do you need help?

Are you stuck while working on this requirement? Do you want to get review of your solution? Now, you can book dedicated 1:1 with me on Lightning Web Component and Agentforce completely free.

GET IN TOUCH

Schedule a 1:1 Meeting with me

3 comments

  1. Hi Sanket, I am using the same configuration but the lwc shows in employee agent not in service agent. Why?

Leave a Reply