Newer Version Available
LiveChatButtonSkill
Represents all the skills available to a LiveChatButton except the one currently assigned. To retrieve the skill currently assigned, query LiveChatButton.
Supported Calls
create(), delete(), query(), update()
Fields
| Field Name | Details |
|---|---|
| ButtonID |
|
| SkillID |
|
Usage
Use this object to assign a specific skill to a specific button for multi-skill routing. For example:
1String myButtonId = button_Id;
2String myButtonDevName = button_DeveloperName;
3List<String> skillIds = new List<String>();
4
5//Get one skill ID from button
6for(LiveChatButton lcb : [Select SkillId FROM LiveChatButton WHERE DeveloperName =:
7myButtonDevName]) {
8skillIds.add(lcb.SkillId);
9}
10//Get remaining skills from LiveChatButtonSkill join object
11for(LiveChatButtonSkill lcbs : [Select SkillID FROM LiveChatButtonSkill WHERE ButtonId =:
12myButtonId]) {
13skillIds.add(lcbs.SkillId);
14}
15//Retrieve all skills into a single list
16List<Skill> skills = [Select Id, DeveloperName from Skill WHERE Id IN :SkillIds];
17