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
Komal WaghKomal Wagh 

What are different API's available in Snap-Ins?

For example in live agent, we can use:
<input type='text' name='liveagent.prechat:UserEmail' id='email' /><br />
<input type="hidden" name="liveagent.prechat.findorcreate.map:Account" value="Email,UserEmail"/>

So in Snap-ins how this can be achieved?
Raj VakatiRaj Vakati
Refer this code
https://developer.salesforce.com/docs/atlas.en-us.214.0.snapins_web_dev.meta/snapins_web_dev/snapins_web_prechat_code_examples.htm
embedded_svc.settings.extraPrechatInfo = [{
  "entityFieldMaps": [{
    "doCreate":false,
    "doFind":true,
    "fieldName":"LastName",
    "isExactMatch":true,
    "label":"Last Name"
  }, {
    "doCreate":false,
    "doFind":true,
    "fieldName":"FirstName",
    "isExactMatch":true,
    "label":"First Name"
  }, {
    "doCreate":false,
    "doFind":true,
    "fieldName":"Email",
    "isExactMatch":true,
    "label":"Email"
  }],
  "entityName":"Contact"
}];

 
Komal WaghKomal Wagh
Yes,but through extraPrechatInfo we can provide static values. But we want to accept the user input from radio type input and store the value in the text field and also we want to use the different object other than case, contact and lead.So how to dynamically store user accepted input in field. 
And wants to create account dynamically when every time contact and case is created.

For example:
<input type="radio" value="Bonuses"  id='subject1'/>Bonuses<br/>
<input type="radio" value="Deposits" />Deposits<br/>
<input type="radio" value="Withdrawals" />Withdrawals<br/>

Please suggest!