Interface ExternalRoutingConnector
public interface ExternalRoutingConnector
The
ExternalRoutingConnector is an interface to provide functionality
of an external routing in order to delegate the routing responsibility of issues
to an external platform.
The ExternalRoutingConnector offers service functions and also event
handling by adding event listeners to react to specific external routing events.
Each implementation of the interface ExternalRoutingConnector must be
annotated with the annotation ExternalRoutingConnectorPlugin to be loaded during
runtime within the novomind iAGENT routing process.- Since:
- 11.29
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRoutingRequest(RoutingWorkItem routingWorkItem) Cancel the routing request associated with aRoutingWorkItem.voidconfigurationChanged(ExternalRouting externalRouting) The method is called when theExternalRoutingof theExternalRoutingConnectorhas changed.voidconnect()The method is called after the initialization has been completed.getRoutingWorkItemState(RoutingWorkItem routingWorkItem) Retrieve the state of aRoutingWorkItem.voidinit(ExternalRouting externalRouting, RoutingWorkItemDecisionEventListener workItemRoutingDecisionEventListener) The init method is called to initialize anExternalRoutingConnectorThe method will be called after a new instance of anExternalRoutingConnectorhas been created.voidrelease()The method will be called when theExternalRoutingConnectoris disposed e.g.default voidroutingWorkItemDeliveryFailed(RoutingWorkItemDeliveryFailedEvent routingWorkItemDeliveryFailedEvent) Notifies the connector that the routing decision of the connector could not be fulfilled and theRoutingWorkItemcould not be delivered to the desired agent e.g.default voidroutingWorkItemDeliverySuccessful(RoutingWorkItemDeliverySuccessfulEvent routingWorkItemDeliverySuccessfulEvent) Notifies the connector that the routing decision of the connector has been fulfilled successfully and theRoutingWorkItemhas been delivered to the desired agent by novomind iAGENT system.startRoutingRequest(ChatRoutingRequest chatRoutingRequest) Start a new routing request for a chat.startRoutingRequest(TicketRoutingRequest ticketRoutingRequest) Start a new routing request for a ticket.
-
Method Details
-
init
void init(ExternalRouting externalRouting, RoutingWorkItemDecisionEventListener workItemRoutingDecisionEventListener) throws ExternalRoutingException The init method is called to initialize anExternalRoutingConnectorThe method will be called after a new instance of anExternalRoutingConnectorhas been created.- Parameters:
externalRouting- theExternalRoutinginstance provides storage and configuration for the connectorworkItemRoutingDecisionEventListener- the event listener for thisExternalRoutingConnector- Throws:
ExternalRoutingException- if any error occurs during initialization- Since:
- 11.29
-
connect
The method is called after the initialization has been completed. The implementation of anExternalRoutingConnectorshould 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
The method is called when theExternalRoutingof theExternalRoutingConnectorhas changed.- Parameters:
externalRouting- theExternalRoutinginstance that has changed- Since:
- 11.29
-
release
void release()The method will be called when theExternalRoutingConnectoris 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 aExternalRoutingRequestExceptionthe 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
RoutingWorkItemfor 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 aExternalRoutingRequestExceptionthe 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
RoutingWorkItemfor 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- theRoutingWorkItemto 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
RoutingWorkItemStateof theRoutingWorkItem - Throws:
RoutingWorkItemNotFoundException- if the specifiedRoutingWorkItemdoes 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 theRoutingWorkItemhas 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 theRoutingWorkItemand 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 theRoutingWorkItemcould 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 theRoutingWorkItemand the desired agent- Since:
- 11.29
-