Use the Lightning Message Service Bridge component to enable communication between the telephony system and other Lightning components.
To use the Lightning Message Service (LMS) channel in your contact center, create a Lightning component using Aura or a Lightning Web Component that serves as the bridge component. This component supports communication between the connector and other Lightning components on the page.
Using Aura
It must implement the Aura interface service_cloud_voice:messageBridge.
It must reference the LMS channel you defined with namespace.
It must implement the publishMessage method to publish connector messages to the channel.
It must call the handleMessage Action handler to send messages to the connector.
To avoid echo, a source property is inserted during message publishing. When a message from the connector is published to the channel, it’s filtered out and not sent back. The source property won’t be needed if the communication is one-way.
The connector starts receiving messages sent from the message bridge after the connector is fully initialized.
Note
Configure the Contact Center to Use the Message Bridge Component
After creating the component, configure the contact center to use it.
Using the ConversationVendorInfo setup entity (for Production): In a production environment, specify the message bridge component’s fully qualified name (FQN) in the ConversationVendorInfo record from the same managed package that has the actual Lightning component. When a Salesforce admin imports an XML file to create a contact center, it references the ConversationVendorInfo to read the message bridge component name and configure the contact center custom settings automatically.
Using CallCenter Metadata API (for Local Testing): Add the message bridge component FQN to the contact center’s custom settings for testing. This can be done using theCallCenter Metadata type. Set the messageBridgeComponentFqn value in the Metadata file to the fully qualified name of your bridge component. For an example: