You need to sign in to do that
Don't have an account?

How can I query an existing case number in live agent?
I'm attempting to lookup existing case numbers for live agents if a customer provides a case number. I'm doing this in my code, but it doesn't appear to work. Is there something else I have to do? I've placed the code below and bolded the line where I believe this should be working?
<apex:page showHeader="false"> <!-- This script takes the endpoint URL parameter passed from the deployment page and makes it the action for the form --> <script type="text/javascript"> (function() { function handlePageLoad() { var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)"); document.getElementById('prechatForm').setAttribute('action', decodeURIComponent(endpointMatcher.exec(document.location.search)[1])); } if (window.addEventListener) { window.addEventListener('load', handlePageLoad, false); } else { window.attachEvent('onload', handlePageLoad, false); }})(); </script> <h1>Pre-chat Form</h1> <form method='post' id='prechatForm'> Last Name: <input type='text' name='liveagent.prechat.name' id='prechat_field' /><br /> Email Address: <input type='text' name='liveagent.prechat:Email' /><br /> Previous Case Number (if applicable): <input type='text' name='liveagent.prechat:CaseNumber' /><br /> Product: <select name="liveagent.prechat.buttons"> <option value="573C0000000Gmli">TestProduct</option> </select><br /> <!-- Creates an auto-query for a matching Contact record’s Email field based on the value of the liveagent.prechat:Email field --> <input type="hidden" name="liveagent.prechat.query:Email" value="Contact,Contact.Email"/> <input type="hidden" name="liveagent.prechat.query:CaseNumber" value="Case,Case.CaseNumber"/> <input type="hidden" name="liveagent.prechat.save:Email" value="Email__c" /> <input type='submit' value='Request Chat' id='prechat_submit'/> <style type="text/css"> p {font-weight: bolder } </style> </form> </apex:page>
I copied your highlight lines into my form. it is working
=======================================
<apex:page showHeader="false">
<!-- This script takes the endpoint URL parameter passed from the deployment page and makes
it the action for the form -->
<script type="text/javascript">
(function() { function handlePageLoad() {
var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)");
document.getElementById('prechatForm').setAttribute('action',
decodeURIComponent(endpointMatcher.exec(document.location.search)[1]));
} if (window.addEventListener) {
window.addEventListener('load', handlePageLoad, false);
} else { window.attachEvent('onload', handlePageLoad, false);
}})();
</script>
<h1>Pre-chat Form</h1><br/><br/>
<form method='post' id='prechatForm'>
<!-- Field Mapping between prechat form and salesforce
Name : Account.Name
Email Address: Account.PersonEmail
Product Model: Model__c.Name
Issue Description: Case.description
-->
<table border = "1" cellpadding="1">
<tr><th>Field Name</th><th>Field Value</th><th>Field Mapping</th>
</tr>
<tr><td>Name</td><td><input type='text' name='liveagent.prechat:Name' id='prechat_field' /></td><td>Account.Name</td>
</tr>
<tr><td>Email Address</td><td><input type='text' name='liveagent.prechat:Email' /></td><td>Account.PersonEmail</td>
</tr>
<tr><td>Product Mode</td><td><input type='text' name='liveagent.prechat:Modle' /></td><td>Model__c.Name</td>
</tr>
<tr><td>Previous Case Number (if applicable)</td><td><input type='text' name='liveagent.prechat:CaseNumber' /></td><td>Case.CaseNumber</td>
</tr>
<tr><td>Issue Description</td><td><input type='text' name='liveagent.prechat:Issue' /></td><td>Case.description</td>
</tr>
</table>
<input type="hidden" name="liveagent.prechat.query:Email" value="Account,Account.PersonEmail" />
<input type="hidden" name="liveagent.prechat.query:Modle" value="Model__c,Model__c.name" />
<input type="hidden" name="liveagent.prechat.query:CaseNumber" value="Case,Case.CaseNumber"/>
<input type="hidden" name="liveagent.prechat.save:Issue" value="Issue__c" />
<input type="hidden" name="liveagent.prechat.save:Email" value="Email__c" />
<!--<input type="hidden" name="liveagent.prechat.save:Issue" value="Case,Case.Subject"/>-->
<input type='submit' value='Request Chat' id='prechat_submit'/>
</form>
</apex:page>
=======================================.
I have the exact same problem as Thomas R. I can't explain why this isn't working, it's following the developer guide for Live Agent exactly. Code below for my Pre-Chat form, I've even hard-coded a Case Id, and it's still not querying anything. Each time I go through this pre-chat form, all it does is pop up a Create New Case page, and asks me to select a Record Type.
The lines in question are bold / italics. Can anyone explain why this doesn't work? What am I missing?