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
addyaddy 

Post chat page

I would like to have post chat redirect to a url. Needed a VF page to pass parameters and redirect to survey url with js. However when the chat status is unanswered would like to close the window - window.close() does not work. Any suggestions on how to close the chat window inside the VF page?
Ashish_SFDCAshish_SFDC
Hi Addy, 


This has been addressed in the other forum, 

You can look for the presence of the "Error" field data POSTed to the post-chat page. If that field is present, the chat was not able to reach an agent successfully, and the field will contain the localized error message that would have been presented to the user in the chat window if there were no post-chat page. Best practice is probably to show that message to the user on your post-chat page, and not immediately close the window.

If your post-chat page is implemented using VisualForce, you can show the message with:

<apex:outputText value=“{!$CurrentPage.parameters.Error}” />
You can also check that same value to conditionally render your survey when the Error is not present.

http://salesforce.stackexchange.com/questions/30199/liveagent-post-chat-page


Regards,
Ashish