I'm trying to build a custom prechat page for live-agent (specifically on an external webpage, not on a community or on a Force.com Site) so that I can manually define the behaviour when a user connects to an agent. I want to dedupe against existing contacts and if none exist, create a new lead.
I can't find any documentation for LWC or Lightning Components, just for a Visualforce page which achieves this. I've tried adding the VF Page to the chat button but this hasn't displayed the prechat page on the external site, and I've tried wrapping the VF page in a Lightning Component using an iframe, but am runnning into issues with the X-Frame Options policy being set to "deny" which blocks the prechat page from loading at all.
Any advice on how to implement a custom prechat page on an external website would be greatly appreciated.