Reputation: 1545
I'd like to know if I can make 2 webhook calls at the same time.
I have two cloud functions: 1) Inserting a user 2) Capture user inputs
How can I go about that using webhooks on watson assistant?
(I've already posted this question on the IBM developer forum but didn't get an answer.https://developer.ibm.com/answers/questions/520504/is-it-possible-to-make-two-webhook-calls-at-the-sa.html)
Upvotes: 1
Views: 998
Reputation: 17118
Right now, there is only a form to add a single webhook to the dialog node. The reason is that each call returns values which then need to be processed by the node. Thus, you cannot make them in parallel.
If you want to make two calls for the same input data, you could do one of:
There are probably even more options, it depends on the call semantics and whether your webhooks are dependent on results / inputs or not.
One of my code samples uses a dispatch semantic to call other functions. It can be done within the same action as shown for simplicity, calling into other functions (using composer) or using REST calls into other webhooks.
Upvotes: 1