function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Aswin B SAswin B S 

sforce not defined

I am trying to send a response to chat from code using the sendMessage method. 
This is the syntax:
sforce.console.chat.sendMessage(chatKey:String, message:String, callback:Function)
I have also included <apex:includeScript value="/support/console/52.0/integration.js"/>
Still I am getting error while runing LIVE AGENT: Error: ReferenceError: sforce is not defined
ShivankurShivankur (Salesforce Developers) 
Hi Aswin,

Please try to check by modifying the includescript line like below:
<script src="/support/console/52.0/integration.js" type="text/javascript"/>
Check if it works for you.

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.
Aswin B SAswin B S
@Shivankur, thanks for the reply. I tried this and still getting the error.