Script to send notification to users on upcoming contracts

Script to send notification to users on upcoming contracts

Please follow the below link to setup python on the server

Steps to configure

1.  Extract the attached zip file in <Home>/integration/custom_scripts
2.  Update configuration.json with your outgoing mail server details, application URL, and Technician Key. You can ignore this step if there is already a configuration.json in place.
3.  Uncomment "send_to" variable in file and configure "send_to" list (Can be done similarly to add CC if needed by uncommenting sent_cc). 
4. Create a query report with the below query and save it

      select ac.contractname, acd.org_name, ac.startdate, ac.expirydate from accountcontract ac inner join accountdefinition acd on ac.accountid=acd.org_id where ac.startdate=<from_today>  and ac.isactivecontract=true

      The above query will only include Contract Name, Account Name, Start Date, and Expiry Date. Fields can be added in select query based on requirements.

5. Under Admin >> Custom Schedule >> Create a custom schedule and configure "" python script to be executed at 1 AM every day and pass the above query report as an argument.

                    New to ADSelfService Plus?