Connectors in Vertical Solutions

Connectors


Connectors power up your CRM and add functionalities by Integrating with other services through its APIs (OAuth 2.0).

Getting Started with Connectors 

Connectors enable the process of establishing integrations between the solutions built over Vertical Solution platform and third-party applications using the OAuth 2.0 protocol.
 
You can consider connection as a way to log in to any third-party service. If you're already logged in (connected) to a particular service, you can always access your data stored in those services. Once a connector is created and connected, you can invoke it in the custom functions using the invokeConnector Deluge task, and access data from the required service and via the JS SDK Methods.
 
For example, to access your Twitter account using Twitter's REST APIs from your solution, you can create a Twitter connection, connect to it, and use the connection link name in invokeConnector task. The invokeConnector task will perform the specified API call to your connected Twitter account and allows you to access the data.

OAuth 2.0

OAuth 2.0 is an industry-standard, open-source authorization protocol, which is used to gain partial access to a user's account on an HTTP service. An example of an OAuth 2.0 authorization is the sign-in screen that appears when a third-party application (also known as a client) requests partial access to a social media account, such as Facebook, Google, or Yahoo.

Important terminologies

  • Client - The application requesting access to data stored in an external system. When creating a connector in Zoho Developer Console, the client is the solution you are developing.
  • Resource - The application or service that the client is trying to access. In our case, the resource is the third-party service (ex: Dropbox) you are trying to integrate.
  • Request Token URL - This URL is used to send authorization requests to the resource server. The resource server prompts the resource owner (user) to authorize this request.
  • Access Token URL - Once the request is authorized by the resource owner, the server sends an access token to the client. This token has to be exchanged every time the clients wants to access the resource data.
  • Refresh Token URL - Some access tokens are valid only for a limited period of time. When an access token expires, the client has to get another access token from the resource, using the refresh token URL.
  • Client ID - A unique identifier provided to every client application. This ID is provided by the resource owner.
  • Client Secret - Every client application has a secret code mapped to it. This is done to prevent unauthorized access to the resource.
  • Redirect URL - This is the URL to which the end user will be redirected, once data access has been authorized. The client application will generate a redirect URL automatically.

Create a connector

To create a connector:
  1. Log in to Zoho Developer Console and click Vertical Solutions.
  2. Select the application you'd like to modify and click Edit.
  3. Create a Connectors and under Utilities.
  4. Click Create Connector.
  5. Provide a suitable name and description for the connector.
  6. Provide the name of the third-party service.
  7. Provide the signup URL for the third-party service.
  8. Provide the URLs needed to generate the Auth token.
    • Request Token URL: This allows the connector to request authorization to access data on the resource server.
    • Access Token URL: Once authorized, the Request Token and Token Key will be exchanged for the Access Token, allowing the connector to draw specific information from the third-party server.
    • Refresh Token URL: Some applications increase security by limiting the duration of time a particular token is valid. In these cases, you will need to provide the Refresh Token URL to allow the connector to reauthorize access.
    • Revoke Token URL: Upon calling the Revoke Token URL, the application shall explicitly revoke tokens and revoke the granted access. Upon providing the Revoke Token URL, users are required to choose between Access Token or Refresh Token for the Revoke using field, which should be used when the Revoke token API call is made.
      • Choice of the token for the Revoke using field differs from service to service. Please ensure you choose the right token.

               

Set Client Credentials

Once the Connector details are saved, the Client Credentials pop-up will appear. You can register your solution with the respective third party web-service (Google, MailChimp, etc.) by picking the Redirect URL displayed in the pop-up and generating the Client ID & Client Secret generated at the web service.

Add APIs

Once you have created your Connector, define the actions it can perform by adding an API for each action taken by the connector. For example, once you have integrated with Google Drive, you can export the data present in your solution to your Google Drive, or vice-versa. Both these processes will require different APIs. These APIs will be available in the developer documentation of the application.
To add an API:
  1. At the Create Connector API page, click Create Connector API.



  2. Provide the following details:
    1. Name of Connector API
    2. Choose the Method type: Choose the Method type and provide the API URL. 
    3. The API method type and the API URL can be obtained from the resource application. Incase your API's URL contains dynamic values, they should be preceded by a "$" symbol and enclosed within {..}. For example, http://example.com/callback?id=${myid}&key=${mykey}.
    4. Specify the URL: Provide the API URL.
    5. You can include dynamic place holders in URL, header or request body using '${key}'. The values for these can later be given dynamically during execution eg: http://service.com/${recordId})
    6. Specify Headers: Specify the header fields and the URL parameters if applicable.
  3. Click Create.



These details, such as Method type, API URL, and Headers, will be provided by the third-party app provider.

Authorize a Connector

