Support » Plugin: IBM Watson Assistant » Can we add custom HTML/Js in a message using wordpress plugin?

  • My usecase: I want to integrate a Stripe payment gateway in the watson assistant. In the chat flow after adding the product into a buy list, I want to process the payment using Stripe. For processing the Stripe payment on frontend, I need to execute some javascript and add custom “buy” button in a Watson message. Can we do that? If yes how can we do that?

    • This topic was modified 4 months, 4 weeks ago by  satvikbhai.
Viewing 1 replies (of 1 total)
  • Plugin Support intelahelp


    Hello @satvikbhai. Thanks for reaching out to us.
    Yes, you can add custom HTML/JS code to your dialog responses by adding HTML code to your dialog node’s response text. To see the example in action you can set the dialog node’s response text to JS execution example <button id="someButton" onclick="javascript:alert('JS code execution')">Show alert</button>. It will show the button that calls Javascript alert function on click. Please note that it won’t work in “Try it” panel in Watson Assistant dashboard on IBM’s website, but it will work okay on WordPress site.

    Plugin screenshot
    Dialog node editor screenshot

    If you have any more questions, don’t hesitate to ask them.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.