Inventory
Connections
Connections is a tool that is used to connect Zoho Inventory 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 inventory, you can create connections to access data from multiple sources.
IN THIS PAGE…
Set up Connections
To set up a connection in Zoho Inventory:
- Go to Settings > Automation > Custom Functions.
- Click the Connections link in the top right of the Deluge editor.
- Click the Go To Connections button 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 only in Custom Functions as of now in Zoho Inventory.
Types of Connections
There are two types of connections in the create connections page:
Predefined Connections
You can find the predefined connections under the Pick Your Service tab. Predefined connections are the third party services that Zoho Inventory is already connected with. You will have to enter only the basic details required to set up the connection.
To set up a predefined connection:
- Go to Settings > Automation > Custom Functions.
- Click the Connections link in the top right of the Deluge editor.
- Click the Go To Connections button in the pop-up that follows.
- 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.
- Enable the Use credentials of login user option if you want every user to have their own login credential to execute the script. Leave this option disabled 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
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.
- Create a connection using details from the newly registered client.
1. 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.
2. 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. |
- Enable 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 in Zoho Inventory.