Connections
Connections are used to connect Zoho Books with third party services to access authenticated data. To establish a connection, you will have to provide a Connection Name, Authentication Type, amongst other details. In Zoho Books, you can create multiple connections.
IN THIS PAGE…
Set up Connections
You can set up a connection from the Deluge editor page. Here’s how:
- Go to the Deluge editor where you wish to create a new custom script.
- Click the Connections link in the top right of the editor.
- Click Go To Connections in the pop-up that follows.
- You will be redirected to the Create Connections page.
- If you had created connections previously, the list of all the connected apps will appear in the page that follows. To create a new connection, click the + icon next to Add Connections in the top right corner of the page.
- From here, you can choose the type of connection you want to create.
Insight: The Connections option is currently available in Custom Functions, Custom Buttons, and Schedulers in Zoho Books.
Types of Connections
There are two types of connections in the create connections page:
- Predefined Connections
- Custom Connections
Predefined Connections
You can find the predefined connections in the Pick Your Service tab. Predefined connections are the third party services that Zoho Books is already connected with. You will have to enter only the basic details required to set up the connection.
Create Predefined Connections
- Go to the Deluge editor.
- Click Connections in the top right of the editor.
- Click Go To Connections.
- Select the application to which you wish to connect from the Pick your Service tab.
- Enter the Connection Name you intend to have.
- Select the Scope if required, depending on the application’s prerequisites.
- Mark the Use credentials of login user option if you want every user to have their own login credential to execute the script. Unmark this option, if you want all your organization users to use the credentials of the user who created and authenticated the connection.
- Click Create and Connect.
- A login page or a page requesting for further details will appear.
- Grant access for the connection to take place.
Custom Connections
Custom connections can be found in the Custom Service tab. If you want to connect with other third party services that are not listed under the Pick Your Service category, you can create it in the Custom Service section. You will have to enter specific details such as the Authentication Type, Authentication Specific details and Connection Name of the application that has to be connected.
Create Custom Connections
To create a Custom Service connection, you need to do the following (assuming OAuth 2 as the authentication protocol):
- Register an OAuth client in Zoho Accounts
- Creating a connection using details from the newly registered client
Register an OAuth client:
You can register a new OAuth client from the developer console. The steps on how to register the client will be provided in the help document. While registering the client, you will be asked for a redirect URL. Please provide the following URL: https:/deluge.zoho.com/delugeauth/callback.
Create the connection:
Once a client has been registered, you will have to go to the Custom Service tab and fill in the required details to create the connection:
Fields | Description |
---|---|
Service Name | Name of the service to which you wish to connect. |
Authentication Type | The protocol used for authentication. |
Param Type | The authentication parameter that is added during API calls while making a connection. |
Client ID | The unique identification of the client. This can be obtained when registering the client. |
Client Secret | It is a secret used by the OAuth client to authenticate to the authorization Server. This can be obtained when registering the client. |
Authorize URL | The URL of the page that lists the scopes you have selected. This page prompts the user to grant permission to delegate the access to the user. |
Access token URL | The URL used to generate access tokens from refresh token. |
Refresh token URL | The URL used to generate refresh token. |
Connection Name | The name of the connection. The link name is derived from connection name and will subsequently be used in custom script. |
Scope | The permissions requested to the third-party service. You will have to provide a comma separated list of OAuth scopes of the third-party app. It’s the list of actions you wish to access. |
- Mark the Use credentials of login user option if you want every user to have their own login credential to execute the script. Unmark this option, if you want all your organization users to use the credentials of the user who created and authenticated the connection.
- After entering all the details, click Create and Connect.
- A pop-up window with authorize URL specified in the connection will open and request access permissions from the third-party app as per the scopes specified.
- Click Accept to authorize.
Now the connection has been authenticated and is ready for use.
Use Connections in Custom Scripts
Once a connection has been authenticated by the admin, it can be used in the custom scripts. In the connection details page where the connections were created, you will find a code snippet that shows how to use that connection to communicate with the third-party service.
You can copy and paste this code snippet in the required places of the deluge script.