• Ian Fisher 15
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
We are using the out-of-the-box Embedded Service Chat SnapIn for Customer Community. Currently, we have configured the SnapIn to show the First Name, Last Name, Email Address and Subject Line.   The First Name, Last Name and Email Address fields are preloaded in the SnapIn when the customer initiates a chat.  We do this by clicking the "Fill in pre-chat fields" setting in the SnapIn component that is added to our Community pages.

The problem that we want to solve is to prevent the user from typing over the First Name, Last Name and Email fields because that would prevent a match on the Contact record in Salesforce when the case is created for the chat (i.e. there would be no contact record that is created and hooked into the newly created case).  I have pinged Salesforce about this and they say there is no way that we can make these fields read-only in the SnapIn.

However, I see in some of the articles that I have read on the developer forum that it might be possible (for example: https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_lightning_components_prechat_sample_aura.htm).

So far, I have tried the following with no success:

- Created a Javascript snippet file composed of the following code:

embedded_svc.settings.extraPrechatInfo = [{
      "entityFieldMaps": [{
        "doCreate": true,
        "doFind": false,
        "fieldName": "LastName",
        "isExactMatch": false,
        "label": "Last Name",
    "readOnly": true
      }, {
        "doCreate": true,
        "doFind": false,
        "fieldName": "FirstName",
        "isExactMatch": false,
        "label": "First Name",
    "readOnly": true
      }, {
        "doCreate": true,
        "doFind": true,
        "fieldName": "Email",
        "isExactMatch": true,
        "label": "Email",
    "readOnly": true
      }],
      "entityName": "Contact",
      "saveToTranscript": "Contact",
      "showOnCreate": true
    }];

- Created a Static Resource in Salesforce and loaded the above snippet file into that resource.

- In my SnapIn on the Community page, I have entered the name of the snippet file in the "Snippet Settings File" field of the SnapIn component.

However, the fields are still editable for the user when they start the chat.

Am I missing something, or is this not possible?  TIA.

Ian
We are using the out-of-the-box Embedded Service Chat SnapIn for Customer Community. Currently, we have configured the SnapIn to show the First Name, Last Name, Email Address and Subject Line.   The First Name, Last Name and Email Address fields are preloaded in the SnapIn when the customer initiates a chat.  We do this by clicking the "Fill in pre-chat fields" setting in the SnapIn component that is added to our Community pages.

The problem that we want to solve is to prevent the user from typing over the First Name, Last Name and Email fields because that would prevent a match on the Contact record in Salesforce when the case is created for the chat (i.e. there would be no contact record that is created and hooked into the newly created case).  I have pinged Salesforce about this and they say there is no way that we can make these fields read-only in the SnapIn.

However, I see in some of the articles that I have read on the developer forum that it might be possible (for example: https://developer.salesforce.com/docs/atlas.en-us.snapins_web_dev.meta/snapins_web_dev/snapins_web_lightning_components_prechat_sample_aura.htm).

So far, I have tried the following with no success:

- Created a Javascript snippet file composed of the following code:

embedded_svc.settings.extraPrechatInfo = [{
      "entityFieldMaps": [{
        "doCreate": true,
        "doFind": false,
        "fieldName": "LastName",
        "isExactMatch": false,
        "label": "Last Name",
    "readOnly": true
      }, {
        "doCreate": true,
        "doFind": false,
        "fieldName": "FirstName",
        "isExactMatch": false,
        "label": "First Name",
    "readOnly": true
      }, {
        "doCreate": true,
        "doFind": true,
        "fieldName": "Email",
        "isExactMatch": true,
        "label": "Email",
    "readOnly": true
      }],
      "entityName": "Contact",
      "saveToTranscript": "Contact",
      "showOnCreate": true
    }];

- Created a Static Resource in Salesforce and loaded the above snippet file into that resource.

- In my SnapIn on the Community page, I have entered the name of the snippet file in the "Snippet Settings File" field of the SnapIn component.

However, the fields are still editable for the user when they start the chat.

Am I missing something, or is this not possible?  TIA.

Ian

Hi All,

 

As shown below the  execution of the process order is right  r not?if not so Please do the changes and let me know.

 

Validation

Apex class

Triggers

Workflows

 

Thanks