Connections

Connections enable you to connect Zoho Procurement with other Zoho apps and third-party services and access their data securely. In Zoho Procurement, you can create connections and use them in custom functions, custom buttons, and schedules to access data from other Zoho apps and third-party services.

Create Connections

To get the required information from third party services into Zoho Procurement, you need to create connections. Here’s how:

  • Go to Settings in the top right corner of the page.
  • Click Connections under Developer Data.
  • Click New Connection in the top right corner.

Pick Your Service

Choose which external service or app your connection should integrate with.

Default Services

Predefined services are the Zoho apps and the third party services that Zoho Procurement has pre-configured for you. You will have to enter only the basic details required to set up the connection.

  • Select the required default service from the list.
  • Enter the Connection Name and the Connection Link Name will be auto-populated.
  • Enable Use credentials of login user option if you want every user in your organization to have their own login credential to execute the script. If you disable this option, every user in your organization can use the credentials of the user who created and authenticated the connection.
  • Select the Scopes required for the connection.
  • Click Create and Connect.
  • Click Connect again on the following page.
  • Allow the connection to access the requested information and click Accept.

The connection will be created, and it will be listed under My Connections. My Connections will also list the connections that are created across the organization by other users.

Custom Services

If you want to connect with other third party services that are not listed under Default Services, you can create it in Custom Services. You will have to enter specific details such as the Authentication Type, Authentication specific details, and Scope name.

The Authentication Type to create a custom service connection varies from one application to another. Here, let’s learn how to create a custom service connection with OAuth 2 as the authentication protocol. You need to do the following (assuming OAuth 2 as the authentication protocol):

  • Register an OAuth client with the third party app.
  • Create a connection using details from the newly registered client

Register an OAuth Client

For Zoho apps, you can register a new OAuth client from the developer console. While registering the client, you will be asked for a redirect URL. Copy-paste the following URL: https://deluge.zoho.com/delugeauth/callback. For other applications, you can register the OAuth client from the respective application’s developer console.

Create a Connection

  • Once a client has been registered, you will have to go to the Custom Services tab and click + Create New Service.
    Fill in the following details to create the connection:
    • Service Name: Name of the service to which you wish to connect. The Service Link Name will be auto-generated.
    • Authentication Type: The protocol used for authentication.
    • Parameter Type: The authentication parameter that is added during API calls while making a connection.
    • Grant Type: You can choose the grant type that the desired service uses to perform authorization. You can choose from the supported grant types: authorization code and client credentials.
    • Client ID: The unique identification code of the client. This can be obtained when registering the client.
    • Client Secret: It is a secret code used by the OAuth Client to authenticate the Authorization Server. If you had registered the client, you would’ve generated the client secret in the Console page. If you haven’t registered, you can register and generate it.
    • Authorize URL: The Authorize URL that’s specified in the API documentation of the desired service.
    • Access token URL: URL to fetch the access token as specified in the API documentation of the desired service.
    • Refresh token URL: URL to fetch the refresh token as specified in the API documentation of the desired service.
    • Scope Name: You will have to provide a list of OAuth scopes of the third-party app as specified in their API documentation. It’s the list of actions you wish to access.
    • Scope Display Name: Enter the name with which you would like to display the scopes.
    • Scope Delimiter: Delimiter with which the desired service API expects the scopes to be separated. For example, comma, space, or plus.
  • After entering all the details, click Create Service.
  • 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 you’ve specified.
  • Click Connect to authorize.

The connection will be created, and it will be listed under My Connections. My Connections will also list the connections that are created across the organization by other users.


Use Connections in Custom Scripts

Once a connection has been authenticated by the user, it can be used in custom functions, custom buttons, and schedules. You can copy the code snipper inside the connection and paste it in the required places of the Deluge script.

To copy the code snippet:

  • Go to Settings in the top right corner of the page.
  • Click Connections under Developer Data.
  • Click My Connections.
  • Click the coneection whose code you want to copy.
  • In the Sample Code section, whose Deluge or JSON and click the Copy icon.

Edit Connection

If you want to make changes to the connection’s name or its scope, you can edit it. Here’s how:

  • Go to Settings in the top right corner of the page.
  • Click Connections under Developer Data.
  • Click My Connections.
  • Hover over the connection you want to edit and click the Edit icon.
  • Make the necessary changes and click Update.

Revoke Connections

If you want to disable a connection temporarily, you can revoke it and enable it later when required. If you revoke a connection, users will not be able to execute the connections in the deluge scripts. To revoke a connection:

  • Go to Settings in the top right corner of the page.
  • Click Connections under Developer Data.
  • Click My Connections or Internal Connections.
  • Hover over the connection you want to revoke and click Revoke.
  • In the following pop-up, click Revoke again to revoke the connection.

Delete Connections

If you’re no longer using a connection, you can delete it. Here’s how:

  • Go to Settings in the top right corner of the page.
  • Click Connections under Developer Data.
  • Click My Connections or Internal Connections.
  • Hover over the connection you want to delete and click the Trash icon.
  • In the following pop-up, click Yes, Delete to delete the connection.