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
Jonathan Hart 48Jonathan Hart 48 

How to link person account to case created in LiveAgent w/ findOrCreate.map.doCreate

Hi,

I did find this post that mentions this is possible, but it does not seem to be working.

We are using person accounts, which may be relevant.  When a liveagent client fills out the preform, I'm able to create a case and find a contact to link it succesfully to the case.  But I wish to link the person account because that is very important to the way we conduct business.

Does anyone have any hints on what I may be doing wrong?  Is it possible to link a person account to a case from the LiveAgent code?  If the action is failing, is there a way to log or debug what the issue might be?

THANK YOU!

Relevant code: 
<table>
   <tr><td> <b> First name: </b> <font color="red">*</font> </td><td><input type='text' required="true" name='liveagent.prechat:ContactFirstName' id='firstName' /></td></tr>
   <tr><td> <b> Last name: </b> <font color="red">*</font>  </td><td><input type='text'  required="true"  name='liveagent.prechat:ContactLastName' id='lastName' /></td></tr>
   <tr><td> <b> Email: </b> <font color="red">*</font>  </td><td><input type='text'  required="true"  name='liveagent.prechat:ContactEmail' id='email' /></td></tr>
   <tr><td> <b> Local Name: </b> </td><td><input type='text' name='liveagent.prechat:LocalName' id='localname' /></td></tr>
   <tr><td> <b> Topic for Chat: </b> <font color="red">*</font>  </td><td><input type='text'  required="true" name='liveagent.prechat:CaseSubject' id='subject' /></td></tr>
   <tr><td> </td><td> <input type='submit' value='Chat Now' id='prechat_submit' onclick="setName()"/></td></tr>
</table>

<input type="hidden" name="liveagent.prechat.AccountRecordTypeID" value="HIDDENFORPOST" />

<input type="hidden" name="liveagent.prechat.findorcreate.map:Account" value="FirstName,ContactFirstName;LastName,ContactLastName;PersonEmail,ContactEmail;RecordTypeID,AccountRecordTypeID" />


<input type="hidden" name="liveagent.prechat.findorcreate.map.doFind:Account" value="Email,true" />
<input type="hidden" name="liveagent.prechat.findorcreate.map.isExactMatch:Account" value="Email,true" />
<input type="hidden" name="liveagent.prechat.findorcreate.map.doCreate:Account" value="FirstName,true;LastName,true;Email,true;RecordTypeID,true" />

<input type="hidden" name="liveagent.prechat.findorcreate.linkToEntity:Account" value="Case,AccountId" />