Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

How to use with Fiori App #45

Description

@ya332

index.html in Fiori App doesn't import the SAP Conversational AI webchat script. I am trying to import my chatbot to my Fiori App. Docs say I need to put the following tag into the body tag of my index.html, <script src="https://cdn.cai.tools.sap/webchat/webchat.js" channelId="<Channel ID>" token="<token ID>" id="cai-webchat" ></script>

but in Fiori index.html imports don't work based on this post so one has to implicitly require the library in manifest.json or create a separate folder and put the library code in it.

I have read the docs and in React it is as easy as doing <import CaiWebchat from 'webchat';> and then one can provide the token IDs.

I came across to this post, but the OP doesn't need to provide any token IDs when importing the library. Also, the import is not from CDN unlike my case where I am trying to provide tokens and get the library from CDN. I tried putting the js code into a file and point to it in my manifest.json but without the token IDs it doesn't run.
Also, the issue #5 tells the same problem, but the OP seems to have a problem with url appending.
I also created a SAP question here
Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions