Reply to a Request in ServiceDesk

Table of Contentsup

Overview

The replyRequest() SDPOD integration task in Zoho Creator can be used to reply to an existing request in ServiceDesk Plus OnDemand. For example, in the request to book a conference hall, the admin can acknowledge the request by replying to the request. The reply request task is initiated in Zoho Creator by adding code to the form containing the request values, which upon submission, generates a reply email to the request in ServiceDesk Plus OnDemand.

Syntax

<response>= zoho.sdpod.replyRequest(requestID, params);

where,
<response> is the map variable returned as response. It contains the details of the request that needs to be replied.
<requestID> refers to the ID of the request that needs to be replied.
<params> is the map variable that holds the key,value pairs. The map key is the label name as specified in the ServiceDesk Plus OnDemand Requests module and the map value is the field value as submitted in the ZC form.

Example - Using script-builder

In this example, we will reply to an existing request through an email. Lets assume we have a request to book a conference hall. Now the admin acknowledges to the request by replying to it. Using script-builder we will create the equivalent script. Upon submission of the form, the code gets executed and a reply mail gets generated to the request in ServiceDesk Plus OnDemand based on the given record ID.

  1. Go to the Zoho Creator form containing the request values
  2. Click on Workflow to open the scriptbuilder. Go to the On Edit - On Success section.
  3. Drag-and-drop the "call function" task under "Miscellaneous" tasks in Zoho Creator to select the request values.
  4. Select Integration tasks.
  5. Set "Select Service" as SDPOnDemand.
  6. Set "Select Function" as Reply To Request.
  7. Set "ID" of the record that needs to be edited.
  8. Click on "New Map" to add the key-value pairs.
  9. Select the following key-value pairs and click on Done.
    "TO": Host ,"CC" : Email, "SUBJECT" : Subject ,"DESCRIPTION" : Description
  10. Click on Done to insert the call function task.

Upon submission of the form, a reply mail is generated to the particular request in ServiceDesk Plus OnDemand

Example - Using free-flow scripting

Instead of using the script-builder you can also use the free-flow scripting to directly insert the code in the editor box.

  1. Click on Workflow to open the scriptbuilder. Go to the On Edit - On Success section and navigate to Free-flow Scripting.
  2. Now add the following code in the editor box and click on "Save"

    // declare the map variable to hold key-value pairs
    params = {"TO": input.Host ,"CC" : input.Email, "SUBJECT" : input.Subject ,"DESCRIPTION" : input.Description};

    // reply to request by executing the syntax
    response = zoho.sdpod.replyRequest(reqID, params);

    where,
    params contains the key-value pairs. The keys refer to the label names in ServiceDesk Plus OnDemand and the values refer to the values of Zoho Creator field values. For example, "TO" is the label name in ServiceDesk and input.Host is the value entered in the "Host" field of ZC form.
    response is the map variable returned as response. It contains the details like status/execution of the reply task.
    Requestsstands for the module name in ServiceDesk Plus OnDemand. As of now, Requests is the only supported module.

  3. regID stands for the ID of the request that needs to be replied to.
  4. Upon submission of the form, a reply mail is generated to the particular request in ServiceDesk Plus OnDemand
  5. In this example, successful execution of the syntax will yield the following response:
    response = { "status": "Success", "TO": "Host" ,"CC" : "Email", "SUBJECT" : "Subject" ,"DESCRIPTION" : "Description"}
  6. If for some reason, the execution fails, the response will be of the following format:
    response = {"status" : "Failure" , "message" : "<error message>"};

Share this post : FacebookTwitter