Interface AgentChatActionValidator


  • public interface AgentChatActionValidator
    This is an extension point for validation of actions on chats performed by agents.
    Since:
    11.30
    • Method Detail

      • validate

        default void validate​(AgentChatAction agentChatAction)
                       throws AgentChatActionValidationException
        The method is called when the agent is trying to perform actions on chats. Please note that this method is the default method to be called for all kinds of actions supported by this extension point. If you would like to validate only one type of action, please implement one of the specific methods. This method will never be called directly from the backend. The method will only be called by the more specific default methods.
        Parameters:
        agentChatAction - provides information about the chat action.
        Throws:
        AgentChatActionValidationException - Throw an AgentChatActionValidationException to indicate a validation error. The chat keeps its previous state and the agent may try to repeat the action. The AgentChatActionValidationException.getLocalizedMessage() method will be called to get the error message to be displayed to the agent.
        Since:
        11.30
      • validate

        default void validate​(AgentChatCloseAction agentChatCloseAction)
                       throws AgentChatActionValidationException
        The method is called when the agent is trying to close the chat.
        Parameters:
        agentChatCloseAction - provides all required information about the close action.
        Throws:
        AgentChatActionValidationException - Throw an AgentChatActionValidationException to indicate a validation error. The chat will stay at the agent and the agent may try to close it again. The AgentChatActionValidationException.getLocalizedMessage() method will be called to get the error message to be displayed to the agent. If the AgentChatActionValidationException#getDialogUrl() method returns a valid url then a custom dialog window with the given url will be shown instead of displaying the error message.
        Since:
        11.30
      • validate

        default void validate​(AgentChatUploadAttachmentAction agentChatUploadAttachmentAction)
                       throws AgentChatActionValidationException
        The method is called when the agent is trying to upload an attachment to the chat.
        Parameters:
        agentChatUploadAttachmentAction - provides all required information about the upload attachment action.
        Throws:
        AgentChatActionValidationException - Throw an AgentChatActionValidationException to indicate a validation error. The attachment will not be uploaded. The AgentChatActionValidationException.getLocalizedMessage() method will be called to get the error message to be displayed to the agent.
        Since:
        12.0