After you establish a connector, the connector has to be authorized. 
To authorize the connector:
  1. In the All Connectors page of your Zoho developer, open the respective connector by clicking on it.
  2. Click Authorize Connector


  3. Upon clicking Authorize Connector, if you're not already logged into the third-party account, you will be prompted to do so.
    Once you are logged in, the authorization window will explain the access permissions for the connector.
  4. Click Allow.
Once the Connector API is created and authorized, you can validate the API by executing and checking the response.

Validate API

You can validate the API by executing and checking the response.
  1. In the All Connectors page, click on the connector containing the APIs.
    A new page will appear, displaying all APIs associating with the connector.
  2. Choose the API from the left pane and click Execute


The API request's Response Code and Response Body will be displayed in the response area.

Publish a Connector

Publishing a connector technically means publishing the APIs associated with the connector.
To publish a connector:
  1. In the All Connectors page, click the connector in which the API is to be published and click Publish.
    A new popup will appear to provide publish details.
  2. Provide the following details:
    1. Connector Logo
    2. Support Email Address
    3. Release Notes

Associate Connector with Solution

To associate connectors with your solution:
  1. In your Zoho Developer Console home page, click Vertical Solutions.
  2. Select the solution to which you'd like to associate the connector.
  3. Click Connectors in the left pane and click Associated Connectors.
  4. Click Add Connector and choose the connector that you intend to associate.


  5. Click Add.

Connectors Actions

Once the Connector is published, you may define the actions it can perform On Authorization and On Revoking, which will define what action to be performed during an authorization of the connector, and on revoking this connector respectively.

To define and edit connectors actions:
  1. Navigate to the Associated Connectors page. The connectors will be listed.
  2. Hover over the respective connector and click View Actions.
  3. Write your function which needs to be performed on authorization of this connector at On Authorization.
  4. Write your function which needs to be performed on authorization of this connector at On Revoking.

Using Connectors APIs

Once a connector is created and connected, you can invoke the APIs defined in it via the below means:
  1. Custom functions using the invokeConnector deluge task 
  2. JS SDK Methods.

Invoking Connectors APIs via Custom Functions

Syntax

response_variable =zoho.crm.invokeConnector("connector_unique_identifier");

The connector_unique_identifier is the API name of the Connector and can be obtained from the Associated Connectors section of Connectors at the solution in which the connector is associated.
To find the connector_unique_identifier:
  1. Navigate to the Associated Connectors page and go to Associated Connectors.
  2. Hover over the respective connector and click View All API's.
    You can view the List of APIs.
  3. Click the respective APIs, to view the Connectors API Details.



  4. Find the API Unique identifier, which follows the format of connector_unique_identifier.connector_api_unique_identifier. For example, if the API Unique identifier is ' gcontacts.pushcontact ', gcontacts is the API name of the connector and pushcontact is the API name of the API .
    You may also click the Copy to Clipboard button to copy the sample script and use them in the custom functions.

Sample Code

data=Map();

data.put("First_Name","Alfred");

data.put("Last_Name","Little");

data.put("Email_ID","example@zohomail.com");

data.put("Phone_Number","");

zoho.crm.invokeconnector("gcontacts.pushcontact",data);

Invoking Connectors and its APIs via JS SDK Methods

Connectors and the APIs within them can be invoked via our JS SDK methods, thereby facilitating users to perform their business functionalities from a custom build widgets.

There are 4 methods that are associated with Connector in our JS SDK, which will we explain in detail below:
  1. Authorize a Connector
  2. Connector Status
  3. Revoke Connector
  4. Invoke Connector API
You can find the JS SDK and some sample widgets on our Github page.

Authorize a Connector

The ZOHO.CRM.CONNECTOR.authorize method can be used to authorize a connector, which will prompt the connector authorize window.

Syntax

 

ZOHO.CRM.CONNECTOR.authorize(connector_unique_identifier)

The connector_unique_identifier here refers to the API name of the Connector.

Sample code

var connectorAPIName = "zoho.authorize";

ZOHO.CRM.CONNECTOR.authorize(connectorAPIName);

Connector Status

The ZOHO.CRM.CONNECTOR.isConnectorAuthorized method can be used to check and verify the status of a connector. The response will be in boolean, where 'true' means the connector's authorization is active and 'false' means the connector's authorization is inactive and needs re-authorization.

Syntax

 

ZOHO.CRM.CONNECTOR.isConnectorAuthorized(connector_unique_identifier)


The connector_unique_identifier here refers to the NameSpace of Connector to authorize.

Sample code

var connectorAPIName = "zoho.authorize";

ZOHO.CRM.CONNECTOR.isConnectorAuthorized(connectorAPIName)

.then(function(result){

console.log(result)

});

Revoke Connector 

The ZOHO.CRM.CONNECTOR.revokeConnector method can be used to revoke the connector authorisation.

Syntax

 

ZOHO.CRM.CONNECTOR.revokeConnector(connector_unique_identifier)


