Skip to main content

Built-in functions

Built-in functions are special objects and functions provided by the platform. You can invoke them from any JS script without defining them separately.

bindThe function is used for setting up handlers.
capitalizeConverts the first letter of the string passed to it to uppercase and the rest of characters to lowercase. Used to display names.
currentDateReturns a moment.js object with the current date.
hasOperatorsOnlineChecks the presence status of agents.
logOutputs a message to the server log and is used for debugging.
parseXmlConverts the .xml text passed to it to a JSON object.
toPrettyStringConverts the object passed to it to a formatted JSON object with indents.