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.
These are executed sequentially if the ending type conditions apply.

Get Dialog End Handler(s)

GET /api/apps/<app_id>/dialog-end-handlers/

URL params

Name

Type

Description

Example

app_id

uuid

the Application's id that the error handlers belong to

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

Successful status: 200 OK

Return 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"
                }
            }
        }
    }
]

Failed status: 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 /api/apps/<app_id>/dialog-end-handlers/

URL params

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"
                }
            }
        }
    }
]

Successful status: 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"
                }
            }
        }
    }
]

Failed status: 404 NOT_FOUND

  • when 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, you make a PUT request as above, with payload empty list [].

Failed status: 400 BAD_REQUEST

The following errors may be returned by the API in case of misconfigured Dialog End Handlers:

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

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

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.