Skip to main content
Skip table of contents

Dialog End Handlers

Dialog End handlers allow users to specify a number of Intelli/WebService miniApps they want to call after the dialog ends. They are executed sequentially if the ending type conditions apply.

Get Dialog End Handlers

GET

{{baseUrl}}/orchestrator/api/apps/<app_id>/dialog-end-handlers/

Gets the Dialog End Handlers.

Click to see the details

URL Parameters

Name

Type

Description

Example

app_id

uuid

The Application's id that the Dialog End handlers belong to.

"9b399774-3a0a-40c1-8a1c-4a124170b6f3"

Response (Success)

JSON
HTTP/1.1 200 OK

Returns the list of Dialog End Handlers.

Example

JSON
[
    {
        "handler": {
            "name": "Authenticate",
            "nodeType": "miniApp",
            "component_id": "54d1fc80.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "NEAR_HUP"
        ]
    },
    {
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "other_value_1",
                    "input_2": "other_value_2",
                    "input_3": "other_value_3"
                }
            }
        }
    },
    {
        "error_types": [
            "TRANSFER",
            "NEAR_HUP"
        ],
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "one"
                }
            }
        }
    }
]

Response (Failed)

JSON
HTTP/1.1 404 NOT_FOUND

Create/Update Dialog End Handlers

Creating and updating Dialog End Handlers happens through the same PUT request by updating the list of Dialog End Handlers.

PUT

{{baseUrl}}/orchestrator/api/apps/<app_id>/dialog-end-handlers/

Creates/updates the Dialog End Handlers.

Click to see the details

URL Parameters

Name

Type

Description

Example

app_id

uuid

The Application's ID that the error handlers belong to.

"9b399774-3a0a-40c1-8a1c-4a124170b6f3"

Request Payload

List of Dialog End Handlers.

Name

Type

Default

Description

Required

error_types

array[string]

-

Ending type(s) that trigger the dialog end handler. If multiple are specified, they are combined with OR conditions.

no

error_sources

array[string]

-

(Not applicable. This field will be ignored.)

no

handler

object

-

Component that handles the error occurrence. Must be an Intelli or WebService miniApp.

yes

Example

JSON
[
    {
        "handler": {
            "name": "Authenticate",
            "nodeType": "miniApp",
            "component_id": "54d1fc80.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "NEAR_HUP"
        ]
    },
    {
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "other_value_1",
                    "input_2": "other_value_2",
                    "input_3": "other_value_3"
                }
            }
        }
    },
    {
        "error_types": [
            "TRANSFER",
            "NEAR_HUP"
        ],
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "one"
                }
            }
        }
    }
]

Response (Success)

JSON
HTTP/1.1 201 CREATED

List of Repeat Handlers.

Example

JSON
[
    {
        "handler": {
            "name": "Authenticate",
            "nodeType": "miniApp",
            "component_id": "54d1fc80.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "NEAR_HUP"
        ]
    },
    {
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "other_value_1",
                    "input_2": "other_value_2",
                    "input_3": "other_value_3"
                }
            }
        }
    },
    {
        "error_types": [
            "TRANSFER",
            "NEAR_HUP"
        ],
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "one"
                }
            }
        }
    }
]

Response (Failed)

JSON
HTTP/1.1 404 NOT_FOUND

The failed status 404 NOT_FOUND can be returned if the group access privileges constraint is violated (the application is under a group to which the user does not have access privileges).

Delete Dialog End Handler

To delete a Dialog End Handler, make a PUT request as below with payload empty list [].

PUT

{{baseUrl}}/orchestrator/api/apps/<app_id>/dialog-end-handlers/

Creates/updates the Dialog End Handlers.

Click to see the details

Response (Failed)

JSON
HTTP/1.1 400 BAD_REQUEST

All the messages below can also appear as warnings on Canvas save if a change is introduced that causes the corresponding problems.

  • handler miniApp is not defined:

    Example

    JSON
    {
        "errors": [
            {
                "code": "type_error.none.not_allowed",
                "detail": "none is not an allowed value",
                "source": "handler"
            }
        ]
    }
  • a used ending type does not exist:

    Example

    JSON
    {
        "message": "An invalid event type has been specified. Please select one of the available types. Field: DOES_NOT_EXIST ( event type).",
        "errors": {
            "dialog_end_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_EVENT_TYPE",
                    "message": "An invalid event type has been specified. Please select one of the available types.",
                    "field": {
                        "field_type": " event type",
                        "name": "DOES_NOT_EXIST"
                    },
                    "location": "dialog_end_handlers/0"
                }
            ]
        }
    }
  • a miniApp used as event handler is not of a valid type:

    Example

    JSON
    {
        "message": "This miniApp type is not a valid handler for Dialog End events. Please use an Intelli or WebService miniApp.",
        "errors": {
            "dialog_end_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "INVALID_DIALOG_END_HANDLER_TYPE",
                    "message": "This miniApp type is not a valid handler for Dialog End events. Please use an Intelli or WebService miniApp.",
                    "location": "dialog_end_handlers/0"
                }
            ]
        }
    }
  • a field that does not exist has been used as input to a dialog end handler:

    Example

    JSON
    {
        "message": "Unknown field is referenced at node configuration. Field: DOES_NOT_EXIST (input).",
        "errors": {
            "dialog_end_handler_errors": [
                {
                    "type": "WARNING",
                    "code": "UNKNOWN_FIELD_REFERENCED",
                    "message": "Unknown field is referenced at node configuration.",
                    "field": {"field_type": "input", "name": "DOES_NOT_EXIST"},
                    "location": "dialog_end_handlers/handlers/1"
                }
            ]
        }
    }

Models

Dialog End Handlers

Click to see the details

Name

Type

Description

error_types

array[string]

The list of ending types.

error_sources

array[string]

(Not applicable. This field will be ignored.)

handler

Nested Dialog End Handler

The nested handler config.

Possible Ending Types

The possible values for ending types are:

JSON
[
    "NEAR_HUP",
    "TRANSFER",
    "TEARDOWN",
    "ERROR_SESSION_TIMEOUT",
    "FAR_HUP",
    "SYSTEM_ERROR"
]

Dialog End Handler.Handler

Click to see the details

Name

Type

Description

component_id

string

The component id of the component that handles the dialog end occurrence.

configuration

object

The input variables for the handler component.

Example

JSON
[
    {
        "handler": {
            "name": "Authenticate",
            "nodeType": "miniApp",
            "component_id": "54d1fc80.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {},
                "output_fields": []
            }
        },
        "error_types": [
            "NEAR_HUP"
        ]
    },
    {
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "other_value_1",
                    "input_2": "other_value_2",
                    "input_3": "other_value_3"
                }
            }
        }
    },
    {
        "error_types": [
            "TRANSFER",
            "NEAR_HUP"
        ],
        "handler": {
            "component_id": "54d1fc80-4627-4517-9dbc-2cef8dca0650.Authenticate.WebService.MiniApps.flowteam",
            "configuration": {
                "input_fields": {
                    "input_1": "one"
                }
            }
        }
    }
]
JavaScript errors detected

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

If this problem persists, please contact our support.