When a change is moved to "Implementation" Stage, a project in Zoho Project has to be created.
Generating an Auth token
To use the 'Project API' we will need Project's authentication token from Zoho Accounts.
Ensure that you update the zohoProject.json file with your instance-specific access_token, refresh_token, client_secret, client_id, and redirect_url details and move the file to <SDP_Home>/integration/custom_scripts folder.
Sample zohoProject.json file content as follows
- {
- "access_token": "1000.xxxxxxx396554369275a3db92679fa.8c5fd7092ae31eb2358feeab8b8e602f",
- "refresh_token": "1000.d8xxxxxxxx047c3c3da8610191d3.f21a32a36331c29519ffd5a9985cc94e",
- "code": "1000.4664c4xxxxxxxxxxcc65299a5.a82994facd91628f9929f5865832ffd8",
- "client_secret": "e7c2c896xxxxxxxxxxd4c56c0c1e7b38af0",
- "client_id": "1000.QSKYME9xxxxxxxxxxxxNUSSG4DO94O",
- "redirect_url": "https://abc.com"
- }
These details will be used to regenerate the access token if it expires.
In the attached script utilizes the change title and change description content for creating the project. These can also be modified as per your requirement.
Adding a Custom Field In Projects:
We can add a custom field in projects to hold the SDP - Change ID.
- Login to Zoho Projects > Goto Setup > Customization > Layouts and Fields > Projects > You can create a new layout or edit the standard layout itself.
- We've integrated the custom field directly into the standard layout
- Add a custom section and name it SDP Details
- Include a single line field to hold the ChangeID
- Save the change and Navigate to create new projects page.
- On the new projects page, you have two options: either inspect the page to retrieve the ID of the newly created element or use the GET Custom Field API to access column name details. For more information, refer to: https://www.zoho.com/projects/help/rest-api/projects-api.html#alink3
Steps to follow:
- Download the attached scripts.
- Update the portalID and Custom Field name in OP_ZohoProjectIntegration.py as per your instance. We can get the portalid by invoking Get All Portals API. Refer: https://www.zoho.com/projects/help/rest-api/portals-api.html#alink1
- Move the python script to <SDP_Home>/integration/custom_scripts and ZohoProjectIntegration.txt to <SDP_Home>/integration/custom_scripts/executor_files
- Configure a change custom trigger to be automatically invoked whenever they are moved to the integration stage.