Skip to main content
Skip table of contents

Event Handlers

Event Handlers feature allows to create configurations which can handle the following:

  • the occurred errors during the Dialog that may cause the unintentional end of conversation;

  • the cases when the caller wants to repeat the conversation or start it over from a certain step.

It is all possible with Error and Repeat functions of the Event Handlers feature.

Error Handlers Function

The Error function of the Event Handlers allows channeling a conversation to a preconfigured Flow that will be played once the predefined error happens. Since the Error Handlers help managing multiple types of errors, you can configure different Flows to cover the possible scenarios at any point of the conversation.

For example, if the caller doesn’t respond to a question asked by a certain miniApp a number of times, it is possible to build a Flow and configure the Announcement miniApp inside containing the “Please, repeat!” message. You can then place it in the Error Handler drop zone, so this Flow will be played when this exact error happens, so the conversation will still be logically channeled.

It is possible to configure a default Error Handler with a Flow that will be played when any type of error appears. Also, define the error type and the miniApp it will occur in, and configure an Error Handler with a Flow that will handle it respectively. Multiple Error Handlers can be applied at the same time.

Orchestrator provides all miniApps error types found in the Fail Exit Reasons document.

To create a default Error Handler, read the Configure default Error Handler section. To create an Error Handler with multiple errors, check out the Configure specific Error Handler section.

Configure Default Error Handler

  1. Create a Flow that will be used for the error handling purpose. Build a Flow by clicking on the +Add button under the expandable Flow section to the left, fill in the corresponding fields, and click Save when finished.

image-20240813-131508.png

2. This Flow can contain any building block. For example, if the Announcement miniApp is selected, it will be played when any type of error happens. Configure the miniApp in the OCP miniApps like you did in the Getting Started with Orchestrator guide to ask the caller “Please repeat!”. Click on the Flow you created in the Flows tab to open it in a separate tab in the canvas and drag and drop the miniApp onto the canvas.

image-20240813-132314.png
image-20240813-132611.png

3. Configure the miniApp values accordingly and click Save.

image-20240813-132914.png

4. Click the Event Handlers to open the drawer on the right.

image-20240813-133410.png

5. In the Errors tab, drag and drop a configured Flow into the drop zone. This Flow will be played any time the following happens: “This flow will be executed if no other event handler matches”.

image-20240813-133544.png

6. If you want to change the Flow’s setting or remove it, click the Options icon next to the Flow’s name, and choose Configure, or select Remove if you want to delete it.

image-20240813-133629.png

Upon selecting the Configure option, it is possible to change the Flow’s settings by adding or deleting them. Some inputs and outputs can be marked as Optional. Read about the Flow’s Optional Fields for more information. Click Set to apply the changes.

image-20240813-133810.png

If any type of error happens at any point of the conversation, the default errorHandlers with the preselected Flow will be played.

Configure Specific Error Handler

  1. Click the + Add Handler button to select any specific type of error or add multiple error types to be handled.

image-20240813-134932.png

2. The Event Handler menu with the Event Types (the type of the event that triggers the usage of the Event Handler) and Event Sources (the miniApps where the Event Handler will be used) opens. Select one or more Event Types of errors from the dropdown, where they are listed alphabetically.

image-20240813-135013.png

3. Select the Event Source from the lower dropdown. The Event Source allows to select the miniApps in which the error can occur and contains a list of all the miniApps that are used in the Dialog Application.

It is possible to select multiple Event Sources for multiple Event Types to be handled by one Flow.

image-20240813-135259.png

4. Select a Flow from the Flows left sidebar menu and drag and drop it to the drop zone to be played once the error Event Type occurs in the preselected miniApp. Click Save to finish.

If the Event Type is not specified, then the Event Handler will run for any Event Type. If the Event Source is not specified, it will run for all Event Sources.

image-20240813-135418.png

It is possible to change the output data of the Flow in the Error Handlers, so it could be later used to execute Transfers from this Flow.

To change the output of the Flow, follow the steps below:

  1. Click the Options menu icon in the right upper corner of the Flow and select Configure.

image-20240813-135527.png

2. In the opened form, change the output value and click Set to apply changes.

image-20240813-135912.png

It is possible to have different combinations of the Error Handlers at the same time. If there are multiple Error Handlers, a priority of execution is set to avoid overlapping.

For example, what will happen if there is a Handler with error event type MaxNoInputs and the other one with event source miniApp_1, while the miniApp_1 exits after a MaxNoInputs event?
The way Error Handlers are prioritized is the following, from highest to lowest priority:

  1. An Error Handler with predefined Event Types and Event Sources is executed primarily.

  2. An Error Handler with predefined Event Sources and empty Event Types is executed secondarily.

  3. An Error Handler with predefined Event Types and empty Event Sources is executed thirdly.

