3

I am trying to set some data in the PreChat of LiveAgent, and it works for every detail, except for the caseRecordType:

<form method="post" id="prechatForm">
    <label for="socialChatSubject">Chatonderwerp:</label>
    <textarea rows="4" name="liveagent.prechat:subject" id="socialChatSubject" placeholder="Max. 300 karakters" />

    <!-- Map the detail inputs to the Contact fields -->
    <input type="hidden" name="liveagent.prechat:caseOrigin" value="Chat" />
    <input type="hidden" name="liveagent.prechat:caseRecordType" value="Social_Media_ORG" />
    <input type="hidden" name="liveagent.prechat:lvl_1" value="Overig" />
    <input type="hidden" name="liveagent.prechat:lvl_2" value="Smartlife" />
    <input type="hidden" name="liveagent.prechat.findorcreate.map:Case" value="Origin,caseOrigin;RecordType,caseRecordType;Subject,subject;lvl_1__c,lvl_1;lvl_2__c,lvl_2;" />


    <!-- Try to find the Case by CaseNumber (exact match) -->
    <input type="hidden" name="liveagent.prechat.findorcreate.map.doCreate:Case" value="Origin,true;RecordType,true;Subject,true;lvl_1__c,true;lvl_2__c,true;" />

    <!-- Show the Contact when it is found or created -->
    <input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Case" value="true" />

    <input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Case" value="Case" />

    <input type="submit" value="Begin met chatten" id="prechatFormButton" class="button-blue" />
</form>

There are multiple options set in our Salesforce system for caseRecordType, and the option 'Social_Media' is the default option. In this case I would like to override the default option and make sure option 'Social_Media_ORG' is chosen in the prechat. But that doesn't work.

What am I missing here?

Many thanks in advance!

2
  • You must use Name values, not DeveloperName. Which do you reference in your post?
    – Adrian Larson
    May 24, 2016 at 21:01
  • Record Type Label: Social Media ORG , Record Type Name: Social_Media_ORG , Name for Case Record Type: Record Type , DeveloperName for Case Record Type in the code: caseRecordType
    – Nicole
    May 26, 2016 at 8:30

1 Answer 1

0

I created a quick fix by adding caseDivision to the PreChat.
It works now, but I'm not sure why.
And it looks like a bit of a dirty hack to me..

<input type="hidden" name="liveagent.prechat:caseDivision" value="ORG chat" />
<input type="hidden" name="liveagent.prechat.findorcreate.map:Case" value="Origin,caseOrigin;RecordType,caseRecordType;Subject,subject;lvl_1__c,lvl_1‌​;lvl_2__c,lvl_2;Division__c,caseDivision" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.