SAMPLE SCENARIO DOCUMENT FOR SETTING APPROVALS THROUGH CUSTOM TRIGGERS


    For an organisation with large number of employees, approval process can be a really tedious one. Let us consider a scenario where you need an iPhone for testing and it requires the approval of your senior manager. Senior managers may differ from team to team and they might not know why he/she requires an iPhone for testing. Only his immediate mentor/manager might know the actual purpose behind the request. So there are chances that the senior manager might not approve your request or take time to approve the request. In such cases, it will be better if the approval managers for the respective teams can be configured well in advance and if there are multiple stages for approval.ie; the immediate manager/mentor can be assigned for STAGE 1 APPROVAL and the senior manager can be assigned for STAGE 2 APPROVAL etc. Earlier, if someone had to approve the request, he/she had to click on 'Actions' tab and choose 'Submit for Approval' everytime. Instead of such situation, one can configure the approvers for a particular situation well in advance and the corresponding script/class file for such situations will be triggered automatically when the 'set criteria' matches the given situation.
    With Custom Trigger, you can automatically trigger the required script file or custom class file for configuring the approvers and automatically notify them through mail.This document will give a clear idea on triggering class/script file for the above sample situation.
     

    If the criteria set in the 'iPhone_requirement' matches the request raised, ie; if the priority and category matches, then the corresponding script/class file 'python iPhone.py' will be triggered automatically. On opening such requests, one can automatically view the 'Approvals' tab, even though 'Submit for Approval' is not selected.
     


    Following is the JSON Format for adding approvals through 'custom trigger'
    :

    SETTING APPROVALS FOR DIFFERENT STAGES:

    {

        "operation": [

            {

                "INPUT_DATA": [

                    {

                        "StageOne": [

                            "Sampleuser.1@xyz.com",

                            "Sampleuser.2@xyz.com"

                        ]

                    },

                    {

                        "StageTwo": [

                            "Sampleuser.3@xyz.com",

                            "Sampleuser.4@xyz.com"

                        ]

                    },

                    {

                        "StageThree": [

                            "Sampleuser.5@xyz.com",

                            "Sampleuser.6@xyz.com"

                        ]

                    },

                    {

                        "StageFour": [

                            "Sampleuser.7@xyz.com",

                            "Sampleuser.8@xyz.com"

                        ]

                    },

                    {

                        "StageFive": [

                            "Sampleuser.9@xyz.com",

                            "Sampleuser.10@xyz.com"

                        ]

                    }

                ],

                "OPERATIONNAME": "ADD_APPROVAL_STAGE"

            }

        ],

        "message": "Sample Python script for adding approvers",

        "result": "success"

    }

    SETTING APPROVALS FOR THE CURRENT STAGE:

    {
    "operation": [
    {
    "INPUT_DATA": [
    "Sampleuser.1@xyz.com",
    "Sampleuser.3@xyz.com",
    "Sampleuser.5@xyz.com"
    ],
    "OPERATIONNAME": "ADD_APPROVAL"
    }
    ],
    "message": "Sample Python script for adding approvals in current stage",
    "result": "success"
    }

    The following will be displayed on clicking 'Approvals' tab.

     

    Click here to view a sample Python script for 'Adding approvers' 
     If the action is to be executed via class file:

    Click here to view a Sample Class file to add approvers

    Some Incident requests might require the approval of immediate managers. Eg: When requests related to server are raised, it might require the notice of the manager and need his approval.In such cases, the 'action' and its criteria can be set in advance and the approver can be notified automatically through trigger.
     


    Note
    : The same script file used for service request can be used here. The Incident request will take only one stage from the script.

    For an Incident request, only one stage will be available and the approver can be added or deleted.
     

    Set Approvers:

    If an approver has already been added to a stage and if there arises a situation where the approver has to be replaced, then the script file for set approver can be custom triggered instead of replacing approvers manually.

    Sample script file for set approvers and set approver stage can be viewed by clicking on the links.

    Zoho Corp. All rights reserved.