function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rahul ShRahul Sh 

Chat transfer by skill : Need old and new skill both in trigger

Hi All,
In my org chats are being transferred by skill.
If chat is being transferred to some of the skills I need to write my logic. 

Where I need help: I am trying to write a trigger on ChatTranscript but not getting the skill it is being transferred to. 

Any help/pointers? 
 
SwethaSwetha (Salesforce Developers) 
HI Rahul ,
Can you share what you have tried so far and if you are seeing any error with the trigger?
Thanks
PriyaPriya (Salesforce Developers) 

Hi Rahul,

Kindly refer this link to set skill based routing to tranfer chat :- 


https://help.salesforce.com/articleView?id=sf.bots_service_transfer_skills.htm&type=5

Please mark as Best Answer so that it can help others in the future.

Regards,

Priya Ranjan

 

Rahul ShRahul Sh
Hi Shwetha / Priya,
Here is what I am trying.

What we have in Org (working as expected): 
  • Chat transfer by skill is enabled and setup 
  • We. have say 4 skills 
    • Sales_1
    • Sales_2
    • Service_1
    • Service_2
  • Agents can transfer chats between skills 
  • Sales chats create a Lead 
  • Service chats create a Case 
Problem: 
  • When an agent transfers a sales chat to Sevice skill, we want to create a Case (at time of transfer)  
  • So we have decided that we need to write trigger on LiveChatTranscript 
  • The problem is: I need to know if the chat was transferred from Sales_1 to Service_1, so that I can create a case in the trigger. 
  • In trigger, I am getting intial skill (Sales_1) but not getting where its transferred to (Service_1 in this case). 

Is there any way I can get "transferred to " skill in liveChatTranscript trigger.