Methods
(abstract) getChannels() → {Promise}
Implement this callback to return a list of available channels
customPresenceApi.registerApi({
getChannels: () {
return Promise.resolve([
{id: 'CALL', name: 'Call'},
{id: 'CHAT', name: 'Chat'}
]);
}
});
(abstract) getNotReadyCodes() → {Promise}
Implement this callback to return a list of Not Ready Codes available for an agent
customPresenceApi.registerApi({
setNotReadyCode: () {
return Promise.resolve([
{id: '1', name: 'Break'},
{id: '2', name: 'Meal'}
]);
}
});
(abstract) getPresence() → {Promise}
Implement this callback to return the current presence status
customPresenceApi.registerApi({
getPresence: () {
return Promise.resolve({
isReady: true,
channelIds: ['CALL', 'CHAT'],
notReadyCodeId: null,
elapsedTime: null
});
}
});
(abstract) setChannels(params) → {Promise}
Implement this callback to set a new Not Ready Code
customPresenceApi.registerApi({
setChannels: (params) {
// Set params.channelIds code
return Promise.resolve();
}
});
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
object
|
|
Returns:
- Type:
-
Promise
Promise object. Resolved when operation succeeded. Rejected otherwise.
(abstract) setNotReadyCode(params) → {Promise}
Implement this callback to set a new Not Ready Code
customPresenceApi.registerApi({
setNotReadyCode: (params) {
// Set params.notReadyCodeId code
return Promise.resolve();
}
});
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
params |
object
|
|
Returns:
- Type:
-
Promise
Promise object. Resolved when operation succeeded. Rejected otherwise.