Support » Plugin: IBM Watson Assistant » Using a client action

  • I’m trying to make a custom call to an existing external API (not in IBM CloudFront) using the client type API call using the details at the link.

    Looking at the response, I can see the name & client calls come back in the response object from Watson API calls – but I can’t see how to build this out to do what I need.

    Does the “MyWeatherFunction” in the linked example need to be a JS function? A PHP function? A URL endpoint on the WordPress install? What should it accept/return/output?

    I can’t use CloudFront functions as my assistant is in Sydney, where the data functions can’t be hosted, hence the requirement for a client resolution.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support intelahelp


    Hello @fychan66. Thanks for asking your question.

    Dialog action can be either PHP or Javascript function depending on your implementation. Application (either PHP or Javascript) should:

    1. Detect the incoming action
    2. Extract parameters from action
    3. Process an action using parameters
    4. Return the action’s result to Watson Assistant in context variable named in action’s “result_variable” field

    Unfortunately, we don’t have simple and straightforward support for actions yet, but you may add them in either Javascript code that handles interactions with server or PHP code that handles interaction between your Worpdress server and Watson Assistant. You can see the code in our Github repository. If you will edit our Javascript code, it may be useful to check out React’s website and complete the initial tutorial to understand React’s core principles because our chatbox is implemented using React.

    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.