Closed erocheleau closed 2 years ago
Is there any documentation how
window.postMessage( { message: dateValue, type: "chasitor.sendMessage" }, window.parent.location.href );
works? I can't find anything at the moment
Me neither, looks like a spoof of what the actual chat window receives as an event when the customer sends a chat message?
@erocheleau Have you looked at the user guide yet? https://quip.com/WM7AA3tXRsaf
I have found it afterwards yes, my bad.
But is there no other way to support this? As someone who wants to distribute a managed package using this feature, it is not really realistic to ask every client to copy a JS snippet in the header of their community.
You can close this as it isn't really related to this package anymore, but perhaps you could add that quip link to the readme?
Is there any other way to post the message as chasitor from the LWC to the bot?
I don't want to do:
window.postMessage({ message: dateValue, type: "chasitor.sendMessage" }, window.parent.location.href );
And use the script in the community page header.
This issue was resolved after reading the documentation :)
On my community or inside the bot preview, any component that are "replacing" the customer's input, for example the date picker, the survery, etc.
They all try to send a response to the bot back with
I see the event being fired, but nothing happens and the bot doesn't receive the customer's message so it just sits there waiting for an input.