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

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

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .