TicketBacklogHandler

since v11.25

The TicketBacklogHandler can be used to access tickets within the backlog in the novomind iAGENT routing process. This handler is only available in the novomind iAGENT routing process.

An example usage of a TicketBacklogHandler would look like this:

import javax.inject.Inject;
import com.novomind.ecom.api.iagent.backlog.TicketBacklogHandler;
import com.novomind.ecom.api.iagent.model.Category;
import com.novomind.ecom.api.imail.model.Ticket;

@Inject
private TicketBacklogHandler ticketBacklogHandler;

public int getTicketCount(Category category) {
  return (int) ticketBacklogHandler.stream()
    .filter(ticket -> category == null || category.equals(ticket.getCategory()))
    .filter(ticketBacklogHandler.isRoutable())
    .count();
}

since v12.0

The interface Ticket offers a new method getTicketState to access the current TicketState of the ticket:

enum TicketState

CREATED

The ticket has been created e.g. due to an incoming message that has been received by a message connector. The ticket will not be assigned or processed automatically in this state.

QUEUED

The ticket is queued and waiting to be assigned to an agent or to be processed automatically or manually by a supervisor.

ASSIGNED

The ticket has been assigned to an agent and the message has been delivered to the agent's folder.

RESUBMITTED

The ticket has been resubmitted by an agent and will be assigned again automatically to the agent at a specified time.

INTERNAL_FORWARDED

The ticket has been forwarded internally to an agent that currently is not available. The ticket will be assigned to the agent automatically as soon as the addressed agent is available again.

EXTERNAL_FORWARDED

The ticket has been externally forwarded and will be processed by an external clerk. The external clerk sends the answer to the novomind iAGENT system and the answered message will be sent back to the customer and the ticket is finally closed.

EXTERNAL_INQUIRED

The ticket has been externally forwarded by an agent for an inquiry. The external clerk sends his answer back to the agent.

ANSWERED

The ticket has been answered and the answered message is waiting to be sent.

CLEARANCE_REQUIRED

The ticket has been answered and is now waiting for clearance.

SENT_AND_CLOSED

The ticket has been answered and the answered message has been sent. This is a final state if delivery succeeds.

CLOSED

The ticket has been closed without being answered. This is a final state.

SEND_FAILED

The ticket has been answered but the answered message could not be sent.

DELIVERY_FAILED

The ticket has been answered and the message has been sent, but the message could not be delivered to one or multiple recipients and has bounced back.

UNPROCESSABLE

A message has been received for the ticket but the message is unprocessable. This is a final state.