How to allow intercom to communicate with an other javascript library

How on a button click by the user, we can communicate the user response to another javascript library.

I found that Helphero is doing it to start a product tour based on user choice.
https://www.intercom.com/app-store/?app_package_code=helphero

And upscope is also doing it:

Hey @Nikhil_Rayaprolu :wave:

So they are using our Canvas Kit framework which allows you to send embeddable apps through the Messenger to customers/contacts you have. You can use a button component with an action - whether it is to submit (to take an action your side and then render a new canvas), link to a separate URL, or to open a Sheet (an embeddable webpage in the Messenger). We will send a payload with information on the actions (alongside stored data you’ve specified) for all these.

@zach, so do we need to make a client-server request from intercom and then again communicate the response to the other client library (by using websockets)?

So when someone interacts with a Canvas Kit component, Intercom will send a webhook request to the URL you provide us with, which you must handle and subsequently take any actions your side + respond to successfully. This may look like somebody clicking a button in your app within the Messenger, you handling the request we send you as a result of this action, and communicating the details of the user response contained within that request to the other client library :ok_hand: