Use Cases

Use Cases

Scenario: Convert Incident to Service Request

Currently, only incident requests can be created via email using the default template. However, Zylker wants to create service requests based on specific keywords found in the email, aligning with their IT Service Management (ITSM) scenario.

If the email contains keywords such as "new account deployment," "password reset," or "software installation," it should automatically generate a service request instead of an incident request.  

  1. Go to Setup > Automation > Triggers
  2. In the requests module, create a new trigger with the following fields:
    1. Name - Incident to Service CF
    2. Execute when a request is - Created
    3. Execute during - Anytime
    4. Condition 1 - Subject contains Software installation, Software deployment, software
    5. Condition 2 (with logical OR operator)- Description contains Software installation, Software deployment, software
    6. Action - Custom Function
  3. Input the below custom function by adding the service request template name under "tempName".
  1. tempName = "Software Deployment Request";
  2. //
  3. apiPrefix = "/app/" + context.get("instance") + "/api/v3/";
  4. update = zoho.sdp.invokeurl
  5. [
  6. url :apiPrefix + "requests/" + requestObj.get("id")
  7. type :PUT
  8. parameters:{"input_data":{"request":{"template":{"name":tempName}}}}
  9. ];
  10. info update;
 
 
Warning
Disclaimer: Trigger automation is a post-operation process, meaning it is applied after the request is created. Therefore, all notifications and operations configured for incident requests will be executed successfully. After these processes, the request will be converted into a service request according to the custom function. 

Scenario: Status Change

In ServiceDesk Plus MSP Cloud, requests are reopened when the requester replies back to a request, but not when they add notes to a request. However, the administrators at Zylker want to move the request status to "Open" if the requester adds a public note to the request.
  1. Go to Setup > Automation > Triggers.
  2. In the requests module, create a new trigger with the following fields:
    1. Name - Status change
    2. Trigger Applies to - Notes
    3. Execute when a request is - Created
    4. Execute during - Anytime
    5. Condition - Is Public is Yes
    6. Action - Custom Function
  3. Input the below custom function below:
  1. statusToBeUpdated = "Open";
  2. parentObj = context.get("parent");
  3. requestObj = parentObj.get("request");
  4. requestId = requestObj.get("id");
  5. requesterId = requestObj.get("requester").get("id");
  6. createdById = requestnoteObj.get("created_by").get("id");
  7. //
  8. if(requesterId.equals(createdById))
  9. {
  10.     updatereq = zoho.sdp.invokeurl
  11.     [
  12.         url :"/app/" + context.get("instance") + "/api/v3/requests/" + requestId
  13.         type :PUT
  14.         parameters:{"input_data":{"request":{"status":{"name":statusToBeUpdated}}}}
  15.     ];
  16. }
 
Info
 Ensure to update the required status in the first line of the script. The above script can be used in common for other triggers/sub entities as per the organization's requirement.  
 
    • Related Articles

    • Overview

      A problem is an unknown underlying cause of one or more incidents. Problem management aims to minimize the adverse impact of incidents and issues caused by errors within the business and prevent recurrence of related incidents. To achieve this, ...
    • Release roles

      The release roles allow you to define access permissions to various stages in releases. You can either customize the default release roles or define new roles as required and associate these roles with users when creating a release. Association of ...
    • User Groups

      Classify users in your help desk instance into various groups based on certain criteria. You can allow/restrict users to access certain items in the instance via user groups. To configure user groups, go to Setup > Users and Permissions > User ...
    • JS Software Development Kit

      Overview JS APIs are JS functions to include various ServiceDesk Plus MSP Cloud functionalities into the custom widget you create. Add this JavaScript file to all the HTML/widget pages to access the JavaScript APIs from the application: ...
    • Custom Modules

      Overview Sometimes, an organization's needs may go beyond the scope of the modules present in the application. In other cases, the organization might need to collect and store additional data that cannot be categorized under our pre-defined modules. ...