Error: TypeError: Cannot read properties of undefined (reading 'on_agent_transfer')

I am trying to follow the implementation given here.

I have added the live Agent configurations and the callback URL, but i get an error

TypeError: Cannot read properties of undefined (reading 'on_agent_transfer')

Any insights on this will be helpful.

@hardika_doshi
Can you share a sample code on which line are you getting the error? The Kore platform ensures that on_agent_transfer is triggered. As far as I understand from the problem statement, the event is emitted and botkit received the event. Inside on_agent_transfer, there seems to be some uninitialized variable/null value that is not resolving.
Also, the medium post that you are referring to seems very old. Please check out botsore for some more references. We do not have live agent but you can get good reference from Salesforce etc. Look into the instructions and demo codes. It will need your own credentials but at least you can check the code on the approach.

image

Thanks a lot Swagata!