Qntrl | Online Help | Business case 6: Delete associated cards from third-party applications (After Delete)

Business case 6: Delete associated cards from third-party applications (After Delete)

Automate deleting records in third party applications, such as Zoho Desk or SAP, once they are deleted in Qntrl using the 'After Delete' server script.
 

Business Scenario

Zylker uses Jira to track issues in their products and every bug filed in Qntrl via cards get filed in Jira too. If a partner or client wishes to delete the card in Qntrl, the associated issue must also be deleted from Jira automatically.
 

Solution

Server scripts can be used to trigger delete actions in third-party applications.
  1. Create a server script to delete issues in Jira when cards are deleted from Qntrl.
  2. Create a card and fill in the issue details to test the server script.
 

Sample Configuration

Step 1: Code server scripts

Create a new server script to delete an issue in Jira if the associated card is deleted in Qntrl.
  1. Create a new server script and enter the name as 'Delete issue in Jira'.
  2. Choose Raise Issue in the Form dropdown. We've used the previous use case's orchestration here. Learn more
  3. Choose Job as the Execution Location to execute the script.
  4. Choose After Delete  as the Execution Trigger to execute this script whenever the card page loads.
  5. Copy paste the below script into your script editor and replace the parameter names.
    1. You can use the ? icon at the top-right corner of the script editor to refer to parameter names.
  6. Once the script is ready, Publish it. 

  1. function afterDelete(){
  2.     var globalVars = ZDK.Vars.getGlobalVariables();
  3.     var job = current.Job;
  4.  
  5.     var jiraAuthBase64 = ZDK.Crypto.base64Encode(globalVars["JiraEmail"] + ":" + globalVars["JiraApiKey"]);
  6.     var issueId = job.getVariable("JiraId");
  7.     var url = "https://" + globalVars["JiraDomain"] + "/rest/api/3/issue/"+issueId;
  8.     var headers = {
  9.         'Authorization': "Basic " + jiraAuthBase64,
  10.         'Accept': 'application/json',
  11.         'Content-Type': 'application/json'
  12.     }
  13.     console.log("url = " + url);
  14.     var resp = ZDK.HTTP.request(
  15.         url,
  16.         "delete",
  17.         headers,
  18.         {},
  19.         ""
  20.     );
  21.     console.log(JSON.stringify(resp));
  22. }

To get insights on Global variables used in this script, refer our previous server script business case.


 

Step 2: Delete card

When the orchestration and server script are ready, we can test the script by deleting a card from Raise Issue orchestration.
  1. Navigate to Cards and click on the card.
  2. Go to the top-right corner and click  icon.
  3. Select Delete from the dropdown to delete the card from Qntrl.
        

 
Check if the associated issue in Jira also gets deleted.
 
 

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                    Manage your brands on social media

                                      Zoho Desk Resources

                                      • Desk Community Learning Series


                                      • Digest


                                      • Functions


                                      • Meetups


                                      • Kbase


                                      • Resources


                                      • Glossary


                                      • Desk Marketplace


                                      • MVP Corner


                                      • Word of the Day


                                        Zoho Marketing Automation

                                          Zoho Sheet Resources

                                           

                                              Zoho Forms Resources


                                                Secure your business
                                                communication with Zoho Mail


                                                Mail on the move with
                                                Zoho Mail mobile application

                                                  Stay on top of your schedule
                                                  at all times


                                                  Carry your calendar with you
                                                  Anytime, anywhere




                                                        Zoho Sign Resources

                                                          Sign, Paperless!

                                                          Sign and send business documents on the go!

                                                          Get Started Now




                                                                  Zoho TeamInbox Resources



                                                                          Zoho DataPrep Resources



                                                                            Zoho DataPrep Demo

                                                                            Get a personalized demo or POC

                                                                            REGISTER NOW


                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now







                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.



                                                                                                    Wherever you are is as good as
                                                                                                    your workplace

                                                                                                      Resources

                                                                                                      Videos

                                                                                                      Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                      eBooks

                                                                                                      Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                      Webinars

                                                                                                      Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                      CRM Tips

                                                                                                      Make the most of Zoho CRM with these useful tips.



                                                                                                        Zoho Show Resources