Botkit Help Required

46 views Asked by At

What are you trying to achieve? I am trying to get the status of the ticket and the function is working perfectly.

I am unable to find how to pass the value of ticket id to function using botkit. When I directly run the javascript function I am getting the expected output. I need to get the same output in Webex when I enter status-ticketid

input will be status-ticketid


const { BotkitConversation } = require('botkit'); 
module.exports = function (controller) { 
controller.hears( 'status*', 'message,direct_message', async( bot, message ) => { 
await bot.reply(message, srstatus(message.text.split('-')[1])); }); 
 ); }
function srstatus(x) {
}

What was the result you received? undefined

What did you expect? Status of the ticket

Kindly Help

0

There are 0 answers