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
Jeff Hutchinson 17Jeff Hutchinson 17 

How to perform a conditional search of Leads and Accounts based on Live Agent pre chat form

I have successfully implemented Live Agent with a pre-chat page on an external website. Currently, a Case is created and attached to every chat transcript. I would like to be able to search for a person account based on the pre-chat information to attach to the case and person account and if a person account is not found search for a lead and if a lead is not found then create one.

An alternative solution would be to add a field where the chat visitor can indicate if they already have an account and then search person accounts if they do and leads if they do not. If possible, I would like to avoid this solution because someone will always enter the wrong information.