<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>zoho Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/zoho/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/zoho/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 11 Dec 2025 11:21:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>zoho Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/zoho/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</title>
		<link>https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 18:38:33 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[manageengine]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[servicedesk]]></category>
		<category><![CDATA[zoho]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9624</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use SSIS JSON/ REST API Source to extract data from Servicedesk API and use SSIS Web API Destination to write data to Zoho. We will look at step-by-step instructions to read ServiceDesk  data [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/zoho-managedengine-service-desk-plus-connector/">API Connector for Zoho / ManageEngine ServiceDesk Pro OnDemand (Cloud Version)</a> which makes it much simpler to <strong>Read/Write ServiceDesk Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<p>In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON/ REST API Source</a> to extract data from Servicedesk API and use <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a> to write data to Zoho.</p>
<p>We will look at step-by-step instructions to read ServiceDesk  data (e.g. Request, Problems, Contacts) and load into SQL Server Database Table.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Authentication ServiceDesk REST API in SSIS (Use OAuth 2.0)</h2>
<p>Very first step to call ServiceDesk API is you need to register OAuth App in Zoho Portal. Don&#8217;t get confused if you see Zoho Portal for ServiceDesk a Product from ManageEngine is in fact Zoho subsidiary (in other words Zoho is the parent company). ServiceDesk has On-Premises version too but this article is only about Cloud version.</p>
<h3>Register Zoho OAuth App and get ClientID/ Secret (*** MUST READ ***)</h3>
<p><a href="https://zappysys.com/blog/register-oauth-app-zoho-api/" target="_blank" rel="noopener">Check this article</a> to register your OAuth App and obtain Client ID  /Client Secret</p>
<h3>Create ServiceDesk API Connection in SSIS</h3>
<p>Once you create Zoho OAuth App now its time to call some Zoho API. Let&#8217;s create the OAuth Connection first. In the next section we will see how to load data in SQL Server.</p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div></li>
<li>Configure your OAuth connection General Tab as below</li>
<li>OAuth Provider: <strong>Custom</strong></li>
<li>OAuth Version: <strong>OAuth2</strong></li>
<li><strong>Client Id</strong> , <strong>Client Secret </strong></li>
<li>Enter One Scope Per Line (For more info on scope <a href="https://www.manageengine.com/products/service-desk/sdpod-v3-api/getting-started/oauth-2.0.html#scopes" target="_blank" rel="noopener">read here</a>) . For write you can change READ to WRITE or use ALL as per the help link.<br />
<pre class="crayon-plain-tag">SDPOnDemand.requests.READ</pre>
</li>
<li>Auth URL : <strong>https://accounts.zoho.com/oauth/v2/auth</strong></li>
<li>Token URL:  <strong><strong>https://accounts.zoho.com/oauth/v2/token</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
<li>Configure Advanced tab as below</li>
<li>Enter Callback URL : <strong>https://zappysys.com/oauth</strong></li>
<li>Enter Extra Attribute for /Auth : <strong>access_type=offline&amp;prompt=consent</strong><br />
This is needed to obtain refresh_token (if you ommit this then only access_token returned which cannot be renewed once expired after 1hr)</p>
<div class="mceTemp"></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
<li>Now go back to general tab and <strong>Click Generate Token</strong>. Close the Popup and use Full browser instead if you see prompt.</li>
<li>Click OK to save the connection UI</li>
</ol>
<h2>Read data from ServiceDesk API in SSIS JSON Source</h2>
<p>In this section we will learn how to read data from ServiceDesk using SSIS JSON Source. We will use OAuth connection created in earlier section.</p>
<p>Now lets look at step by step example of reading ManageEngine ServiceDesk data using SSIS (e.g. Requests).</p>
<p>ManageEngine provides JSON API for read action so we will Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose.</p>
<h3>Configure JSON Source</h3>
<p>So below steps shows example of reading from ManageEngine Requests API</p>
<ol>
<li>Open SSIS Package</li>
<li>Drag data flow task from Control flow SSIS Toolbox
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Drag data flow from SSIS Toolbox" width="460" height="155" /><p class="wp-caption-text">Drag data flow from SSIS Toolbox</p></div></li>
<li>Go to data flow and drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="Drag and drop SSIS JSON Source (REST API or File)" width="541" height="144" /><p class="wp-caption-text">Drag and drop SSIS JSON Source (REST API or File)</p></div></li>
<li>Double click JSON Source to configure. Enter URL as below. You can supply few more parameters. <a href="https://www.zoho.com/crm/developer/docs/api/get-records.html" target="_blank" rel="noopener">Click Here to get full list of parameters and usage</a>. In below example we are reading records from Leads Module but you can replace Leads to something else (e.g. Accounts). Refer to above help link for available Modules.<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests</pre>
</li>
<li>Check Use Credentials. Select OAuth connection manager we created in the previous section.</li>
<li>Add the Accept header in HTTP Headers.<br />
<pre class="crayon-plain-tag">Accept: application/vnd.manageengine.sdp.v3+json</pre>
</li>
<li>Under filter options tab, enter <strong>Array Filter</strong> as  <pre class="crayon-plain-tag">$.requests[*]</pre></li>
<li>Now click Preview to see your data</li>
<li>Click OK to save UI. In the next section, we will see how to setup pagination and incremental extract of Servicedesk records. After that we will see how to load data into SQL Server Table.</li>
</ol>
<div id="attachment_9626" style="width: 961px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9626" class="size-full wp-image-9626" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png" alt="Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) - Zoho API" width="951" height="909" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png 951w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-300x287.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-768x734.png 768w" sizes="(max-width: 951px) 100vw, 951px" /></a><p id="caption-attachment-9626" class="wp-caption-text">Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) &#8211; Zoho API</p></div>
<h3>ServiceDesk API Pagination (Read all Requests)</h3>
<p>Just like most API ServiceDesk also uses pagination. See below to learn how to configure pagination in JSON Source for ServiceDesk API.</p>
<ol>
<li>Double click JSON Source</li>
<li>Change URL to include two things (Page size (how many rows per page and start row). Note &lt;%page%&gt; must match with <strong>Page Num Indicator </strong>you going enter in the next screen<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests?input_data={"list_info":{"row_count":100,"start_index":&lt;%page%&gt;}}</pre>
</li>
<li>Go to <strong>Pagination</strong> Tab and select <strong>URL Path Mode</strong></li>
<li>For <strong>Page Num Indicator</strong> : Enter <pre class="crayon-plain-tag">&lt;%page%&gt;</pre></li>
<li>For <strong>Increment By</strong> : Enter <pre class="crayon-plain-tag">100</pre></li>
<li>Page Start Number select New variable call it StartIndex and start default value <strong>1</strong></li>
</ol>
<p>Once you configure this way now your API will return all records until last page is detected. For more information on pagination <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">check this article</a></p>
<div id="attachment_9628" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9628" class="size-full wp-image-9628" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png" alt="How to paginate ManageEngine ServiceDesk API" width="1033" height="1006" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png 1033w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-300x292.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-768x748.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-1024x997.png 1024w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-9628" class="wp-caption-text">How to paginate ManageEngine ServiceDesk API</p></div>
<h3>Loading ServiceDesk data into SQL Server Table / Other Target</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h3>Write data to ServiceDesk using OAuth 2.0</h3>
<p>If you like to load data from any source (i.e. SQL Server) to Zoho CRM then you can use <a href="https://www.zoho.com/crm/developer/docs/api/insert-records.html" target="_blank" rel="noopener">Records API (POST)</a>. Use a combination of the following Transforms  / Components. Later in this article we have some more examples (Older API) which may give you one more ways to load data into Zoho (Use of Template Transform).</p>
<p>Basically you have to build POST Body using JSON Generator Transform or Template Transform and then use that data in Web API Destination to call POST API request to push data to ServiceDesk. Basically screnshot below is just an example using some other Zoho API but you get the idea.</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-parser-transform/ssis-json-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_8312" style="width: 678px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8312" class="size-full wp-image-8312" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png" alt="Create JSON for POST request (Single dataset pattern)" width="668" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png 668w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write-275x300.png 275w" sizes="(max-width: 668px) 100vw, 668px" /></a><p id="caption-attachment-8312" class="wp-caption-text">Create JSON for POST request (Single dataset pattern)</p></div>
<p>&nbsp;</p>
<div id="attachment_8313" style="width: 757px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8313" class="size-full wp-image-8313" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png" alt="Insert data to Zoho Table using SSIS (Lead, Account Modules) - Bulk Load using POST API call" width="747" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png 747w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts-300x253.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8313" class="wp-caption-text">Insert data to Zoho Table using SSIS (Lead, Account Modules) &#8211; Bulk Load using POST API call</p></div>
<h2>Write data to ServiceDesk using SSIS (Import SQL Server Table to ServiceDesk)</h2>
<p>Now you know how to read data from Zoho CRM using JSON API Source next step is to load data to Zoho CRM. For writing data we will use following three components</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"></td>
<td>Template Transform</td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-parser-transform/" target="_blank" rel="noopener">XML Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div class="mceTemp"></div>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<div class="content_block" id="custom_post_widget-2021"><h2>Things have gone bad: Error handling &amp; debugging</h2>
<p style="text-align: justify;">Incidentally, bad things can happen<i>. </i>A remote server may go offline or your server may go out of memory. In any case, you may want to know when that happens and take actions accordingly. For that purpose, you have to redirect bad rows to some other destination. For this example, we will take and use <em>Web API Destination</em>, but basically, you can use any SSIS component:</p>

<h3>Handling errors</h3>
<ol style="margin-left: 0;">
 	<li>Add a <em>Derived Column</em> above <em>Web API Destination</em> with expression <strong>"(DT_WSTR,4000)ZS_JSON_OUT"</strong> and name it <strong>"JsonAsString"</strong>. This will let you see what JSON you are actually passing.</li>
 	<li>Then add a database or file destination or use another <em>Trash Destination</em> for debugging purposes and redirect the bad rows (<span style="color: #d66565;">red arrow</span>) from <em><em>Web API Destination </em></em>into it<em><em>. </em></em>Don't forget to set <span class="lang:default decode:true crayon-inline">Redirect row</span> option for both, <em>Error</em> and <em>Truncation</em> columns:<em><em>
</em></em>
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1487 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" alt="Redirect bad rows from &lt;em&gt;Web API Destination&lt;/em&gt; to &lt;em&gt;Trash Destination&lt;/em&gt; when load from SQL Server to Elasticsearch is failing. Add derived column JsonAsString to be able to read JSON you are using." width="739" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png 739w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows-300x108.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a>
<p class="wp-caption-text">Redirected failed requests from <em>Web API Destination</em> to a desired destination when loading from SQL Server to REST API Service is failing. Derived Column <em>JsonAsString</em> added to be able to read JSON which was passed to Elasticsearch</p>

</div></li>
 	<li>Finally, add a <a href="https://technet.microsoft.com/en-us/library/ms140318%28v=sql.90%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener"><em>Data Viewer</em></a> for the red path, if you want to debug the flow. You will be able to see URL, JSON and the error message for each record. You may want to copy-paste <em>ErrorMessage</em> to <em>Notepad </em>if you want it to be more readable:
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" alt="Use Data Viewer to view HTTP requests that failed to be fulfilled in Elasticsearch" width="752" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png 752w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-300x112.png 300w" sizes="(max-width: 752px) 100vw, 752px" /></a>
<p class="wp-caption-text">Use Data Viewer to view HTTP requests that failed to be fulfilled.</p>

</div></li>
</ol>
<div class="su-note" style="border-color: #e5dea5; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;">
<div class="su-note-inner su-clearfix" style="background-color: #fff7b7; border-color: #fffdf1; color: #333333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"><strong>NOTE</strong>: You can read more about redirecting rows in <a href="//zappysys.com/blog/ssis-error-handling-in-data-flow-redirect-bad-rows/" target="_blank" rel="noopener">SSIS Error Handling (Redirect bad rows)</a> article.</div>
</div>
<h3>Debugging HTTP requests</h3>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>
<p class="wp-caption-text">Debugging Web API call using Fiddler in SSIS</p>

</div></div>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Manageengine  Servicedesk API provides a great way to automate data read/write operations. However, to call Service API  you have to use SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any Servicedesk API call via a  simple drag and drop approach without coding. Try  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> for free and call virtually any REST API in a few clicks.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register OAuth App for Zoho / ManageEngine API</title>
		<link>https://zappysys.com/blog/register-oauth-app-zoho-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 17:31:59 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[manageengine]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[zoho]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9612</guid>

					<description><![CDATA[<p>Introduction In this article, we will show you steps to register OAuth App for Zoho API and use it ZappySys Product. The steps listed here can be used for Zoho Products like CRM or ManagedEngine Products like ServiceDesk (ManageEngine is Zoho&#8217;s subsidary). For detailed steps check Zoho&#8217;s link here. Register OAuth App in Zoho Go to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-oauth-app-zoho-api/">How to register OAuth App for Zoho / ManageEngine API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will show you steps to register OAuth App for Zoho API and use it ZappySys Product. The steps listed here can be used for Zoho Products like CRM or ManagedEngine Products like ServiceDesk (ManageEngine is Zoho&#8217;s subsidary). For detailed steps check Zoho&#8217;s <a href="https://www.zoho.com/crm/developer/docs/api/v2/register-client.html">link here</a>.</p>
<h2>Register OAuth App in Zoho</h2>
<ol>
<li>Go to <a href="https://api-console.zoho.com/" target="_blank" rel="noopener">Zoho API Console</a></li>
<li>Click on Add Client  link<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9613" src="https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client.png" alt="" width="347" height="187" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client.png 347w, https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client-300x162.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></a></li>
<li>Click on Server-Based App option<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9616" src="https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app.png" alt="" width="1105" height="532" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app.png 1105w, https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app-300x144.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app-768x370.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app-1024x493.png 1024w" sizes="(max-width: 1105px) 100vw, 1105px" /></a></li>
<li>When prompted enter following
<ol>
<li>Your <strong>APP NAME</strong></li>
<li>Your company <strong>Homepage URL</strong> (any)</li>
<li>Redirect URL (We suggest you use <strong>https://zappysys.com/oauth</strong> )</li>
<li>Click <strong><strong>CREATE</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9614" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url.png" alt="" width="694" height="550" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url.png 694w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url-300x238.png 300w" sizes="(max-width: 694px) 100vw, 694px" /></a></li>
</ol>
</li>
<li>After you create app you will see <strong>ClientID</strong> and <strong>ClientSecret</strong> (Copy them somewhere safe location). You will need this to enter on OAuth UI<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9615" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy.png" alt="" width="668" height="430" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy.png 668w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy-300x193.png 300w" sizes="(max-width: 668px) 100vw, 668px" /></a></li>
</ol>
<h2>Using Zoho OAuth in ZappySys Connection</h2>
<p>Now last step is using 3 pieces on ZappySys OAuth Connection UI (same UI in ODBC PowerPack or SSIS PowerPack Products)</p>
<ol>
<li>Depending which Product you are using find out OAuth Connection UI Edit / New Connection option and enter below</li>
<li>On General Page enter
<ol>
<li><strong>ClientID</strong>,</li>
<li><strong>ClientSecret </strong></li>
<li><strong>Scopes</strong> (Check API help page to find these.. each API requires different scope)</li>
<li><strong>Authorization URL</strong> and <strong>Token URL</strong> as below (if its US Region) . For Other regions refer <a href="https://www.zoho.com/crm/developer/docs/api/v2/multi-dc.html" target="_blank" rel="noopener">this article</a> to get URL<pre class="crayon-plain-tag">https://accounts.zoho.com/oauth/v2/auth</pre>
<pre class="crayon-plain-tag">https://accounts.zoho.com/oauth/v2/token</pre><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
</ol>
</li>
<li>Now go to Advanced Page and enter below
<ol>
<li><strong>Callback URL</strong> (exact same URL you configured in previous section)<br />
We suggest to use : <pre class="crayon-plain-tag">https://zappysys.com/oauth</pre></li>
<li><strong>Extra Auth Attributes</strong> like below<br />
<pre class="crayon-plain-tag">access_type=offline&amp;prompt=consent</pre>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
</ol>
</li>
<li>Now go to General Tab again and click <strong>&gt;&gt;Generate Token&lt;&lt;</strong></li>
<li><strong>Close Popup</strong> Browser and <strong>use Full Browser</strong> when Prompted</li>
<li>Follow the steps &#8230; If successful you will see Access Token and Refresh Token extracted on the OAuth Connection UI</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/register-oauth-app-zoho-api/">How to register OAuth App for Zoho / ManageEngine API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read / Write Zoho CRM data using SSIS REST API Call</title>
		<link>https://zappysys.com/blog/read-write-zoho-crm-data-using-ssis-rest-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 16 Feb 2018 04:21:06 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[SSIS XML Parser Transform]]></category>
		<category><![CDATA[crm]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[zoho]]></category>
		<category><![CDATA[zoho crm]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2625</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to read / write Zoho CRM data using SSIS (Drag and drop approach without any coding).  We will use SSIS JSON/ REST API Source to extract data from Zoho API and use SSIS Web API Destination to write data to Zoho. We will look at step-by-step instructions to read Zoho CRM [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-zoho-crm-data-using-ssis-rest-api-call/">Read / Write Zoho CRM data using SSIS REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/zoho-crm-connector/">API Connector for Zoho CRM Online</a> which makes it much simpler to <strong>Read/Write Zoho CRM Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-crm-api-integration-logo.jpg"><img loading="lazy" decoding="async" class=" wp-image-2655 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-crm-api-integration-logo.jpg" alt="" width="147" height="147" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-crm-api-integration-logo.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-crm-api-integration-logo-150x150.jpg 150w" sizes="(max-width: 147px) 100vw, 147px" /></a>In this post, you will learn how to read / write Zoho CRM data using SSIS (Drag and drop approach without any coding).  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON/ REST API Source</a> to extract data from Zoho API and use <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a> to write data to Zoho.</p>
<p>We will look at step-by-step instructions to read Zoho CRM data (e.g. Leads, Accounts, Contacts) and load into SQL Server Database Table. In the next section, we will look at Write scenario too.</p>
<p>Now let’s look at step-by-step approach to call Zoho API  using SSIS.</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Authentication Using Zoho V2 REST API (OAuth 2.0)</h2>
<p>Zoho recently released v2 API. It uses OAuth 2.0 instead of static Token based (described in the next section). OAuth approach is more secure an recommended. If you must use static token-method then check next section. Zoho may discontinue Token based method in future.</p>
<h3>Register Zoho OAuth App and get ClientID/ Secret (*** MUST READ ***)</h3>
<p><a href="https://zappysys.com/blog/register-oauth-app-zoho-api/" target="_blank" rel="noopener">Check this article</a> to register your OAuth App and obtain Client ID  /Client Secret</p>
<h3>Create Zoho OAuth Connection in SSIS (for API call)</h3>
<p>Once you create Zoho OAuth App now its time to call some Zoho API. We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZappySys REST API Task</a> to make simple API call. In the next section we will see how to load data in SQL Server.</p>
<ol>
<li>Open SSIS Package and go to SSIS Designer (Control Flow)</li>
<li>Drag <strong>ZS REST API Task</strong> from Control Flow SSIS Toolbox as below
<div style="width: 565px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="Drag and drop SSIS REST API Task from SSIS Toolbox " width="555" height="199" /><p class="wp-caption-text">Drag and drop SSIS REST API Task from SSIS Toolbox</p></div></li>
<li>Double click the task to configure.</li>
<li>Change URL Access mode to <strong>URL from Connection</strong></li>
<li>Enter API <strong>URL</strong> you like to call. For example you can enter below<br />
<pre class="crayon-plain-tag">https://www.zohoapis.com/crm/v2/settings/modules</pre>
</li>
<li>Select <strong>New ZS-OAUTH</strong> connection from Connection drop down
<div id="attachment_8307" style="width: 511px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-rest-api-oauth-use-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8307" class="size-full wp-image-8307" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-rest-api-oauth-use-connection.png" alt="Call Zoho REST API using OAuth 2.0" width="501" height="406" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-rest-api-oauth-use-connection.png 501w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-rest-api-oauth-use-connection-300x243.png 300w" sizes="(max-width: 501px) 100vw, 501px" /></a><p id="caption-attachment-8307" class="wp-caption-text">Call Zoho REST API using OAuth 2.0</p></div></li>
<li>Configure your OAuth connection General Tab as below
<ol>
<li>OAuth Provider: <strong>Custom</strong></li>
<li>OAuth Version: <strong>OAuth2</strong></li>
<li><strong>Client Id</strong> , <strong>Client Secret </strong></li>
<li>Enter One Scope Per Line (For more info on scope <a href="https://www.zoho.com/crm/help/api/v2/#OAuth2_0" target="_blank" rel="noopener">read here</a>)<br />
<pre class="crayon-plain-tag">ZohoCRM.modules.READ
ZohoCRM.settings.READ</pre>
</li>
<li>Auth URL : <strong>https://accounts.zoho.com/oauth/v2/auth</strong></li>
<li>Token URL:  <strong><strong>https://accounts.zoho.com/oauth/v2/token</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
</ol>
</li>
<li>Configure Advanced tab as below
<ol>
<li>Enter Callback URL : <strong>https://zappysys.com/oauth</strong></li>
<li>Enter Extra Attribute for /Auth : <strong>access_type=offline&amp;prompt=consent</strong><br />
This is needed to obtain refresh_token (if you ommit this then only access_token returned which cannot be renewed once expired after 1hr)</p>
<div class="mceTemp"></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
</ol>
</li>
<li>Now go back to general tab and <strong>Click Generate Token</strong>.
<div id="attachment_3349" style="width: 824px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-oauth-get-token-authenticate-for-rest-api-access.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3349" class="size-full wp-image-3349" src="https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-oauth-get-token-authenticate-for-rest-api-access.png" alt="Generate OAuth Token for Zoho CRM REST API Access" width="814" height="749" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-oauth-get-token-authenticate-for-rest-api-access.png 814w, https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-oauth-get-token-authenticate-for-rest-api-access-300x276.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/zoho-oauth-get-token-authenticate-for-rest-api-access-768x707.png 768w" sizes="(max-width: 814px) 100vw, 814px" /></a><p id="caption-attachment-3349" class="wp-caption-text">Generate OAuth Token for Zoho CRM REST API Access</p></div></li>
<li>Click OK to save the connection UI</li>
</ol>
<h3>Call Zoho API using OAuth Connection</h3>
<ol>
<li>On the REST API Task click Test Request / Response
<div id="attachment_3351" style="width: 790px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-zoho-rest-api-using-oauth.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3351" class="size-full wp-image-3351" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-zoho-rest-api-using-oauth.png" alt="SSIS REST API Task - Call Zoho REST API in SSIS (OAuth 2.0) " width="780" height="679" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-zoho-rest-api-using-oauth.png 780w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-zoho-rest-api-using-oauth-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-call-zoho-rest-api-using-oauth-768x669.png 768w" sizes="(max-width: 780px) 100vw, 780px" /></a><p id="caption-attachment-3351" class="wp-caption-text">SSIS REST API Task &#8211; Call Zoho REST API in SSIS (OAuth 2.0)</p></div></li>
</ol>
<h2>Read data from Zoho Table in SSIS JSON Source</h2>
<p>In this section we will learn how to read data from Zoho using SSIS JSON Source. We will use OAuth connection created in earlier section.</p>
<p>Now lets look at step by step example of reading Zoho CRM data using SSIS (e.g. read Leads, Accounts, Contacts, Invoice etc). Zoho provides JSON API for read action so we will Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose. Full sample package is attached at the end of this article but see below steps for high level configuration.</p>
<h3>Configure JSON Source</h3>
<p>So below steps shows example of reading from Zoho Lead modules using <a href="https://www.zoho.com/crm/developer/docs/api/get-records.html" target="_blank" rel="noopener">v2 records API Call</a>.</p>
<ol>
<li>Open SSIS Package</li>
<li>Drag data flow task from Control flow SSIS Toolbox
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Drag data flow from SSIS Toolbox" width="460" height="155" /><p class="wp-caption-text">Drag data flow from SSIS Toolbox</p></div></li>
<li>Go to data flow and drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="Drag and drop SSIS JSON Source (REST API or File)" width="541" height="144" /><p class="wp-caption-text">Drag and drop SSIS JSON Source (REST API or File)</p></div></li>
<li>Double click JSON Source to configure. Enter URL as below. You can supply few more parameters. <a href="https://www.zoho.com/crm/developer/docs/api/get-records.html" target="_blank" rel="noopener">Click Here to get full list of parameters and usage</a>. In below example we are reading records from Leads Module but you can replace Leads to something else (e.g. Accounts). Refer to above help link for available Modules.<br />
<pre class="crayon-plain-tag">https://www.zohoapis.com/crm/v2/Leads?per_page=200</pre>
</li>
<li>Check Use Credentials. Select OAuth connection manager we created in the previous section.</li>
<li>Under filter options tab, enter Array Filter as  <pre class="crayon-plain-tag">$.data[*]</pre></li>
<li>Now click Preview to see your data
<div id="attachment_8308" style="width: 947px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-extract-data-based-on-last-modified-date.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8308" class="size-full wp-image-8308" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-extract-data-based-on-last-modified-date.png" alt="Read data from Zoho API v2 using SSIS - OAuth (Use Last Modified Date for Incremental Extract)" width="937" height="806" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-extract-data-based-on-last-modified-date.png 937w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-extract-data-based-on-last-modified-date-300x258.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-extract-data-based-on-last-modified-date-768x661.png 768w" sizes="(max-width: 937px) 100vw, 937px" /></a><p id="caption-attachment-8308" class="wp-caption-text">Read data from Zoho API v2 using SSIS &#8211; OAuth (Use Last Modified Date for Incremental Extract)</p></div></li>
<li>Click OK to save UI. In the next section we will see how to setup pagination and incremental extract of Zoho records. After that we will see how to load data into SQL Server Table.</li>
</ol>
<h3>Zoho API Pagination (Read all rows)</h3>
<p>Just like most API zoho also uses pagination. See below for how to configure pagination in JSON Source for Zoho API.</p>
<ol>
<li>Double click JSON Source</li>
<li>Go to the <strong>Pagination</strong> Tab and select <strong>URL Parameter Mode</strong></li>
<li>For <strong>Page Num Indicator</strong> Enter <pre class="crayon-plain-tag">page</pre></li>
<li>For <strong>Last Page Detection</strong> select <pre class="crayon-plain-tag">Detect last page based on status code</pre></li>
<li>In the Status code field<br />
enter <strong>304</strong> (if you added If-Modified-Since header for incremental extract &#8211; See next section)<br />
enter <strong>204</strong> (if you do not add If-Modified-Since)</li>
</ol>
<p>Once you configure this way now your API will return all records until last page is detected. For more information on pagination <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">check this article</a></p>
<div id="attachment_8309" style="width: 674px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/pagination-stop-detect-based-on-status-code.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8309" class="size-full wp-image-8309" src="https://zappysys.com/blog/wp-content/uploads/2018/02/pagination-stop-detect-based-on-status-code.png" alt="Paginate Zoho API records" width="664" height="243" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/pagination-stop-detect-based-on-status-code.png 664w, https://zappysys.com/blog/wp-content/uploads/2018/02/pagination-stop-detect-based-on-status-code-300x110.png 300w" sizes="(max-width: 664px) 100vw, 664px" /></a><p id="caption-attachment-8309" class="wp-caption-text">Paginate Zoho API records</p></div>
<h3>Incremental Extract based on Last Modified Date/Time field</h3>
<p>Each module in Zoho has Last Modified By and LastModified Date/Time fields. You can filter extracted data for incremental extract by supplying <pre class="crayon-plain-tag">If-Modified-Since</pre>  HTTP header along with your request. Here is how to do.</p>
<ol>
<li>On the JOSN Source, click Raw Edit above HTTP Headers Grid.  We can define Header to extract data after last modified date. Skip this step if you like to extract all records.<br />
For example to read Lead records which are modified after 12/31/2019 you can enter header like below. Date/Time is UTC. When record is created Modified date is set as creation date too so this will include created records too.<br />
<pre class="crayon-plain-tag">If-Modified-Since: 2019-12-31T00:00:00</pre>
If you have local time saved in a variable and you like to use SSIS variable then you can use below way. In this example we converted Local time to UTC.<br />
<pre class="crayon-plain-tag">If-Modified-Since: &lt;&lt;{{User::varExtractDate,yyyy-MM-ddTHH:mm:ss}},FUN_TO_UTC_DATE&gt;&gt;</pre>
</li>
</ol>
<h2></h2>
<h3>Loading Zoho data into SQL Server Table / Other Target</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h3>Write data to Zoho CRM using OAuth 2.0</h3>
<p>If you like to load data from any source (i.e. SQL Server) to Zoho CRM then you can use <a href="https://www.zoho.com/crm/developer/docs/api/insert-records.html" target="_blank" rel="noopener">Records API (POST)</a>. Use combination of the following Transforms  / Components. Later in this article we have some more examples (Older API) which may give you one more ways to load data into Zoho (Use of Template Transform).</p>
<p>Basically you have to build POST Body using JSON Generator Transform or Template Transform and then use that data in Web API Destination to call POST API request to push data to Zoho.</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-parser-transform/ssis-json-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_8312" style="width: 678px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8312" class="size-full wp-image-8312" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png" alt="Create JSON for POST request (Single dataset pattern)" width="668" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png 668w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write-275x300.png 275w" sizes="(max-width: 668px) 100vw, 668px" /></a><p id="caption-attachment-8312" class="wp-caption-text">Create JSON for POST request (Single dataset pattern)</p></div>
<p>&nbsp;</p>
<div id="attachment_8313" style="width: 757px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8313" class="size-full wp-image-8313" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png" alt="Insert data to Zoho Table using SSIS (Lead, Account Modules) - Bulk Load using POST API call" width="747" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png 747w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts-300x253.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8313" class="wp-caption-text">Insert data to Zoho Table using SSIS (Lead, Account Modules) &#8211; Bulk Load using POST API call</p></div>
<h2>Authentication Using Zoho Tokens</h2>
<p>If you don&#8217;t want to use a <a href="https://www.zoho.com/crm/help/api/v2/" target="_blank" rel="noopener">newer version of Zoho API</a> (v2) then you can use Token based Authentication method.</p>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Token based method will be depreciated soon so avoid it if possible. Use OAuth 2.0 described in the previous section whenever possible. </div></div>
<p>In Zoho Portal perform following steps to obtain API token</p>
<ol>
<li>Click on Setup (Toolbox icon at the top-right corner)</li>
<li>Search for &#8220;API&#8221; &gt; Select CRM API  or find under <strong>Developer space</strong> &gt; <strong>APIs</strong></li>
<li>Click on <strong>Gear icon</strong> found above Usage Panel (small icon so find carefully)</li>
<li>Click on <strong>Authentication Token generation</strong></li>
<li>Specify the APP Name and <strong>Click Generate</strong></li>
<li>This will direct to the new page which may contain text like below. Just copy AUTHTOKEN part (i.e. <strong>8a08xxxxxxxxxx13630d</strong> )<br />
<pre class="crayon-plain-tag">#
#Mon May 15 12:21:42 PDT 2017
AUTHTOKEN=8a083f76xxxxxxxxxxxxxxxxxxxdxxxxxxxx13630d
RESULT=TRUE</pre>
</li>
<li>Now use the newly created auth token to your API call.</li>
</ol>
<div id="attachment_2642" style="width: 1091px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/how-to-get-zoho-crm-api-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2642" class="size-full wp-image-2642" src="https://zappysys.com/blog/wp-content/uploads/2018/02/how-to-get-zoho-crm-api-token.png" alt="How to get Zoho CRM API Token(For SSIS or other app integration)" width="1081" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/how-to-get-zoho-crm-api-token.png 1081w, https://zappysys.com/blog/wp-content/uploads/2018/02/how-to-get-zoho-crm-api-token-300x160.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/how-to-get-zoho-crm-api-token-768x409.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/02/how-to-get-zoho-crm-api-token-1024x546.png 1024w" sizes="(max-width: 1081px) 100vw, 1081px" /></a><p id="caption-attachment-2642" class="wp-caption-text">How to get Zoho CRM API Token (For SSIS or other app integration)</p></div>
<p>&nbsp;</p>
<h3>Read data from Zoho using SSIS (Export Zoho CRM data to SQL Server Table)</h3>
<p>Now lets look at step by step example of reading Zoho CRM data using SSIS (e.g. read Leads, Accounts, Contacts, Invoice etc). Zoho provides JSON API for read action so we will Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose. Full sample package is attached at the end of this article but see below steps for high level configuration.</p>
<p>So below steps shows example of reading Zoho Lead modules using <a href="https://www.zoho.com/crm/help/api/getrecords.html" target="_blank" rel="noopener">getRecords API Call</a>.</p>
<ol>
<li>Goto SSIS &gt; Variable and create a new string variable called token. Enter your Zoho API token as value (see previous section to get API token)</li>
<li>Drag data flow task from Control flow SSIS Toolbox</li>
<li>Go to data flow and drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox</li>
<li>Double click JSON Source to configure as below
<ol>
<li>Enter URL as below. Note that we have use Variable for Token to make URL dynamic.To read from different module change URL (e.g. rather than Leads in URL use Accounts).  <a href="https://www.zoho.com/crm/help/api/modules-fields.html" target="_blank" rel="noopener">Click Here to get full list of Modules and Fields</a><br />
<pre class="crayon-plain-tag">https://crm.zoho.com/crm/private/json/Leads/getRecords?newFormat=1&amp;authtoken={{User::token}}&amp;scope=crmapi&amp;fromIndex=0&amp;toIndex=200</pre>
You can also use lastModifiedTime parameter along leads modified after certain date/time (this time is <strong>Local time</strong> and not the UTC). To extract leads modified after certain date (Create a datetime variable called varExtractDate) and use it as below in the URL. You can use any <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">valid format specifiers for date time</a><br />
<pre class="crayon-plain-tag">https://crm.zoho.com/crm/private/json/Leads/getRecords?newFormat=1&amp;authtoken={{User::token}}&amp;scope=crmapi&amp;fromIndex=0&amp;toIndex=200&amp;lastModifiedTime={{User::varExtractDate,yyyy-MM-dd HH:mm:ss}}</pre>
</li>
<li>Click on the Select Filter and select node with Array icon as below. Each Module may have different structure for example for Leads module Filter may look like <strong>$.response.result.Leads.row[*]</strong>
<div id="attachment_2643" style="width: 1028px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-using-json-api-source-import-leads.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2643" class="size-full wp-image-2643" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-using-json-api-source-import-leads.png" alt="Configure SSIS JSON Source - Read Zoho CRM Leads (getRecords API call with lastModifiedDate Example)" width="1018" height="759" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-using-json-api-source-import-leads.png 1018w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-using-json-api-source-import-leads-300x224.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-using-json-api-source-import-leads-768x573.png 768w" sizes="(max-width: 1018px) 100vw, 1018px" /></a><p id="caption-attachment-2643" class="wp-caption-text">Configure SSIS JSON Source &#8211; Read Zoho CRM Leads (getRecords API call with lastModifiedDate Example)</p></div></li>
<li>Now go to 2D Array Tab and configure like below
<ol>
<li>Select Transform Type to Key/Value Pivot Mode.</li>
<li>Select or type Column Filter as <strong>$.FL[*].val</strong></li>
<li>Select or type Row Value Filter as <strong>$.FL[*].content</strong></li>
</ol>
</li>
<li>Once you configure 2D Array Transform click Preview to see sample data</li>
<li>.<a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-pivot-attributes-preview-leads.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2644" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-pivot-attributes-preview-leads.png" alt="" width="736" height="460" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-pivot-attributes-preview-leads.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-pivot-attributes-preview-leads-300x188.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-read-zoho-crm-data-pivot-attributes-preview-leads-436x272.png 436w" sizes="(max-width: 736px) 100vw, 736px" /></a></li>
<li>Click OK to save JSON Source and attach it to target such as SQL Server Destination like below.</li>
<li>Execute Package to test.
<div id="attachment_2645" style="width: 718px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-to-sql-server-data-table-loading-json-api-source-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2645" class="size-full wp-image-2645" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-to-sql-server-data-table-loading-json-api-source-example.png" alt="SSIS Example : Loading Zoho CRM data to SQL Server Table (JSON API Source)" width="708" height="343" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-to-sql-server-data-table-loading-json-api-source-example.png 708w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-to-sql-server-data-table-loading-json-api-source-example-300x145.png 300w" sizes="(max-width: 708px) 100vw, 708px" /></a><p id="caption-attachment-2645" class="wp-caption-text">SSIS Example : Loading Zoho CRM data to SQL Server Table (JSON API Source)</p></div></li>
</ol>
</li>
</ol>
<h2>Write data to Zoho using SSIS (Import SQL Server Table to Zoho CRM)</h2>
<p>Now you know how to read data from Zoho CRM using JSON API Source next step is to load data to Zoho CRM. For writing data we will use following three components</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"></td>
<td>Template Transform</td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-parser-transform/" target="_blank" rel="noopener">XML Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<p>For this example we will use hard coded data in CSV Source (Sample Leads ) but in real world you will have data coming from some RDBMS such as SQL Server.</p>
<ol>
<li>Drag Data flow Task and double click to go to Data flow designer.</li>
<li>Drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/" target="_blank" rel="noopener">ZS CSV Source</a> from the SSIS Toolbox. Change Access mode to Direct Value. Enter following sample data for demo.<br />
<pre class="crayon-plain-tag">Company,First Name,Last Name,Email,Lead Status,Lead Source,Phone
Microsoft,TestMaawia,TestBrito,Maawia@outlook.com,Lunk Lead,Web Download,111-111-3333
Microsoft,Testraja,Testvedaiyan,raja@outlook.com,Lunk Lead,Web Download,111-222-3333
Yahoo,TestJayder,Testelnageib,Jayder@outlook.com,Lunk Lead,Web Download,111-333-3333
Yahoo,TestStephen,TestTjebane,Stephen@outlook.com,Lunk Lead,Web Download,111-444-3333
Google,TestHarold,TestBatista,Harold@gmail.com,Lunk Lead,Web Download,111-555-3333
Google,TestVennon,TestMills,Vennon@gmail.com,Lunk Lead,Web Download,111-666-3333
Google,TestMichael,TestTremblay,Michael@gmail.com,Lunk Lead,Web Download,111-777-3333</pre>
</li>
<li>Now drag ZS Template Transform. Connect it with previous step.</li>
<li>Double click Template Transform to configure it with following sample Text (This transform was introduced in v2.6.6. If you dont see it then update your SSIS PowerPack to latest version). Use of XMLENC is optional for Non string columns or Alphanumeric values but if you not sure about column type then just add it anyways.<br />
<pre class="crayon-plain-tag">&lt;Leads&gt;
 &lt;row no="1"&gt;
  &lt;FL val="Lead Status"&gt;&lt;%Lead Status,XMLENC%&gt;&lt;/FL&gt;
  &lt;FL val="Company"&gt;&lt;%Company,XMLENC%&gt;&lt;/FL&gt;
  &lt;FL val="First Name"&gt;&lt;%First Name,XMLENC%&gt;&lt;/FL&gt;
  &lt;FL val="Last Name"&gt;&lt;%Last Name,XMLENC%&gt;&lt;/FL&gt;
  &lt;FL val="Email"&gt;&lt;%Email,XMLENC%&gt;&lt;/FL&gt;
  &lt;FL val="Phone"&gt;&lt;%Phone,XMLENC%&gt;&lt;/FL&gt;
  &lt;FL val="Lead Source"&gt;Web Download&lt;/FL&gt;
 &lt;/row&gt;
&lt;/Leads&gt;</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-create-xml-body.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2647" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-create-xml-body.png" alt="" width="922" height="762" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-create-xml-body.png 922w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-create-xml-body-300x248.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-create-xml-body-768x635.png 768w" sizes="(max-width: 922px) 100vw, 922px" /></a></li>
<li>Now drag another ZS Template Transform and connect it with previous step.</li>
<li>Double click Template Transform to configure. Enter below text. This is final text we will use as Request Body in the Web API Destination.<br />
<pre class="crayon-plain-tag">xmlData=&lt;%TemplateOutput,URLENC%&gt;</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-encode-post-xml-body.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2648" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-encode-post-xml-body.png" alt="" width="725" height="711" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-encode-post-xml-body.png 725w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-encode-post-xml-body-300x294.png 300w" sizes="(max-width: 725px) 100vw, 725px" /></a></li>
<li>Drag Microsoft Derived Column Transform. Connect with previous step and double click it to configure.</li>
<li>Select <strong>Replace &#8216;TemplateOutput&#8217;</strong> action. Type new column name in the first column e.g. <strong>TemplateOutput_Encoded</strong><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-derived-column-rename.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2649" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-derived-column-rename.png" alt="" width="849" height="386" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-derived-column-rename.png 849w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-derived-column-rename-300x136.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-api-derived-column-rename-768x349.png 768w" sizes="(max-width: 849px) 100vw, 849px" /></a></li>
<li>Now drag ZS Web API Destination, Connect with previous step and double click to configure as below.
<ol>
<li>Select New HTTP Connection. Enter some valid URL e.g. https://zoho.com  (This will be ignored anyways because we will use Dynamic URL on main UI)</li>
<li>Enter URL as below (see how we again added API token as dynamic variable) . If you inserting to different Module (e.g. Accounts rather than Leads then change accordingly).   <a href="https://www.zoho.com/crm/help/api/modules-fields.html" target="_blank" rel="noopener">Click Here to get full list of Modules and Fields</a><br />
<pre class="crayon-plain-tag">https://crm.zoho.com/crm/private/xml/Leads/insertRecords?newFormat=1&amp;authtoken={{User::token}}&amp;scope=crmapi&amp;duplicateCheck</pre>
</li>
<li>Select Input Body column as <strong>TemplateOutput_Encoded</strong></li>
<li>Enter Sample Body as below if you like to use Test feature else ignore this step. Click Test to see its working. Capture Response XML because you may need in the next step to feed as sample to XML Parser Transform (again optional step).<br />
<pre class="crayon-plain-tag">&lt;Leads&gt;
 &lt;row no="1"&gt;
  &lt;FL val="Lead Status"&gt;Junk Lead&lt;/FL&gt;
  &lt;FL val="Company"&gt;ABCD Inc&lt;/FL&gt;
  &lt;FL val="First Name"&gt;Bob&lt;/FL&gt;
  &lt;FL val="Last Name"&gt;Smith&lt;/FL&gt;
  &lt;FL val="Email"&gt;bob@abc.com&lt;/FL&gt;
  &lt;FL val="Phone"&gt;111-222-3333&lt;/FL&gt;
  &lt;FL val="Lead Source"&gt;Web Download&lt;/FL&gt;
 &lt;/row&gt;
&lt;/Leads&gt;</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-web-api-destination-post.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2650" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-web-api-destination-post.png" alt="" width="833" height="615" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-web-api-destination-post.png 833w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-web-api-destination-post-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-insert-leads-web-api-destination-post-768x567.png 768w" sizes="(max-width: 833px) 100vw, 833px" /></a></li>
</ol>
</li>
<li>Now once API destination is set we can optionally configure below steps if you want to store status and ID of newly created records. If you don&#8217;t care for that then skip below steps.</li>
<li>Drag ZS XML Parser Transform, Connect it Web API Destination (Response Output &#8211; Blue Arrow). Double click XML Parser to configure as below
<ol>
<li>Select Input XMl Column as <strong>ResponseText</strong></li>
<li>Enter Sample Text as below<br />
<pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;response uri="/crm/private/xml/Leads/insertRecords"&gt;
	&lt;result&gt;
		&lt;message&gt;Record(s) added successfully&lt;/message&gt;
		&lt;recorddetail&gt;
			&lt;FL val="Id"&gt;1558554000015597002&lt;/FL&gt;
			&lt;FL val="Created Time"&gt;2018-02-13 16:14:10&lt;/FL&gt;
			&lt;FL val="Modified Time"&gt;2018-02-13 16:14:10&lt;/FL&gt;
			&lt;FL val="Created By"&gt;
				&lt;![CDATA[ZappySys Support]]&gt;
			&lt;/FL&gt;
			&lt;FL val="Modified By"&gt;
				&lt;![CDATA[ZappySys Support]]&gt;
			&lt;/FL&gt;
		&lt;/recorddetail&gt;
	&lt;/result&gt;
&lt;/response&gt;</pre>
&nbsp;</li>
<li>Enter Filter as below<br />
<pre class="crayon-plain-tag">$.response.result.recorddetail[*]</pre>
</li>
<li><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-response-insert-leads-web-api-destination-extract-id.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2651" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-response-insert-leads-web-api-destination-extract-id.png" alt="" width="1042" height="534" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-response-insert-leads-web-api-destination-extract-id.png 1042w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-response-insert-leads-web-api-destination-extract-id-300x154.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-response-insert-leads-web-api-destination-extract-id-768x394.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-response-insert-leads-web-api-destination-extract-id-1024x525.png 1024w" sizes="(max-width: 1042px) 100vw, 1042px" /></a></li>
<li>Now Go to 2D Array Transform Tab. Configure as below</li>
<li>Select Transform Mode to <strong>Key/Value</strong></li>
<li>Column name filter as  <pre class="crayon-plain-tag">$.FL[:3].@val</pre></li>
<li>Row value filter as  <pre class="crayon-plain-tag">$.FL[:3].#text</pre><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-xml-api-response-extract-record-id.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-2652" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-xml-api-response-extract-record-id.png" alt="" width="898" height="261" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-xml-api-response-extract-record-id.png 898w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-xml-api-response-extract-record-id-300x87.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-crm-parse-xml-api-response-extract-record-id-768x223.png 768w" sizes="(max-width: 898px) 100vw, 898px" /></a></li>
<li>Now click OK to close.</li>
</ol>
</li>
<li>Drag ZS Trash Destination or some other destination (e.g. SQL Server) and connect Red arrow coming from Web API destination to this component to capture any errors.</li>
<li>Thats it now you ready to run your SSIS sample package which Inserts Leads to Zoho CRM. See below for full package.</li>
</ol>
<div id="attachment_2653" style="width: 808px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-api-call-insert-records-leads.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2653" class="size-full wp-image-2653" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-api-call-insert-records-leads.png" alt="SSIS Example: Import data to Zoho CRM using SSIS Web API Destination (Loading Leads, Accounts, Contacts)" width="798" height="772" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-api-call-insert-records-leads.png 798w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-api-call-insert-records-leads-300x290.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-api-call-insert-records-leads-768x743.png 768w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-2653" class="wp-caption-text">SSIS Example: Import data to Zoho CRM using SSIS Web API Destination (Loading Leads, Accounts, Contacts)</p></div>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<div class="content_block" id="custom_post_widget-2021"><h2>Things have gone bad: Error handling &amp; debugging</h2>
<p style="text-align: justify;">Incidentally, bad things can happen<i>. </i>A remote server may go offline or your server may go out of memory. In any case, you may want to know when that happens and take actions accordingly. For that purpose, you have to redirect bad rows to some other destination. For this example, we will take and use <em>Web API Destination</em>, but basically, you can use any SSIS component:</p>

<h3>Handling errors</h3>
<ol style="margin-left: 0;">
 	<li>Add a <em>Derived Column</em> above <em>Web API Destination</em> with expression <strong>"(DT_WSTR,4000)ZS_JSON_OUT"</strong> and name it <strong>"JsonAsString"</strong>. This will let you see what JSON you are actually passing.</li>
 	<li>Then add a database or file destination or use another <em>Trash Destination</em> for debugging purposes and redirect the bad rows (<span style="color: #d66565;">red arrow</span>) from <em><em>Web API Destination </em></em>into it<em><em>. </em></em>Don't forget to set <span class="lang:default decode:true crayon-inline">Redirect row</span> option for both, <em>Error</em> and <em>Truncation</em> columns:<em><em>
</em></em>
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1487 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" alt="Redirect bad rows from &lt;em&gt;Web API Destination&lt;/em&gt; to &lt;em&gt;Trash Destination&lt;/em&gt; when load from SQL Server to Elasticsearch is failing. Add derived column JsonAsString to be able to read JSON you are using." width="739" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png 739w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows-300x108.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a>
<p class="wp-caption-text">Redirected failed requests from <em>Web API Destination</em> to a desired destination when loading from SQL Server to REST API Service is failing. Derived Column <em>JsonAsString</em> added to be able to read JSON which was passed to Elasticsearch</p>

</div></li>
 	<li>Finally, add a <a href="https://technet.microsoft.com/en-us/library/ms140318%28v=sql.90%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener"><em>Data Viewer</em></a> for the red path, if you want to debug the flow. You will be able to see URL, JSON and the error message for each record. You may want to copy-paste <em>ErrorMessage</em> to <em>Notepad </em>if you want it to be more readable:
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" alt="Use Data Viewer to view HTTP requests that failed to be fulfilled in Elasticsearch" width="752" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png 752w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-300x112.png 300w" sizes="(max-width: 752px) 100vw, 752px" /></a>
<p class="wp-caption-text">Use Data Viewer to view HTTP requests that failed to be fulfilled.</p>

</div></li>
</ol>
<div class="su-note" style="border-color: #e5dea5; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;">
<div class="su-note-inner su-clearfix" style="background-color: #fff7b7; border-color: #fffdf1; color: #333333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"><strong>NOTE</strong>: You can read more about redirecting rows in <a href="//zappysys.com/blog/ssis-error-handling-in-data-flow-redirect-bad-rows/" target="_blank" rel="noopener">SSIS Error Handling (Redirect bad rows)</a> article.</div>
</div>
<h3>Debugging HTTP requests</h3>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>
<p class="wp-caption-text">Debugging Web API call using Fiddler in SSIS</p>

</div></div>
<h2>Sample SSIS Package Download</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/SSIS-ZohoCRM-ReadWrite.zip">Click here to download sample package (SSIS 2012 or Higher).</a></p>
<h2>Conclusion</h2>
<p>Zoho CRM API provides great way to automate data read/write operations. However to call Zoho API  you have to use SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides great way to integrate any Zoho API call via simple drag and drop approach without coding. Try  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> for free and call virtually any REST API in few clicks.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-write-zoho-crm-data-using-ssis-rest-api-call/">Read / Write Zoho CRM data using SSIS REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