Configure Flow with miniApps as Event Source

If the Flow contains a miniApp or multiple ones, it can also be used as the Event Source.

Before using the Flow with miniApps as the Event Source, make sure it is a part of the Dialog Application.

  1. Create a Flow that contains a miniApps or a few.

image-20240813-141047.png

2. Open the Error Handlers drawer, click the + Add Handler button, and select the targeted Flow from the Event Source dropdown menu.

image-20240813-141715.png

It is possible to configure the Error Handler for the miniApp within the Flow regardless of the separate configurations of miniApp or within another Flow.

  1. Drag and drop the Flow in the drop zone and click Save. When any of the predefined errors appear, this Flow will be played.

image-20240813-141907.png

Repeat Handlers Function

The Repeat function of the Event Handlers feature provides the ability to repeat or start over the conversation by identifying specific phrases that indicate the caller wants to start over or go back.

For example, if the caller says: “It’s not what I meant, I’d like to start over”, the NLU recognizes it as a phrase that triggers the Start Over functionality. When the Start Over is triggered, it clears all the predefined values in the scope of the Dialog, so they can be substituted with the new ones the next time the Dialog plays from the beginning.

If the Repeat Handler is not preconfigured, but the caller still says the trigger phrase, the Dialog will be started from the Intent miniApp. However, if the Intent miniApp hasn’t been used yet, the Dialog will be played from the first building block on the canvas.

 To configure the Repeat function of Event Handlers feature, follow the next steps:

  1. Click the Event Handlers tab on the right, switch to the Repeat tab and click the + Add Handler button.

image-20240813-142450.png

2. Select the Event Type and Event Source from the dropdown.

If the Event Type is not specified, then the Repeat Event Handler will run for any Event Type. If the Event Source is not specified, it will run for all Event Sources.

image-20240813-143122.png

3. Add and select any Drop Fields from the dropdown menu. These are the fields that will be cleared when any of the configured events take place.

image-20240813-143232.png

If a miniApp or a Flow contains non-optional output fields and these fields are specified in the Drop Fields, a miniApp or a Flow will still repeat with the new values.

If the Flow with the Repeat Handlers is placed inside another Flow that has its own Repeat Handlers, the Repeat Handlers of the child Flow has the higher priority and will be executed.

Dialog End Handlers Function

The Dialog End function of the Event Handlers is triggered once the dialog ends, either on purpose or due to any error, and allows to pass data from a user via Intelli or WebService types of miniApps.

For example, if an Orchestrator user wants to make an API call after the dialog ends and send back some reports, it is possible to use the Dialog End function to make an API call to their own endpoints to collect data about the call at any point it can end. This function helps collect the preconfigured miniApps that gather call data in one block (for example, every single intent of the call) and, thus, avoid multiple usage of miniApps to serve a particular task.

To configure Dialog End function, follow the steps below:

  1. Open the Event Handlers tab and switch to the Dialog End tab.

  2. Click the + Add Handler button at the bottom to add a new function.

image-20240813-143540.png

3. Configure the handler by setting the following values:

  • Ending Type - Select the type of call ending from the dropdown menu that will trigger the execution of the Dialog End function:

    • TRANSFER - The call was transferred

    • SYSTEM ERROR - Any fatal error occurred in the system

    • NEAR_HUP - System Hang Up

    • FAR_HUP - Caller Hang Up

    • ERROR_SESSION_TIMEOUT - The call was terminated due to dialog’s inactive session timeout

    • TEARDOWN - The error sent by deepASR when the connection between deepASR and IVR is closed.

image-20240813-143725.png
  • Related miniApp - drag and drop the miniApp of either WebService or Intelli type that will be executed after the dialog ends.

image-20240813-143905.png

It is possible to add multiple Dialog End functions that can handle different types of dialog endings (normal or due to error), each containing the corresponding miniApp, and they will be executed according to the order.

image-20240813-144033.png

You can edit the default names of the Handler functions or delete any of them by clicking the corresponding buttons.

image-20240813-144300.png
  1. Click Save when finished.

It is possible to pass values between miniApps contained in the Dialog End function by configuring them.

To pass values between miniApps contained in the Dialog End function do the following:

  1. Click the Options menu on the right of the selected miniApp to configure it.

image-20240813-144434.png
  1. In the opened window, configure the Input and Output fields to pass values to another miniApp. Click Save when finished.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.