Interface AgentChatActionValidator
public interface AgentChatActionValidator
This is an extension point for validation of actions on chats performed by agents.
- Since:
- 11.30
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
validate
(AgentChatAction agentChatAction) The method is called when the agent is trying to perform actions on chats.default void
validate
(AgentChatCloseAction agentChatCloseAction) The method is called when the agent is trying to close the chat.default void
validate
(AgentChatUploadAttachmentAction agentChatUploadAttachmentAction) The method is called when the agent is trying to upload an attachment to the chat.
-
Method Details
-
validate
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. TheAgentChatActionValidationException.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, AgentChatActionInterruptedException 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. TheAgentChatActionValidationException.getLocalizedMessage()
method will be called to get the error message to be displayed to the agent.AgentChatActionInterruptedException
- Throw an AgentChatActionInterruptedException to indicate a validation error and to show a custom dialog with the given url to the agent that must be provided by a plugin. The agent may apply changes within the custom dialog to fulfill the validation condition and trigger again the desired action outside of the dialog to re-validate.- 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. TheAgentChatActionValidationException.getLocalizedMessage()
method will be called to get the error message to be displayed to the agent.- Since:
- 12.0
-