Hello all,
In our last post, we gave an overview of the fundamental features available in the Zoho Sprints developer platform and the capabilities they offer in building effective extensions for Zoho Sprints.
In this post, we'll explore the feature Connections, the types of connections, and the steps to create one in detail, along with a use case.
Connections
What and when?
APIs are the core set of rules that an application provides to facilitate data exchange between apps. For API data transfer to be secure, those apps must be securely connected. Every app has an authentication mechanism in place to ensure that it's properly authorized and connected with other apps. Using the authentication mechanism, apps can be securely connected, and APIs can be used to handle data flow between them.
The Connections feature in the developer platform facilitates this secure integration between apps. It allows you to create seamless, tightly coupled integrations between Zoho Sprints and other apps, allowing for secure, synchronized data exchange with proper authentication and authorization.
Types of connections
There are two kinds of connections that can be created:
- Default connections: Zoho provides a default set of applications that you can simply select, provide some basic information for, and connect to.
- Custom connections: If the application you want to integrate with Zoho Sprints is not on the default list, or you want to make some customizations to your connection, you can create a custom service and then connect to it.
How to create a connection
- Go to Sigma and navigate to the Connections section in the left panel of your Sigma workspace.
- Choose Zoho Sprints as the service from the dropdown list, then select your Zoho Sprints organization.
- Click Create Connection to start creating a connection for the application you want to integrate with Zoho Sprints.
Note: Alternatively, you can also use the Default Services or Custom Services option under the Services section to access and create a default or a custom connection respectively.
Creating a default connection
Consider integrating with Zoho Projects to create tasks as work items in Zoho Sprints so that they may be managed in an agile way. In this case, you need to first check if Zoho Projects is included in the default service list. If it's available, to create the default connection, follow the steps below.
- Refer to the "How to create a connection" section for the first three steps to create a connection.
- Select the Default Services tab.
- Check for Zoho Projects in the service list by simply searching for it.
- Once located, click on the service. You will be redirected to the page where you must enter your connection details.
➤ Enter the connection name. The connection link name will be automatically filled in.
➤ Toggle Yes to Use Credentials of Login User if you want every user who installs the extension to authorize the connection using their credentials. Otherwise, toggle No to have only the admin authorize the connection once.
➤ Select the scopes for the APIs required to enable your extension's functionality.
➤ Click Create and Connect.
- The connection will be established successfully, and sample JSON code will be generated, which must be specified in the extension's plugin-manifest.json file before it can be used to invoke Zoho Projects APIs within the extension.
Note: If you want to use the Zoho Sprints APIs within the extension, you can establish a default connection for Sprints, configure it in the plugin-manifest.json file, and use it to access the Zoho Sprints APIs.
We'll look at how to configure and use the established connection in an extension later. Now that we've seen how to set up a default connection, let's move on to the processes for creating a custom connection with an example.
Creating a custom connection
Consider the following scenario: Zoho Sprints is used to manage the development and testing operations of an organization's internal team. The testing team reports a bug-related work item and notifies the developer. The developers may want to reproduce and resolve the issue with the tester via a remote or screen sharing session, which can be managed using Zoho Assist, a tool designed to assist users with these sessions.
In this situation, it would be ideal to have Zoho Assist integrated into Zoho Sprints so that a workspace user could start an Assist session with another user directly from the bug work item itself. Additionally, it would be efficient to add a comment with session details as part of the work item for future reference. To do this entirely in an extension, we need to do these key tasks:
- Create connections
- Create an extension and configure the plugin-manifest file
- Create a widget to start an Assist session from within a work item and add a comment to it.
1. Create connections
Since Zoho Assist isn't available in the default services list, let's go ahead create it as a custom service and connect with it. Refer to the "How to create a connection" section for the first three steps to create a connection, then proceed with the steps below to create a custom connection.
- Select Custom Services.
- Click the Create New Service option.
- You'll be redirected to a page where you need to enter your connection details.
➤ Enter the Service name. The service link name will be automatically filled in.
➤ Enter the scopes of the Zoho Assist APIs required for your extension's functionality.
➤ Click Create Service.
- The service will be successfully created, and you'll be taken to a page where you can now go ahead and create a connection. In this page, you'll have to enter the details just like you provided connection details for your default connection.
- Enter a connection name, toggle Yes or No to Use Credentials of Login User, select the scopes, and click Create and Connect.
- You'll be asked to authorize the connection and provide access to your data for the scopes included. Accept and proceed.
- The connection will be successfully created and a sample JSON will be automatically generated.
- Since our example involves adding a comment to the Sprints work item as well, we'll be invoking the Sprints API for it. To access its API, a connection for Zoho Sprints is also required. This can be created as a default connection using the method shared in the earlier section.
2. Create an extension and configure the plugin-manifest.json file
- Navigate to the Extensions section in the left panel of your Sigma workspace.
- Click the New Extension button and create a new extension. You can refer to this post for detailed guidance on creating a new extension.
- In the plugin-manifest.json file of your extension, include the sample JSON code that was generated for the Zoho Assist connection you created. Also include the JSON code for the Sprints connection you created.
Now the connections are configured within the extension and can be accessed in it.
3. Create a widget to start an Assist session from within a work item and add a comment to it
- Create a file called createsession.html inside the app folder to render and handle the logic of your widget.
- This widget has to be configured in the plugin-manifest.json file with the following details.
➤ name: The name of the widget: "Zoho Assist Session"
➤ location: The location in which the widget needs to be rendered. This widget's location is in the work item's right navigation bar.
➤ url: The URL path of the createsession.html file in the folder structure which renders the widget's user interface.
createsession.html - The HTML code for the widget is added as an attachment to the post.
➤ In the attached code snippet, we have invoked the
Zoho Sprints API to fetch the list of Sprints workspace users. This user list is populated as a dropdown list to let the person accessing the widget choose the user they want to enter into an Assist session with. This API is invoked using a default connection created for Zoho Sprints.
- Now, you can test the widget using the Run option in the Sigma cloud editor. For detailed guidance on testing the extension, read our post here.
- Once you enter into the test environment, install the extension and authorize the connections.
- Next, enter into the work item and access the Zoho Assist Session widget. Choose the user and session type, and click Start Session. The session will be successfully initiated and a comment regarding the session details will also be added to the work item.
In this post, we have successfully explored connections, their types, and the detailed steps to create them along with an example. We hope you found this information useful. Keep following this space for more updates!
SEE ALSO