Repeat handlers allow users to define behavior that handles utterances like "Go back", "Start over", and so on.
This is done by configuring Repeat Handler objects:
The user chooses the types of repeat events we want to handle (currently, the only one that is supported is StartOver). If no events are selected, the handler triggers on all of them by default.
The user chooses the miniApps where the handled event can originate from. If no event sources are selected, the handler triggers on all of them by default.
The user selects one or more fields of the current Flow that should be dropped when this event occurs. Dropping these fields will result in the corresponding miniApps or Flows repeating and the fields being asked again.
Each Application and Flow have their own repeat handlers. This means that there are two sets of identical end-points:
one set under /apps/<app_id>/repeat-handlers/ for Apps;
and one under /flows/<flow_id>/repeat-handlers/ for Flows.
They both function in exactly the same way. The difference is which DiaManT Application we want the handling to happen in.
The failed status404 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 Repeat Handler
To delete a Repeat Handler, make a PUT request as below with payload empty list [].
All the messages below can also appear as warnings on Canvas if a change that causes the corresponding problems is introduced.
drop Fields are empty:
Example
JSON
{
"message": "A Repeat Handler has an empty Drop Field set. Please add at least one field to drop.",
"errors": {
"repeat_handler_errors": [
{
"type": "WARNING",
"code": "EMPTY_REPEAT_DROP_FIELDS",
"message": "A Repeat Handler has an empty Drop Field set. Please add at least one field to drop.",
"location": "repeat_handlers/0"
}
]
}
}
drop Field does not exist:
Example
JSON
{
"message": "Unknown field is referenced at a repeat handler. Field: <name of field> (drop field).",
"errors": {
"repeat_handler_errors": [
{
"type": "WARNING",
"code": "UNKNOWN_DROP_FIELD",
"message": "Unknown field is referenced at a repeat handler.",
"field": {
"field_type": "drop field",
"name": "<name of field>"
},
"location": "repeat_handlers/0"
}
]
}
}
a used Event Type does not exist:
Example
JSON
{
"message": "An invalid event type has been specified. Please select one of the available types. Field: <name of field> (event type).",
"errors": {
"repeat_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": "<name of field>"
},
"location": "repeat_handlers/0"
}
]
}
}
a used Event Source does not exist:
Example
JSON
{
"message": "A miniApp has been referenced as Event Source but it no longer exists. Please remove the reference. Field: <name of source> (event source).",
"errors": {
"repeat_handler_errors": [
{
"type": "WARNING",
"code": "UNKNOWN_EVENT_SOURCE",
"message": "A miniApp has been referenced as Event Source but it no longer exists. Please remove the reference.",
"field": {
"field_type": "event source",
"name": "<name of source>"
},
"location": "repeat_handlers/0"
}
]
}
}
Models
Repeat Handlers
Click to see the details
Name
Type
Description
error_types
array[string]
List of FailExitReasons (for example, "getMiniAppError", "InfoAsked_NotAvailable", "MaxNoInputs").