Question about if TWC is using iframe to deploy


I have a question about the way of deploying TWC in the website. If it is using iframe when we deploy it by the method which is stated in the AS website? Because the website owner doesn’t want to use iframe to deploy the chatbot. If it doesn’t use the iframe, what is the way it is using now(embed? object? or others)?

Best regards

Hi. TWC does not need any iframes. You pass an empty div as the first argument to the initialization function:

const element = document.getElementById('teneo-web-chat');
const teneoProps = {
	teneoEngineUrl: 'https://some.teneo/engine-instance/',
window.TeneoWebChat.initialize(element, teneoProps); 

This fills the mentioned div with HTML objects representing the TWC frontend.

To place TWC in an iframe, please check the solution suggested here:

Thanks for the reply. That helps me a lot.

Hi Alexander,
I want to confirm if I understand correctly about your answer:

We pass an empty div as the first argument to the initialization function which will read HTML objects by interacting with teneo-web-chat.js and fills them in the empty div to represent TWC frontend. So the whole process will be pure js and html, right?

Additional question: the website owner prefers to use AEM component to deploy the twc, do you have any ideas about it?

Best regards

Hi. Yes, it is only JS and HTML dynamically created and modified by this JS. Regarding iframes, you don’t need them in order to deploy TWC, but TWC can create its own iframes within its div in order to display certain types of content, like videos for example.

Regarding AEM, if it interferes with the TWC HTML object or with its events, it can break the frontend. The TWC HTML structure may only be created and changed by the TWC JavaScript code. So if some external code changes it, it might cause dysfunction.

1 Like

Thanks for the explanation.

1 Like