Pulling data from any CRM can be useful to provide some added context to your people in the field. Integration into Zoho is no different. Unlike our out-of-the-box connection to Salesforce, an integration to Zoho will need to use our HTTP Connection.
Registering the application in Zoho
-
When you click on "Add Client" the first screen you will get is to choose a type, for a connection into TrueContext, we will select Server-based Applications.
-
When it prompts for a Redirect URL, we will use the URL that is documented here
-
Once the client is registered in Zoho, it will provide you with a Client ID and Secret. This information will be used to create the connection in TrueContext.
Creating a Connection in TrueContext
-
Create a new Connection in TrueContext and select the OAuth 2.0 with the grant type of "Authorization Code"
-
The different scopes are documented in the Zoho API here in this example, ZohoCRM.modules.ALL will give access to all modules.
-
Once you have input all the settings for the OAuth 2, you can click on the connect button at the bottom of the screen and you should be prompted to enter your credentials and allow access based on the scopes that were defined in the connection:
-
Once you see Connection Established, your connection has been made.
Creating a Data Source
Creating a Data Source to pull from Zoho will be created as an HTTP GET data source. In this example, we will pull a list of Accounts from Zoho to feed a dropdown with options.
-
Create a new Data Source using the HTTP GET option
-
Ensure that you are using the new Connection to Zoho that we created in the earlier step.
-
Since we are pulling a list of Accounts, the URL Path will be "Accounts" (change this to the module that you need to pull)
-
In the Query String Arguments, we will define the fields we want to include in the data source. We normally do not want to include all the fields and only those that will be used in the form.
-
Under Arguments, enter fields
-
Under Argument Value, enter the columns you want. To get you started you can enter: Account_Name,Billing_Street,Billing_City,Billing_Country for the name and billing address.
Once the data source is saved, you will see the columns get all filled in so you will see that the information is pulled into the data source.
Creating a Data Destination
To send data to Zoho to create or update entities, a JSON Request body must be sent along to Zoho. Sticking with the same theme of updating Accounts, we will be updating an Account in Zoho.
-
Create a new DREL Template document, this needs to line up with your form, but for example you can create a document like this. We are passing along the id, Billing City, Billing Street, and Billing Country. Ensure that the request is formatted like the following but change the Unique IDs to match that of your form:
{
"data": [
{
"id": "%a[id]",
"Billing_City": "%a[BillingCity]",
"Billing_Street": "%a[BillingStreet]",
"Billing_Country": "%a[BillingCountry]"
}
]
}
-
Next, we will create the destination. Create a new HTTP Data Destination, give it a name and under URL Suffix, enter "Accounts".
-
Attach your Data Destination to the form that you need and ensure that you include the DREL Template that you created in the previous step to the destination.
This is just scratching the surface of what you can do with this Integration but should give you enough information to interact with any other Module or Fields.
#TechTalkImplementation
#Integration
------------------------------
Ian Chamberlain
Solutions Architect
TrueContext
------------------------------