Skip Navigation LinksALVAO 11.2Extension modulesALVAO Service Desk Custom AppsApplicationsAutomatic actions based on ticket eventsIActAutoAction Skip Navigation Links.


Skip Navigation LinksALVAO 11.2 / Extension modules / ALVAO Service Desk Custom Apps / Applications / Automatic actions based on ticket events / IActAutoAction

IActAutoAction

By implementing the IActAutoAction interface in a application script, you can define custom actions when creating an event on a ticket.
In the newly created script, set the value of the Name property (the name of the automatic action) in the constructor of the action class.
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.
Caution:
If you want to use only some of the methods of the implemented interface in the automatic action, leave an exception in the body of the other methods from the interface: throw new NotImplementedException();.

Interface methods

Method Description
OnActChanged Edit Event.
OnActCreated Event creation.
OnActRemoved Delete an event.

OnActChanged

Custom action based on event modification.
In the implemented method, define both the conditions for executing the operations and the event operations themselves.
  • Syntax: void OnActChanged(SqlConnection con, SqlTransaction trans, int actId, int personId, string properties)
  • Parameters:
    • con - SqlConnection to the database.
    • trans - SqlTransaction of the database transaction in progress.
    • actId - The ID of the event (tAct.iActId) that was changed.
    • personId - The ID of the user (tPerson.iPersonId) who changed the event.
    • properties - the changed event items separated by a comma (table.column).
      table.column Event Item
      tAct.dAct Date of creation
      tAct.liActKindId ID of Act type
      tAct.sActTo To whom (receiver)
      tAct.sAct Subject
      tAct.mActNotice Text
      tDocument.liDocumentActId Attachments
      tActHd.bActHdUserRead Show ticket
      tAct.bWaitingForUser Waiting for a ticket
      tAct.nActWorkHours Work
      tAct.nActTravelHours Travel time
      tAct.nActTravelKm Distance
      tAct.bNoCharge NoCharge
      tAct.ActMarkId Act mark (important or ticket solution)
  • Return value: none.

OnActCreated

Custom action based on event creation.
In the implemented method, define both the conditions for executing the operations and the event operations themselves.
  • Syntax: void OnActCreated(SqlConnection con, SqlTransaction trans, int actId, int personId)
  • Parameters:
    • con - SqlConnection to the database.
    • trans - SqlTransaction of the ongoing database transaction.
    • actId - ID of the newly created event (tAct.iActId).
    • personId - ID of the user (tPerson.iPersonId) who created the event.
  • Return value: none.
Automatic actions can be performed in the following situations:
  • Manual creation of any event with New Event or Note.
  • Sending a message with Send Message, Reply, etc.
  • Read an email from the service mailbox using Alvao Service.
  • Manually retrieve a message from Outlook using the ALVAO for Outlook - Save to ticket log.
  • Creating a triggering event when a new ticket is created.
  • Calling the CreateAct or CreateTicket web method to create the founding message.
You can find an example usage in the SendMailsAboutNewEvent application template.

OnActRemoved

Custom action based on event removal.
In the implemented method, define both the conditions for executing the operations and the event operations themselves.
  • Syntax: void OnActRemoved(SqlConnection con, SqlTransaction trans, int actId, int personId)
  • Parameters:
    • con - SqlConnection to the database.
    • trans - SqlTransaction of the ongoing database transaction.
    • actId - ID of the event being removed (tAct.iActId).
    • personId - ID of the user (tPerson.iPersonId) who deleted the event.
  • Return value: none.

 

Did not find what you were looking for? Ask our technical support team.