External Action Plugin Feature in SDP.

External Action Plugin Feature in SDP.

The External Action Plugin option has been added in SDP 8202. In some customer environments, when a request is created there might be a requirement to perform some action on some other application. For example, when a new hire request is created in ServiceDesk Plus, there will be a need to create an entry in active directory, create a new mail account etc... or when a new request is received in ServiceDesk Plus, we might want create a ticket in Jira or some other issue manager and record the reference ID in ServiceDesk Plus.

All these operations need to be done manually in the current scenario. Now, if all these external applications support API to perform these operations, then it can be automated through a menu using the new plugin option.  The configurations of the menu can be defined in an xml, Request_ActionMenu.xml located in [SDP_Home]/server/default/conf directory. A sample configuration would look like

  1. <?xml version="1.0" encoding="UTF-8"?>

    <!--
        Document   : Request_ActionMenu.xml
        Description:
            Used to specify the external menu options that need to be displayed in the request details page.
    -->

    <menus>
        <!--
        Each action is indicated by a menu element.The "name" attribute should specify
        a unique name to identify the menu. On completion of the action, if the
        request details page needs to be refreshed, then the "refresh" attribute
        should be set to true.
            -->   
            <menu name="Create_Ticket" refresh="true">
                <!--
            displaytext specifies the text that should be displayed in the menu's
            available in the request details page.
            -->
            <displaytext>Create a TFS Ticket</displaytext>
            <!--
            Specifies the list of roles to which this menu item should be visible.
            Multiple roles can be specified using multiple <role> tags. If the
            menu is to be displayed for all technicians, then the <roles> tag should
            not be added at all.
            -->
                <roles>
                        <role>SDAdmin</role>
                </roles>
            <!--
            Specifies the list of templates to which this menu item should be visible.
            Multiple templates can be specified using multiple <template> tags. If the
            menu is to be displayed for all templates, then the <template> tag should
            not be added at all.
            -->       
            <templates>
                        <template>Default Request</template>
                </templates>
            <!--
            The fully qualified class name for the implementation should be specified here.
            -->    
            <invoke>
                        <class>com.servicedeskplus.integration.TFSActionInterface</class>
                </invoke>
            </menu>
    </menus>














































Customers can write the code required for the third party integration in the class specified. ( TFSActionInterface in this example ). The details of the request in the form of JSON would be passed to this class so that the informations can be used to perform the operation in the other application.

In the Request details page, it would be available as a menu under the Action's dropdown.



On clicking the menu item, the customer's class would be invoked with the request information. If customers want to update any field in the specific request after performing the operation or add a note, then it can be done by returning a JSON in the format specified below

  1. {
  2. "message" : "TFS request created with reference ID 45678",
  3. "operation" :[
  4.       {
  5.       "INPUT_DATA":[
  6.             {
  7.                   "TFS Reference ID":"45678",
  8.             }],
  9.             "OPERATIONNAME":"EDIT_REQUEST"
  10.       }]
  11. }
The above is a sample to update a request field "TFS Reference ID" once the external operation is performed. Similar to this, notes too can be added as follows

  1. {
  2. "message":"TFS ticket created successfully",
  3. "operation":[
  4.       {
  5.             "INPUT_DATA":[
  6.             {
  7.                   "notes":{
  8.                         "notesText":"Ticket has been created in TFS and informtaion has been updated in ServiceDesk"
  9.                   }
  10.             }],
  11.             "OPERATIONNAME":"ADD_NOTE"
  12.       }]
  13. }
With this integration in place, now the technician just needs to click the menu to perform the operation instead of doing it manually all the time. 

We are also working on providing a default sample integration with JIRA. We are coming up with detailed documents for the base framework and the JIRA integration which will be ready in a couple of days.

In the meantime, we would like to know what such kind of integrations would be needed in customer environments based on which we can enhance this feature further.

Thanks
Shanmugam PL





















              New to ADManager Plus?

                New to ADSelfService Plus?