The connector_api_unique_identifier here refers to the API name of the of the connector.

Sample Code

ZOHO.CRM.CONNECTOR.revokeConnector("zoho.accounts")

  .then(function(data){

      console.log(data)

  })

Invoke Connector API

The ZOHO.CRM.CONNECTOR.invokeAPI method can be used to Invoke the APIs defined within the connector.

Syntax
 

ZOHO.CRM.CONNECTOR.invokeAPI(connector_api_unique_identifier, data)



The connector_api_unique_identifier here refers to the API name of Connector API. The data here refers to the data object that has passed to the connector API.

The data object contains the following parameters:

NAME
TYPE
DESCRIPTION

VARIABLES
Object
Dynamic Data represented by placeholders in connectorAPI
CONTENT_TYPE
Object
ContentType - multipart for multipart request
PARTS
Array
For multipart request provide parts config here
FILE
Object
To include a file in your multipart request


Sample Code

var data = {

         "apikey":"**********",

         "name":"peter",

         "email":"example@zohomail.com"

}

ZOHO.CRM.CONNECTOR.invokeAPI("gcontacts.pushcontact",data)

.then(function(data){

console.log(data)
})

Authorizing Connectors in Subscriber Orgs

Once connectors are packaged and upgraded in a subscriber org, subscribers must authorize them in their orgs to make them active. 
Subscriber org admins must authorize each connector. If not authorized, the functionalities that use the connector will not work as intended.

To authorize connectors, subscribers should:
  1. Log in to the subscriber account.
  2. Go to Setup > Developer Space > Connectors.
  3. Click the Authorize button next to the connector you want to authorize.
  4. On the authorization page, enter your credentials for the third-party service and allow the access permissions for the application.
Upon clicking Authorize, you will be redirected to the respective third-party service's authorization page associated with the connector, defined in the developer console. Here, you will need to enter your credentials for the respective service and accept the access permissions for the application.

    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION








                                    You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                        Manage your brands on social media

                                          Zoho Desk Resources

                                          • Desk Community Learning Series


                                          • Digest


                                          • Functions


                                          • Meetups


                                          • Kbase


                                          • Resources


                                          • Glossary


                                          • Desk Marketplace


                                          • MVP Corner


                                          • Word of the Day


                                            Zoho Marketing Automation

                                              Zoho Sheet Resources

                                               

                                                  Zoho Forms Resources


                                                    Secure your business
                                                    communication with Zoho Mail


                                                    Mail on the move with
                                                    Zoho Mail mobile application

                                                      Stay on top of your schedule
                                                      at all times


                                                      Carry your calendar with you
                                                      Anytime, anywhere




                                                            Zoho Sign Resources

                                                              Sign, Paperless!

                                                              Sign and send business documents on the go!

                                                              Get Started Now




                                                                      Zoho TeamInbox Resources



                                                                              Zoho DataPrep Resources



                                                                                Zoho DataPrep Demo

                                                                                Get a personalized demo or POC

                                                                                REGISTER NOW


                                                                                  Design. Discuss. Deliver.

                                                                                  Create visually engaging stories with Zoho Show.

                                                                                  Get Started Now









                                                                                                      • Related Articles

                                                                                                      • Developing Third-party Integrations - Connectors

                                                                                                        The guide will help you with the following: Oauth 2.0 Create a connector  Add APIs  Publish the connector  Associate to an extension  Invoke connectors  Sample Connector   Zoho offers integration support for a wide range of third-party applications, ...
                                                                                                      • Vertical Solutions API - Overview

                                                                                                        Vertical Solutions provide APIs (Application Programming Interface) for integrating its modules with third-party applications such as, accounting, ERP, e-commerce, self-service portals and others. With this API, you can extract Solutions data in XML ...
                                                                                                      • Calls in Vertical Solutions

                                                                                                        Making and receiving calls are an essential part of a rep's daily activities. They need to track the calls that are made to the customers, schedule calls according to the customer's availability, take down the details of the calls, and make note of ...
                                                                                                      • Integrating with third-party applications

                                                                                                        Each industry comes with a unique set of problems to solve. To accommodate this diversity within the business world, we've created the Zoho Developer console, which allows you to integrate almost any third-party application with your CRM ...
                                                                                                      • Page Layouts in Vertical Solutions

                                                                                                        Page layouts in Vertical solutions allow you to organize the fields, sections and related lists in the record detail page of a module according to your business needs. With our intuitive easier-to-use drag-and-drop editor, you can add, remove, delete ...
                                                                                                        Wherever you are is as good as
                                                                                                        your workplace

                                                                                                          Resources

                                                                                                          Videos

                                                                                                          Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                          eBooks

                                                                                                          Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                          Webinars

                                                                                                          Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                          CRM Tips

                                                                                                          Make the most of Zoho CRM with these useful tips.



                                                                                                            Zoho Show Resources