Troubleshooting an embed
Nothing appears at all
The script did not load. Check its URL in the network tab: a 404 here is the most common cause, and it fails silently, because a custom element that is never defined is just an unknown tag.
The launcher appears in the wrong place
An ancestor of the element has a transform, filter or perspective, which makes it the containing block for the fixed-position panel. Move the tag to be a direct child of <body>.
The panel appears but every message fails
Look at what happened before the POST in the network tab.
-
An
OPTIONSrequest that failed, or aPOSTthat never left the browser: the page's origin is not inALLOWED_ORIGINS. Send us the exact origin (scheme, host and port, no path). The browser only says "CORS error"; the real message is in the403body:curl -i -X OPTIONS https://assistant.example.com/api/chat \-H "Origin: https://claims.example.co.uk" \-H "Access-Control-Request-Method: POST" -
A
401: theapi-keyattribute is missing or wrong for that deployment. -
Still failing after we added the origin: reload the page. Browsers cache preflight results, so the first attempt can keep failing against a server that is already fixed.
The assistant says no claim was supplied
The property was not set, or was set as an attribute. In the console:
document.querySelector('claimpilot-assistant').claim
It should return the claim object, not a string and not undefined.
The assistant answers about the wrong claim
The host re-rendered without re-assigning claim. Assign it whenever the claim on screen changes; the conversation resets when the id changes.
Answers are vague or say things are "not recorded"
That is the mapping. Check which sections are being sent against Claim mapping. Diary entries and document summaries make the biggest difference.
It looks wrong inside the host page
It should not be possible: the element renders in a shadow root and does not inherit the host's styling. If it happens, tell us what is visible and which browser.
Highlighting does nothing
- The element needs the
screen-actionsattribute. - The host page needs elements with
data-panel="<name>"using the recognised names. - Without the attribute, the assistant is never offered the highlight tool, so it will not try.
Voice never hears anything
Almost always a muted microphone or the wrong input device. The panel says so after a few seconds of silence. Check the browser's site permissions and the operating system's input device. Voice also needs HTTPS or localhost.
The feedback event never fires
Listen on the element itself, or on an ancestor: the event bubbles and is composed, so it crosses the shadow boundary. Check the listener is added before the user votes, and that the handler replaces by turnId rather than appending, because a changed vote arrives again with the same id.