Newer Version Available

This content describes an older version of this product. View Latest

LiveChatButtonSkill

Represents all the skills available to a LiveChatButton except the one currently assigned. To retrieve the skill currently assigned, query LiveChatButton. This object is available in API version 25.0 and later.

Supported Calls

create(), delete(), update(), query()

Fields

Field Name Details
ButtonID
Type
reference
Properties
Create, Filter, Group, Sort
Description
The record ID of the button.
SkillID
Type
reference
Properties
Create, Filter, Group, Nillable, Sort
Description
The record ID of the skill.

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]) {
8    skillIds.add(lcb.SkillId); 
9}
10//Get remaining skills from LiveChatButtonSkill join object
11for(LiveChatButtonSkill lcbs : [SELECT SkillID FROM LiveChatButtonSkill WHERE ButtonId =:
12myButtonId]) {
13    skillIds.add(lcbs.SkillId); 
14}
15//Retrieve all skills into a single list
16List<Skill> skills = [SELECT Id, DeveloperName FROM Skill WHERE Id IN :SkillIds];