/

Connections

Connections are used to connect Zoho Commerce 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 Commerce, you can create multiple connections.

Set up Connections

To access the connection, go to Settings > Developer Data > Connections.

  • Click the New Connection in the top right corner.
  • You will be redirected to the Create Connection 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, you can choose the type of connection you want to create.

Insight: The Connections option is currently available in Custom Functions and Schedulers in Zoho Commerce.


Types of Connections

There are two types of connections in the create connection page: 

  • Default Services (Predefined Connections)
  • Custom Services (Custom Connections)

Default Services (Predefined Connections)

You can find the predefined connections in the Pick Your Service section under Default Services. Predefined connections are the third party services that Zoho Commerce is already connected with. You will have to enter only the basic details required to set up the connection. 

Create Predefined Connections

  • Go to Settings > Developer Data > Connections.
  • Click New Connection in the top-right corner.
  • In the Connections window, under Default Services, select the service you want to connect (for example, Google) from the Pick Your Service section.
Predefined Connections
  • In Connection Details, enter a Connection Name.
  • Review or edit the Connection Link Name (auto-generated from the connection name).
  • Enable or disable Use Credentials Of Login User:
    • Keep it enabled if each user should authenticate with their own credentials.
    • Disable it if all users should use the credentials of the user who creates and authenticates the connection.
  • Under Choose Scopes, select the required scopes based on the service requirements.
New predefined connection
  • Click Create And Connect.
  • In the authentication window, sign in to the selected service and grant access for the selected scopes.

Custom Connections

Custom connections can be found in the Custom Services tab. If the service you want to connect is not available under Default Services, you must first create a custom service and then use that service to create the required connection.

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.
  • Create a connection using details from the newly registered client.

Register an OAuth Client in Zoho Accounts

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.

To create a custom connection, first create the service definition in Custom Services:

  • Go to Settings > Developer Data > Connections.
  • Under Pick Your Service, click Custom Services.
  • Start creating a new service by clicking Create New Service.
  • In Service Details, enter the Service Name.
  • Enter the Service Link Name.
  • Select the required Authentication Type.
  • Select the Parameter Type to define how the authentication value should be passed.
  • Enter the Parameter Key.
  • Enter the Parameter Display Name.
  • If the service requires values that change dynamically, enable Dynamic Parameters.
  • Click Create Service.
New Custom Connection

Depending on the Authentication Type you choose, additional fields may appear. Enter the required values and complete the authentication flow if prompted.

After the service is created, you can create a connection using that custom service and provide the authentication details required by the selected authentication type.

After creating the service, enter the following details while creating the connection:

FieldsDescription
Service NameName of the service to which you wish to connect.
Authentication TypeThe protocol used for authentication.
Param TypeThe authentication parameter that is added during API calls while making a connection.
Client IDThe unique identification of the client. This can be obtained when registering the client.
Client SecretIt is a secret used by the OAuth client to authenticate to the authorization server. This can be obtained when registering the client.
Authorize URLThe URL of the page that lists the scopes you have selected. This page prompts the user to grant permission to delegate access.
Access Token URLThe URL used to generate access tokens from the refresh token.
Refresh Token URLThe URL used to generate a refresh token.
Connection NameThe name of the connection. The link name is derived from the connection name and is used in custom scripts.
ScopeThe permissions requested from the third-party service. Enter a comma-separated list of OAuth scopes.
  • 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. 

Code Snippet

You can copy and paste this code snippet in the required places of the deluge script.

Connections