Bulk close Purchase Orders - Python

Bulk close Purchase Orders - Python

Requirement:  Delete older Purchase Orders.

UseCase:  Closing Purchase Orders from a external CSV.

Please follow the below steps. 
    1. Extract the attached scripts in a folder.
    2. Update the URL and integration key in the script. 
      1. You can get the integration key under Admin > Integrations > Integration Key > New
      2. Please use an integration key with admin privilege, as there wont be any role related permission issues. 

      3. Update the integration key in the python script.

    3. Since this is a one time activity we can invoke the script from command prompt.
    4. Open command prompt as administrator in the folder location and invoke the script.

      1. Update the CSV file name as per your instance.  In my instance, it is 1671028684384.csv



                  New to ADSelfService Plus?

                    • Related Articles

                    • How to add Resolution and Close Requests using Custom Trigger (Python)

                      We can achieve it by using the custom trigger feature along with a python script. We can set a trigger based on which the script will execute, the script will add the resolution and set the status to 'Closed' You can modify the condition for the ...
                    • Script to bulk close change using deluge script based on the status

                      The following script will help you bulk close changes based on the status of change using custom schedules 1. Go to Reports tab --> New query report --> copy the query to the query editor and run the report. Save the report in the folder. The query ...
                    • Python Troubleshooting steps

                      Here we are listing the troubleshooting steps for the python script to be executed 1. Check whether python is installed or not in the sever where SDP is installed 2. If it's installed check the version of python ( Preferable version should be above ...
                    • Bulk request edit via python script invoked from command prompt

                      Please refer to the below link to install and configure python on the server. https://pitstop.manageengine.com/portal/kb/articles/how-to-setup-python-on-the-server/ Steps for configuring the script: Extract the zip in a particular location, eg: ...
                    • Script: Close associated changes when a request is closed

                      Use case:  In many cases, the client never comes back to confirm the change. This means that the change remains opened indefinitely. When the ticket is closed it is logical that the change to be closed. No one is going to close a ticket unless the ...