Interface ExternalRoutingConnector
-
public interface ExternalRoutingConnector
TheExternalRoutingConnector
is an interface to provide functionality of an external routing in order to delegate the routing responsibility of issues to an external platform. TheExternalRoutingConnector
offers service functions and also event handling by adding event listeners to react to specific external routing events. Each implementation of the interfaceExternalRoutingConnector
must be annotated with the annotationExternalRoutingConnectorPlugin
to be loaded during runtime within the novomind iAGENT routing process.- Since:
- 11.29
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
cancelRoutingRequest(RoutingWorkItem routingWorkItem)
Cancel the routing request associated with aRoutingWorkItem
.void
configurationChanged(ExternalRouting externalRouting)
The method is called when theExternalRouting
of theExternalRoutingConnector
has changed.void
connect()
The method is called after the initialization has been completed.RoutingWorkItemState
getRoutingWorkItemState(RoutingWorkItem routingWorkItem)
Retrieve the state of aRoutingWorkItem
.void
init(ExternalRouting externalRouting, RoutingWorkItemDecisionEventListener workItemRoutingDecisionEventListener)
The init method is called to initialize anExternalRoutingConnector
The method will be called after a new instance of anExternalRoutingConnector
has been created.void
release()
The method will be called when theExternalRoutingConnector
is disposed e.g.default void
routingWorkItemDeliveryFailed(RoutingWorkItemDeliveryFailedEvent routingWorkItemDeliveryFailedEvent)
Notifies the connector that the routing decision of the connector could not be fulfilled and theRoutingWorkItem
could not be delivered to the desired agent e.g.default void
routingWorkItemDeliverySuccessful(RoutingWorkItemDeliverySuccessfulEvent routingWorkItemDeliverySuccessfulEvent)
Notifies the connector that the routing decision of the connector has been fulfilled successfully and theRoutingWorkItem
has been delivered to the desired agent by novomind iAGENT system.RoutingWorkItem
startRoutingRequest(ChatRoutingRequest chatRoutingRequest)
Start a new routing request for a chat.RoutingWorkItem
startRoutingRequest(TicketRoutingRequest ticketRoutingRequest)
Start a new routing request for a ticket.
-
-
-
Method Detail
-
init
void init(ExternalRouting externalRouting, RoutingWorkItemDecisionEventListener workItemRoutingDecisionEventListener) throws ExternalRoutingException
The init method is called to initialize anExternalRoutingConnector
The method will be called after a new instance of anExternalRoutingConnector
has been created.- Parameters:
externalRouting
- theExternalRouting
instance provides storage and configuration for the connectorworkItemRoutingDecisionEventListener
- the event listener for thisExternalRoutingConnector
- Throws:
ExternalRoutingException
- if any error occurs during initialization- Since:
- 11.29
-
connect
void connect() throws ExternalRoutingException
The method is called after the initialization has been completed. The implementation of anExternalRoutingConnector
should establish any kind of permanent remote connections within this method.- Throws:
ExternalRoutingException
- if any error occurs on connecting to the external platform- Since:
- 11.29
-
configurationChanged
void configurationChanged(ExternalRouting externalRouting)
The method is called when theExternalRouting
of theExternalRoutingConnector
has changed.- Parameters:
externalRouting
- theExternalRouting
instance that has changed- Since:
- 11.29
-
release
void release()
The method will be called when theExternalRoutingConnector
is disposed e.g. on system shutdown or before being replaced.- Since:
- 11.29
-
startRoutingRequest
RoutingWorkItem startRoutingRequest(TicketRoutingRequest ticketRoutingRequest) throws ExternalRoutingRequestException
Start a new routing request for a ticket. In case of aExternalRoutingRequestException
the novomind iAGENT system will retry to start a new routing request for this ticket within an appropriate period of time. IMPORTANT NOTE: Please ensure not to implement this method blocking. Any synchronous long term operations performed in the method implementation could affect the general system performance and should be avoided.- Parameters:
ticketRoutingRequest
- the request object provides all information about the ticket- Returns:
- the
RoutingWorkItem
for the routing request - Throws:
ExternalRoutingRequestException
- in case of operation failure or broken connection- Since:
- 11.29
-
startRoutingRequest
RoutingWorkItem startRoutingRequest(ChatRoutingRequest chatRoutingRequest) throws ExternalRoutingRequestException
Start a new routing request for a chat. In case of aExternalRoutingRequestException
the novomind iAGENT system will retry to start a new routing request for this chat within an appropriate period of time. IMPORTANT NOTE: Please ensure not to implement this method blocking. Any synchronous long term operations performed in the method implementation could affect the general system performance and should be avoided.- Parameters:
chatRoutingRequest
- the request object provides all information about the chat- Returns:
- the
RoutingWorkItem
for the routing request - Throws:
ExternalRoutingRequestException
- in case of operation failure or broken connection- Since:
- 11.29
-
cancelRoutingRequest
void cancelRoutingRequest(RoutingWorkItem routingWorkItem) throws RoutingWorkItemNotFoundException, RoutingWorkItemOperationException
Cancel the routing request associated with aRoutingWorkItem
. In case of an exception there will not be any retry of the failed operation. Future events referring to this work item will not be processed. IMPORTANT NOTE: Please ensure not to implement this method blocking. Any synchronous long term operations performed in the method implementation could affect the general system performance and should be avoided.- Parameters:
routingWorkItem
- theRoutingWorkItem
to be canceled- Throws:
RoutingWorkItemNotFoundException
- if the specified work item does not existRoutingWorkItemOperationException
- in case of operation failure or broken connection- Since:
- 11.29
-
getRoutingWorkItemState
RoutingWorkItemState getRoutingWorkItemState(RoutingWorkItem routingWorkItem) throws RoutingWorkItemNotFoundException, RoutingWorkItemOperationException
Retrieve the state of aRoutingWorkItem
. The function will be called periodical (e.g. 60 minutes interval) to ensure that the work item still is alive and the work item state matches the currently known item state within the novomind iAGENT system.- Parameters:
routingWorkItem
- theRoutingWorkItem
- Returns:
- the
RoutingWorkItemState
of theRoutingWorkItem
- Throws:
RoutingWorkItemNotFoundException
- if the specifiedRoutingWorkItem
does not existRoutingWorkItemOperationException
- in case of operation failure or broken connection- Since:
- 11.29
-
routingWorkItemDeliverySuccessful
default void routingWorkItemDeliverySuccessful(RoutingWorkItemDeliverySuccessfulEvent routingWorkItemDeliverySuccessfulEvent)
Notifies the connector that the routing decision of the connector has been fulfilled successfully and theRoutingWorkItem
has been delivered to the desired agent by novomind iAGENT system. IMPORTANT NOTE: Please ensure not to implement this method blocking. Any synchronous long term operations performed in the method implementation could affect the general system performance and should be avoided.- Parameters:
routingWorkItemDeliverySuccessfulEvent
- provides theRoutingWorkItem
and the desired agent- Since:
- 11.29
-
routingWorkItemDeliveryFailed
default void routingWorkItemDeliveryFailed(RoutingWorkItemDeliveryFailedEvent routingWorkItemDeliveryFailedEvent)
Notifies the connector that the routing decision of the connector could not be fulfilled and theRoutingWorkItem
could not be delivered to the desired agent e.g. because of an agent availability change that happened in the meantime. IMPORTANT NOTE: Please ensure not to implement this method blocking. Any synchronous long term operations performed in the method implementation could affect the general system performance and should be avoided.- Parameters:
routingWorkItemDeliveryFailedEvent
- provides theRoutingWorkItem
and the desired agent- Since:
- 11.29
-
-