0

Pre-Chat form has a feature that tries to match the information entered, with existing records. If no match found, a record will be created and Chat transcript is associated with that record.

For some reason, record creation is not working in our sandbox. I have tried the same functionality in my trailhead playground, It is working as expected and the record is getting created.

I have done all the troubleshooting, checked profile, FLS on the fields, Record types, etc..but no luck. However, finding the existing records and associating chat transcript is working fine. Am I missing anything?

enter image description here

  • Can you paste a Pre-Chat form code? – Manish Anand Mar 29 at 20:57
  • @ManishAnand It's a standard Pre-Chat form, I am not using any custom Visualforce/ Lightning components. – Salesforce Developer Mar 30 at 2:57
1

Records that are created from the PreChat form are by "Automated Process" user (An internal Salesforce user). We cannot query this user details in Apex / Triggers.

We have a contact trigger, where there was a query on User object. Select Id, XXXXX FROM User WHERE id =: UserInfo.getUserId(). While PreChat is trying to create a record, it is failing here and stops not to create a record. Now, I've bypassed this trigger for Automated Process user. Then records are getting created without any error.

The tough part is there were no debug logs generated. Otherwise, this can be caught easily.

| improve this answer | |

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.