Most deprecated functions are still supported but not recommended. Bot developers are encouraged to use stated alternatives instead.
This function is supported but not recommended. Bot developers are encouraged to use getUserChannel instead.
getChannel returns the platform channel the user is currently communicating on. This function returns — lp_sms, lp_web, lp_inapp, sms, web, inapp. lp_ prefix indicates the LivePerson platform.
||None||lp_sms, lp_web, lp_inapp, sms, web, inapp|
var channel = botContext.getChannel(); botContext.printDebugMessage("channel used by the user is: " + channel);
Add quick reples
This function is supported but not recommended. Bot developers are encouraged to use addQuickReplies instead.
The example below shows how quick replies can be added easily to your message.
// Add these quick replies to an existing message botContext.addQuickReples(['Ranch~sauce01','Honey Mustard~sauce02','BBQ~sauce03','Hot~sauce04']);
Log escalation event
This function isn't supported. The system logs escalation events automatically, and this data is viewable in Bot Analytics.
logEscalationEvent is used to count the number of times the user called a particular escalation type. The function requries a user input and the string 'LivePerson' for the type of escalation.
user_message — the user's message text
escalation_type — 'LivePerson'