简体   繁体   中英

Triggering an Api.ai event through a external server

It is needed to send an alert to the chat after a timer has started.

Scenario:

  • Remind me to call Bob in 5 minutes
  • OK, will remind you in 5 minutes

After this dialog fulfillment server will start a timer and when the time goes off, event is to be triggered.

But when using the event api in API.ai will not trigger a message to the chat window which was built using the JS api.

Is there a another way to achieve this.

This is very much possible. In the intents that you setup on API.ai, use @sys.time so that 'call me in 5 minutes' will return a time like 14:05:00. You can use this parameter to start a timer on your JS script and send the message when timer expires.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM