• Danielle Bouathong
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hello everyone!
I am not an apex expert so I will need your help to get through this!
We want to setup the omnichannel Skills-Based Routing and if I understood well, if I want to route work items (=cases) based on skills I need to create an apex class and trigger it with a process builder (for example). Here's the article: https://help.salesforce.com/articleView?id=omnichannel_skills_based_routing_define_apex_action_class.htm&type=5 (https://help.salesforce.com/articleView?id=omnichannel_skills_based_routing_define_apex_action_class.htm&type=5)
There is a part in the apex code that I need to understand: 
static String getSkillId(String caseDescription) { String skillName = 'English'; if (caseDescription != null) { if (caseDescription.contains('Spanish')) { skillName = 'Spanish'; } else if (caseDescription.contains('French')) { skillName = 'French'; } }
Does this part should reflect the Skills-Based Routing Rules that I set ? In my case, my rule is also based on language, for example, if the case custom field "Account_Country_skill__c" = DE then the case needs to be routed to the agent with the DE skills. Should I replace CaseDescription with my custom field ? If yes, how should I do it ?
Thank you!