• p-ob
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello Guys,

I have been using embedded service for a while, I wanted to hide the standard button and start the chat with some custom button and for that I tried to use below code snippent. However, it gives me error all the time as Cannot read property "startChat" of undefined. If I print the object embedded_svc in the console, it comes fine. However, embedded_svc.liveAgentAPI gives and error. Can you please help what may have gone wrong?
 
embedded_svc.liveAgentAPI.startChat({
	directToAgentRouting: {
	buttonId: “573xx0000000000”,
	// userId: “”,
	fallback: true
},
extraPrechatInfo: [],
extraPrechatFormDetails: []
});