This event delivers the AI Agent transcripts when the user interacts with the AI Agent prior to agent transfer.
It allows you to customize the AI Agent response within the transcripts.
Example:
aaWindowInstance.on('BEFORE_VIEW_INIT',(html,payload)=>{if(payload.event==='BOT_TRANSCRIPT'){// Customize the HTML if requiredconsole.log('BOT_TRANSCRIPT event received');}});
aaWindowInstance.on('BEFORE_VIEW_INIT',(html:string,payload:{event:string}):void=>{if(payload.event==='BOT_TRANSCRIPT'){// Customize the HTML if requiredconsole.log('BOT_TRANSCRIPT event received');}});
defon_before_view_init(html,payload):ifpayload.get("event")=="BOT_TRANSCRIPT":# Customize the HTML if requiredprint("BOT_TRANSCRIPT event received")
voidOnBeforeViewInit(stringhtml,dynamicpayload){if(payload.event=="BOT_TRANSCRIPT"){// Customize the HTML if requiredConsole.WriteLine("BOT_TRANSCRIPT event received");}}
funonBeforeViewInit(html:String,payload:Map<String,Any>){if(payload["event"]=="BOT_TRANSCRIPT"){// Customize the HTML if requiredprintln("BOT_TRANSCRIPT event received")}}