Opening Hours
Last updated
Last updated
Available lang-locales: de (Germany)
and en (North America)
The Opening Hours service extension enables the user to retrieve information about a business's or a branch's working hours for a given date and time. It provides flexibility in querying opening hours based on a calendar configuration. Additionally, you can specify hours for specific departments to obtain more precise information for the caller.
success
: Confirms valid retrieval of opening hours.
fail
: Signals unsuccessful retrieval of opening hours.
Add the service to your dialog as usual. A sample input set is shown below:
When creating opening hours configurations inside a JavaScript block, make sure to use JSON.stringify(<yourObject>) before you pass it into the Service!
The simple method of calendar configuration. Separate each day or date with a newline. Reasons for being open/closed can be added in round brackets in the end of each day/date. Does not support configuration of departments. An example of the object inside the Service field config
is given below:
Basic request with text config field and no department:
Output: Everything is stored outside the object result
The following example shows a way which can be used to retrieve the result data from the output. In the case of a successful response, the output is stored in 6 separate variables inside the service output. We don't need to use any other block to control the variables of our output.
The following image shows how the result can be used from the service variable openNow
,assigned to storage variable VertriebOpenNow
to control a Condition Block. In this case we have two branches which decide the flow of the dialog in depending on the result.