0

We have a need to make decisions within Watson Dialog based on the current time of day. Is there a good/best practice way of doing that? I thought of periodically writing the current time into a Dialog profile variable but am hoping there is a better way.

Jim Hoskins
  • 270
  • 1
  • 9

1 Answers1

1

Just for any other readers, this is for the now deprecated Watson Dialog Service, NOT the dialog piece inside the Conversation service (which was inspired by the old dialog, but is different...)

anyway, I think youre right unfortunately. because the profile variables and user messages are separate methods here, you need to make sure the profile is up to date before you respond. Another option would be in your dialog node give multiple responses in some format your app knows what to do with ie

<morning> good morning!</morning> <afternoon> good afternoon!</afternoon>

and then your app will see that response, and based on the time give the right message at runtime. This obviously requires more complex app code, but reduces the number of trips to the service.

Mitch
  • 849
  • 4
  • 4