These are the two approaches you can try as per your need:
In the console app, you could update the Navigation Rules to open the chat as a subtab of the related Contact or Account. Make sure the contact and account fields are not null on the chat transcript.
Click path for setting up Navigation rules:Setup> App Manager >Choose the Console App>Edit> Add "Chat Transcript" to "Navigation Items" > In Navigation Rules, choose "Chat Transcript opens As" either account/contact.
below is screenshot highlighting chat transcripts opened as subtabs within contact tab for better identification
Install the package ChangeTabLabel.The prerequisite to install the package is to turn on Messaging from the 'Messaging Settings'
Code is made available in GitHub:https://github.com/sf-kiwi-cpat/ChangeTabLabelComponent
The component in the package is designed for Console Apps and will update the tab of the workspace with more relevant information. For instance, the subject of the case, or a related Contact or Account for that record.
Currently, 4 object records are supported by this component:
- Chat Transcript
- Messaging Session
- Work Order
Steps to use this component:
- Go to the record page (one of the 4 supported objects above) you wish to add this component to
- Go to settings and select ‘Edit Page’
- In the search box in the left-hand pane, type ‘change'and Drag the ‘ChangeTabLabel’ component onto the pane - make sure it is below any other component.
The component itself has no UI, but it will create whitespace, so have it at the bottom of your shortest section.
- If you just want to use the Contact or Account, then you are done. However, if you want to use a different field on the record (e.g. Subject for Case), then you can edit the setup of the component:
- The ‘Use Contact or Account as priority’ allows you to define the ‘Field’ as a fallback, so if the Contact or Account isn’t found then it will use the value of the defined field as the label for the Tab.
- Save and Activate the page.
Now when you open the record home page for the page you just updated, the tab will be updated to match the Contact or Account as appropriate.
It will even update when you save changes to the record!
Note: This is not on the AppExchange but can be installed. This package has been built by Salesforce development Engineers.No support is provided officially by Salesforce