Skip Navigation LinksALVAO 11.2 / Extension modules / ALVAO Service Desk Custom Apps / Applications / Automatic actions based on ticket events / IMailMessageAutoAction
IMailMessageAutoAction
By implementing the
IMailMessageAutoAction interface in the
application script you can define custom actions when loading a message from the service mailbox before saving the message to the log of an existing ticket or before creating a new ticket.
In the newly created script, set the value of the Name property (the name of the automatic action) in the action class constructor.
Tip:
To store properties and action settings, we recommend defining the
Settings class in a separate script that you create from the
Class Library template.
Interface methods
OnMessageReceived
The actual action can be performed when loading a message from the service mailbox before saving the message to the log of an existing ticket or before creating a new ticket.
In the implemented method, define both the conditions for executing the operations and the operations themselves.
Note:
If the message is not further processed after automatic actions, a warning is written to the event log.
Caution:
If more than one of these automatic actions is implemented, they are called sequentially until one of them returns
false,
and the order in which they are called is not guaranteed.
- Syntax: bool OnMessageReceived(SqlConnection con, SqlTransaction trans, MailMessage message, int sectionId, int ticketId, int fromPersonId)
- Parameters:
- con - SqlConnection to the database.
- trans - SqlTransaction of the ongoing database transaction.
- message - message object.
- sectionId - the service ID (tHdSection.iSectionId) which the message was loaded to.
- ticketId - ID of the ticket (tHdTicket.iHdTicketId) to which the message belongs according to the subject, or zero if it is a new ticket creation.
- fromPersonId - message sender ID (tPerson.iPersonId),
or Host account, if the message sender is not found among the users.
- Return value:
- bool - return the return value true or false
indicating whether or not the message should continue to be processed by default.
For an example use case, see the
AssignToSolverByEmail application template.
Did not find what you were looking for? Ask our technical support team.