<?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>crm Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/crm/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/crm/</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>crm Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/crm/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Load data in Salesforce using SSIS  – Insert, Upsert, Delete, Update</title>
		<link>https://zappysys.com/blog/loading-data-salesforce-using-ssis-bulk-insert-update-delete/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 07 Dec 2018 18:09:59 +0000</pubDate>
				<category><![CDATA[SSIS Salesforce Destination]]></category>
		<category><![CDATA[crm]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[upsert]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5539</guid>

					<description><![CDATA[<p>Introduction In this article we&#8217;re going to focus on load data in Salesforce using SSIS (Bulk Insert, Update, Delete and Upsert). If you like to know how to read from Salesforce then refer to previous post here. For Demo purpose we will use AdventuresWorks sample database as our source but you can use your own [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/loading-data-salesforce-using-ssis-bulk-insert-update-delete/">Load data in Salesforce using SSIS  – Insert, Upsert, Delete, Update</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2017/09/salesforce-logo-180x180.png"><img decoding="async" class="wp-image-1764 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/09/salesforce-logo-180x180.png" alt="" width="158" height="158" srcset="https://zappysys.com/blog/wp-content/uploads/2017/09/salesforce-logo-180x180.png 180w, https://zappysys.com/blog/wp-content/uploads/2017/09/salesforce-logo-180x180-150x150.png 150w" sizes="(max-width: 158px) 100vw, 158px" /></a>In this article we&#8217;re going to focus on load data in Salesforce using SSIS (Bulk Insert, Update, Delete and Upsert). If you like to know how to read from Salesforce then refer to <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/">previous post here</a>. For Demo purpose we will use AdventuresWorks sample database as our source but you can use your own Database for testing.</p>
<p>&nbsp;</p>
<p>&nbsp;</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>Salesforce developer account</h2>
<p>To develop ETLs in Salesforce using SSIS you&#8217;ll need a Salesforce developer account. If you don&#8217;t have one, don&#8217;t worry, you can create a limited version FREE developer account. Click here to Sign up for <a href="https://developer.salesforce.com/signup" target="_blank" rel="noopener">FREE developer</a> account.</p>
<h2>Video Tutorial – Salesforce Insert, Upsert, Delete, Update</h2>
<a href="https://zappysys.com/blog/loading-data-salesforce-using-ssis-bulk-insert-update-delete/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FulQLMIaSdJQ%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Getting Started</h2>
<p>In this section, we will see how to perform bulk insert, update delete and upsert operations using <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a></p>
<h3>Configure Salesforce Connection</h3>
<p>First, we&#8217;ll need setup a connection to read or write Salesforce data is to make sure we have a working connection in SSIS.</p>
<ol>
<li>Create new or open existing SSIS Project in Visual Studio.</li>
<li>Open SSIS Package and Go to SSIS designer.</li>
<li>Right click in the connection manager panel and click <strong>New connection</strong>
<div id="attachment_3560" style="width: 756px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-3560" class="wp-image-3560 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection.jpg" alt="SSIS create a new connection CRM Dynamics" width="746" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection.jpg 746w, https://zappysys.com/blog/wp-content/uploads/2018/05/create-a-new-connection-300x162.jpg 300w" sizes="(max-width: 746px) 100vw, 746px" /><p id="caption-attachment-3560" class="wp-caption-text">Create a new SSIS Salesforce Connection</p></div></li>
<li>In the connection type selection, Select the <strong>ZS-SALESFORCE </strong>Connection.</li>
<li>We&#8217;ll use this information: Username, Password, Security Token (<em>click the link learn how to obtain</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360000220714-How-to-obtain-alesforce-Security-Token" target="_blank" rel="noopener">Salesforce Security Token</a> )</li>
<li>Click OK to add the connection.
<div id="attachment_5979" style="width: 682px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5979" class="size-full wp-image-5979" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-salesforce-connection.png" alt="Salesforce using SSIS, Salesforce connection" width="672" height="531" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-salesforce-connection.png 672w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-salesforce-connection-300x237.png 300w" sizes="(max-width: 672px) 100vw, 672px" /><p id="caption-attachment-5979" class="wp-caption-text">Salesforce using SSIS, Salesforce connection</p></div></li>
<li>Save all changes</li>
</ol>
<h2>Bulk Insert &#8211; Import data into Salesforce using SSIS</h2>
<p>Let&#8217;s start with the a bulk insert in Salesforce using SSIS. On this section, we&#8217;re going to generate retrieve data from and OLEDB Source and proceed to Insert the records into Salesforce using <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a>.</p>
<h3>Configure SQL Server Source (OLEDB)</h3>
<ol>
<li>Open SSIS Package and drag Data Flow task from Control Flow SSIS Toolbox
<div id="attachment_8028" style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="size-full wp-image-8028" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Go to data flow designer. Drag and drop an OLE DB Source</li>
<li>Open the OLE DB Source and configure as follow:
<div id="attachment_5964" style="width: 512px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5964" class="size-full wp-image-5964" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-source-oledb-1.png" alt="salesforce-using-ssis-insert-source-oledb" width="502" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-source-oledb-1.png 502w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-source-oledb-1-300x238.png 300w" sizes="(max-width: 502px) 100vw, 502px" /><p id="caption-attachment-5964" class="wp-caption-text">Configure SQL Server Source</p></div></li>
</ol>
<h3>Configure SSIS Salesforce Destination for Bulk Insert</h3>
<p>Once SQL Server source is configure. Now let&#8217;s configure Salesforce Destination for Bulk Insert like below.</p>
<ol>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a></li>
<li>Open the destination component</li>
<li>Connection Manager
<div id="attachment_5972" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5972" class="size-full wp-image-5972" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png" alt="" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5972" class="wp-caption-text">Salesforce using SSIS, upsert destination connection manager</p></div></li>
<li>Component Properties
<div id="attachment_5966" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5966" class="size-full wp-image-5966" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-properties-1.png" alt="salesforce-using-ssis-insert-properties" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-properties-1.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-properties-1-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5966" class="wp-caption-text">salesforce-using-ssis-insert-properties</p></div></li>
<li>Column Mappings
<div id="attachment_5967" style="width: 762px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5967" class="size-full wp-image-5967" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-mapping.png" alt="salesforce-using-ssis-insert-mapping" width="752" height="379" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-mapping.png 752w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-mapping-300x151.png 300w" sizes="(max-width: 752px) 100vw, 752px" /><p id="caption-attachment-5967" class="wp-caption-text">salesforce-using-ssis-insert-mapping</p></div></li>
<li>Click OK</li>
<li>Drag and drop two <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=trash-destination.htm" target="_blank" rel="noopener">Trash Destination</a> components</li>
<li>Connect ZS Salesforce Destination for: New records Output and Error Output</li>
<li>Right click on the joining arrows and enable data viewers on all previous connections</li>
<li>Save all changes</li>
<li>Right click in the data flow designer, click Execute Task
<div id="attachment_5968" style="width: 864px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5968" class="size-full wp-image-5968" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-results.png" alt="salesforce-using-ssis-insert-results" width="854" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-results.png 854w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-results-300x98.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-insert-results-768x252.png 768w" sizes="(max-width: 854px) 100vw, 854px" /><p id="caption-attachment-5968" class="wp-caption-text">salesforce-using-ssis-insert-results</p></div></li>
</ol>
<h2>Bulk Update &#8211; Modify data in Salesforce using SSIS</h2>
<p>In this section we&#8217;re going to perform a bulk update on Salesforce using SSIS. We&#8217;re going to list some information from our source, list all our Salesforce Account data, merge it and only update the data we match. In below example what we will do is Find out matching records in Salesforce and our Source System based on some External Key field (e.g. AccountNumber in our case). And then obtain Salesforce Record <strong>Id</strong> for matching AccountNumber and use it to Update target record.</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;">If you are storing Salesforce Id fields part of your Source System then you don&#8217;t need to use Merge Transform to lookup by External ID field (e.g. AccountNumber in our case). Simply Attach Source with Salesforce Destination and map Id field along with other fields you like to Update. </div></div>
<h3>Configure SQL Server Source (OLEDB Source)</h3>
<ol>
<li>Open SSIS Package and drag Data Flow task from Control Flow SSIS Toolbox</li>
<li>Go to data flow designer. Drag and drop OLE DB Source</li>
<li>Open the OLE DB Source and configure
<div id="attachment_5981" style="width: 486px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5981" class="size-full wp-image-5981" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-source.png" alt="Salesforce using SSIS, Update OLEDB source" width="476" height="402" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-source.png 476w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-source-300x253.png 300w" sizes="(max-width: 476px) 100vw, 476px" /><p id="caption-attachment-5981" class="wp-caption-text">Salesforce using SSIS, Update OLEDB source</p></div></li>
</ol>
<h3>Configure SSIS Salesforce Source</h3>
<ol>
<li>Now lets Drag and drop <strong>ZS Salesforce Source</strong></li>
<li>Open the ZS Salesforce and configure. You can select <strong>Query Mode</strong> and enter query like this because we only care about two fields for now. Use query mode whenever possible because it transfers less data.<br />
<pre class="crayon-plain-tag">select Id,AccountNumber from account</pre>
<div id="attachment_5982" style="width: 896px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5982" class="size-full wp-image-5982" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-source.png" alt="Salesforce using SSIS, Update Salesforce source" width="886" height="508" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-source.png 886w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-source-300x172.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-source-768x440.png 768w" sizes="(max-width: 886px) 100vw, 886px" /><p id="caption-attachment-5982" class="wp-caption-text">Salesforce using SSIS, Update Salesforce source</p></div></li>
</ol>
<h3>Configure Sort Transforms</h3>
<p>Now lets sort both previous datasets using Sort Transforms. This is needed to JOIN dataset using Merge Transform (See next section)</p>
<ol>
<li>Drag and drop: 2 Sort and 1 Merge Join components</li>
<li>Connect the OLE DB Source to the <strong>first</strong> Sort component, and configure
<div id="attachment_5983" style="width: 719px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5983" class="size-full wp-image-5983" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-sort.png" alt="Salesforce using SSIS, Update OLEBD sort" width="709" height="330" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-sort.png 709w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-sort-300x140.png 300w" sizes="(max-width: 709px) 100vw, 709px" /><p id="caption-attachment-5983" class="wp-caption-text">Salesforce using SSIS, Update OLEBD sort</p></div></li>
<li>Connect the Salesforce Source to the <strong>second</strong> Sort component, and configure
<div id="attachment_5984" style="width: 720px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5984" class="size-full wp-image-5984" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-sort.png" alt="Salesforce using SSIS,update Salesforce sort" width="710" height="332" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-sort.png 710w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-sort-300x140.png 300w" sizes="(max-width: 710px) 100vw, 710px" /><p id="caption-attachment-5984" class="wp-caption-text">Salesforce using SSIS,update Salesforce sort</p></div></li>
</ol>
<h3>Configure Merge Transforms</h3>
<p>No next step would be to join previous datasets based on AccountNumber and then we will output Id from Salesforce which is needed for later step.</p>
<ol>
<li>Drag and Drop Merge Transform from SSIS Toolbox like below.
<div id="attachment_6267" style="width: 448px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6267" class="size-full wp-image-6267" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item.png" alt="Drag SSIS Merge Join Transform from Toolbox" width="438" height="340" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item.png 438w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item-300x233.png 300w" sizes="(max-width: 438px) 100vw, 438px" /></a><p id="caption-attachment-6267" class="wp-caption-text">Drag SSIS Merge Join Transform from Toolbox</p></div></li>
<li>Connect Sorts to the Merge component (<em>sort from OLEDB Source most be on the left</em>)</li>
<li>Configure the Merge component
<div id="attachment_5985" style="width: 771px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5985" class="size-full wp-image-5985" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-merge.png" alt="Salesforce using SSIS, update merge" width="761" height="714" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-merge.png 761w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-merge-300x281.png 300w" sizes="(max-width: 761px) 100vw, 761px" /><p id="caption-attachment-5985" class="wp-caption-text">Salesforce using SSIS, update merge</p></div></li>
</ol>
<h3>Configure SSIS Salesforce Destination for Bulk Update</h3>
<ol>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a></li>
<li>Open the ZS Salesforce Destination and configure</li>
<li>Connection Manager tab
<div id="attachment_5972" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5972" class="wp-image-5972 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png" alt="" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5972" class="wp-caption-text">Salesforce using SSIS, update destination connection manager</p></div></li>
<li>Component Properties tab
<div id="attachment_5986" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5986" class="size-full wp-image-5986" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-destination-component-properties.png" alt="Salesforce using SSIS, update destination component properties" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-destination-component-properties.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-destination-component-properties-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5986" class="wp-caption-text">Salesforce using SSIS, update destination component properties</p></div></li>
<li><div class="su-note"  style="border-color:#e5ae9d;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:#ffc8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">For Update purposes, Salesforce Destinations needs to map the ID from the Account object. For more information, please use the following link <a href="https://zappysys.zendesk.com/hc/en-us/articles/360008228693-SSIS-Salesforce-Destination-Update-Insert-with-Lookup-Fields-Text-to-Id-">SSIS Salesforce Destination &#8211; Update / Insert with Lookup Fields (Text to Id)</a> </div></div></li>
<li>Column Mapping
<div id="attachment_5987" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5987" class="size-full wp-image-5987" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-destination-column-mappings.png" alt="salesforce using SSIS, update destination column mappings" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-destination-column-mappings.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-destination-column-mappings-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5987" class="wp-caption-text">salesforce using SSIS, update destination column mappings</p></div></li>
<li>Click OK</li>
<li>Drag and drop three <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=trash-destination.htm" target="_blank" rel="noopener">Trash Destination</a> components</li>
<li>Create two connections from ZS Salesforce Destination as follows: <strong>Update records and Error Output</strong></li>
<li>Right click on the joining arrows and enable data viewers on all previous connections</li>
<li>Save all changes</li>
<li>Right click in the data flow designer, click Execute Task
<div id="attachment_5988" style="width: 951px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5988" class="size-full wp-image-5988" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-results.png" alt="Salesforce using SSIS, update results" width="941" height="485" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-results.png 941w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-results-300x155.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-results-768x396.png 768w" sizes="(max-width: 941px) 100vw, 941px" /><p id="caption-attachment-5988" class="wp-caption-text">Salesforce using SSIS, update results</p></div></li>
</ol>
<h2>Bulk Upsert &#8211; Import/Modify data in Salesforce using SSIS</h2>
<p>In this section we&#8217;re going to perform a bulk upsert of 25 record&#8217;s on Salesforce using SSIS. Upsert is an operation that combines both insert an update.</p>
<p><a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a> allows Upserts operations. You&#8217;ll need to select the Upsert as an action and indicate the Key value for the comparison.</p>
<h3>Creating External ID field for Salesforce Upsert</h3>
<p>For the Upsert action we have to use an Upsert Keyfield (i.e. External ID field). For more information read here <a href="https://help.salesforce.com/articleView?id=000005395&amp;language=en_US&amp;type=1">External ID</a>. Follow these steps to add a External ID field on Salesforce Accounts object:</p>
<ol>
<li>Login to your Salesforce account.</li>
<li>Click on the configuration icon and select &#8220;Service Setup&#8221;
<div id="attachment_6090" style="width: 382px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6090" class="wp-image-6090" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-upsert-keyfield-1.png" alt="salesforce-using-ssis-salesforce-edit-object" width="372" height="404" /><p id="caption-attachment-6090" class="wp-caption-text">Salesforce using SSIS, Salesforce edit object</p></div></li>
<li>On the new Tab, look for USER INTERFACE -&gt; Objects And Fields -&gt; Object Manager</li>
<li>Select Account object</li>
<li>Select Fields &amp; Relationships</li>
<li>Click New, to create a field
<div id="attachment_6091" style="width: 683px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6091" class="wp-image-6091 " src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-salesforce-fieldsandconfiguration.png" alt="salesforce-using-ssis-salesforce-fieldsandconfiguration" width="673" height="241" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-salesforce-fieldsandconfiguration.png 627w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-salesforce-fieldsandconfiguration-300x108.png 300w" sizes="(max-width: 673px) 100vw, 673px" /><p id="caption-attachment-6091" class="wp-caption-text">Salesforce using SSIS, Salesforce Fields &amp; Configuration</p></div></li>
<li>For the field type, choose Number and click next</li>
<li>For Field Label and Field Name, type TableID. Check Unique and External ID boxes and click next</li>
<li>Leave field-level security as default, click next</li>
<li>Leave page layouts as default, click next.</li>
<li>After finishing the configuration, the field should appear in the Fields &amp; Relationships page</li>
</ol>
<h3>Configure SQL Server Source</h3>
<ol>
<li>Open SSIS Package and drag Data Flow task from Control Flow SSIS Toolbox
<div id="attachment_8028" style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="size-full wp-image-8028" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Go to data flow designer. Drag and drop OLE DB Source</li>
<li>Open the OLE DEB Source and configure as follow
<div id="attachment_5971" style="width: 489px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5971" class="size-full wp-image-5971" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-oledb-source.png" alt="Salesforce using SSIS, Upsert OLE DB source" width="479" height="408" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-oledb-source.png 479w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-oledb-source-300x256.png 300w" sizes="(max-width: 479px) 100vw, 479px" /><p id="caption-attachment-5971" class="wp-caption-text">Salesforce using SSIS, Upsert OLE DB source</p></div></li>
</ol>
<h3>Configure SSIS Salesforce Destination for Upsert</h3>
<ol>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a></li>
<li>Open the ZS Salesforce and configure</li>
<li>Connection Manager
<div id="attachment_5972" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5972" class="size-full wp-image-5972" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png" alt="" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5972" class="wp-caption-text">Salesforce using SSIS, upsert destination connection manager</p></div></li>
<li>Component Properties
<div id="attachment_5973" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5973" class="size-full wp-image-5973" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-component-properties.png" alt="Salesforce using SSIS, upsert destination component properties" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-component-properties.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-component-properties-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5973" class="wp-caption-text">Salesforce using SSIS, upsert destination component properties</p></div></li>
<li>Column Mapping
<div id="attachment_5974" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5974" class="size-full wp-image-5974" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-column-mapping.png" alt="salesforce using SSIS, upsert destination column mapping" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-column-mapping.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-column-mapping-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5974" class="wp-caption-text">salesforce using SSIS, upsert destination column mapping</p></div></li>
<li>Click OK</li>
<li>Drag and drop three <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=trash-destination.htm" target="_blank" rel="noopener">Trash Destination</a> components</li>
</ol>
<h3>Configure Error Handling, Outputs for New, Updated, Failed Records</h3>
<p>If you like to capture which rows are inserted and which rows are updated then you can drag Blue arrows coming from Salesforce destination component. You can also connect Red arrow to detect failed records and reason for error.</p>
<ol>
<li>Connect ZS Salesforce Destination for: New records Output, Updated Records Output and Error Output</li>
<li>Right click on the joining arrows and enable data viewers on all previous connections</li>
<li>Right click in the data flow designer, click Execute Task
<div id="attachment_5975" style="width: 1131px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5975" class="size-full wp-image-5975" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-results.png" alt="Salesforce using SSIS, upsert results" width="1121" height="485" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-results.png 1121w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-results-300x130.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-results-768x332.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-results-1024x443.png 1024w" sizes="(max-width: 1121px) 100vw, 1121px" /><p id="caption-attachment-5975" class="wp-caption-text">Salesforce using SSIS, upsert results</p></div></li>
</ol>
<h2>Bulk Delete &#8211; Delete data in Salesforce using SSIS</h2>
<p>In this section, we&#8217;re going to perform a bulk delete on Salesforce using SSIS <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a>. In this example we&#8217;re going to list all our source customers (from previous sections), merge it wit the Salesforce Account object, retrieve the Salesforce Account Id and delete the rows. Delete Operation also requires to map Id field so we will use similar technique we used for Update.</p>
<h3>Configure SQL Server Source (OLEDB Source)</h3>
<ol>
<li>Go to data flow designer. Drag and drop OLE DB Source</li>
<li>Open the OLE DEB Source and configure as follow
<div id="attachment_6020" style="width: 516px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6020" class="size-full wp-image-6020" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-oledb-source.png" alt="" width="506" height="406" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-oledb-source.png 506w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-oledb-source-300x241.png 300w" sizes="(max-width: 506px) 100vw, 506px" /><p id="caption-attachment-6020" class="wp-caption-text">salesforce-using-ssis-delete-oledb-source</p></div></li>
</ol>
<h3>Configure SSIS Salesforce Source</h3>
<ol>
<li>Drag and drop <strong>ZS Salesforce Source</strong></li>
<li>Open the ZS Salesforce and configure.</li>
<li>You can select <strong>Query Mode</strong> and enter query like this because we only care about two fields for now. Use query mode whenever possible because it transfers less data.<br />
<pre class="crayon-plain-tag">select Id,AccountNumber from account</pre>
</li>
</ol>
<h3>Configure Sort Transforms</h3>
<p>Now lets sort both previous datasets using Sort Transforms. This is needed to JOIN dataset using Merge Transform (See next section)</p>
<ol>
<li>Drag and drop: 2 Sort and 1 Merge Join components</li>
<li>Connect the OLE DB Source to the <strong>first</strong> Sort component, and configure
<div id="attachment_5983" style="width: 719px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5983" class="size-full wp-image-5983" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-sort.png" alt="Salesforce using SSIS, Update OLEBD sort" width="709" height="330" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-sort.png 709w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-oledb-sort-300x140.png 300w" sizes="(max-width: 709px) 100vw, 709px" /><p id="caption-attachment-5983" class="wp-caption-text">Salesforce using SSIS, Update OLEBD sort</p></div></li>
<li>Connect the Salesforce Source to the <strong>second</strong> Sort component, and configure
<div id="attachment_5984" style="width: 720px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5984" class="size-full wp-image-5984" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-sort.png" alt="Salesforce using SSIS,update Salesforce sort" width="710" height="332" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-sort.png 710w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-update-salesforce-sort-300x140.png 300w" sizes="(max-width: 710px) 100vw, 710px" /><p id="caption-attachment-5984" class="wp-caption-text">Salesforce using SSIS,update Salesforce sort</p></div></li>
</ol>
<h3>Configure Merge Transforms</h3>
<p>No next step would be to join previous datasets based on AccountNumber and then we will output Id from Salesforce which is needed for later step.</p>
<ol>
<li>Now drag Merge Transform from SSIS toolbox
<div id="attachment_6267" style="width: 448px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6267" class="size-full wp-image-6267" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item.png" alt="Drag SSIS Merge Join Transform from Toolbox" width="438" height="340" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item.png 438w, https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-merge-join-transform-toolbox-item-300x233.png 300w" sizes="(max-width: 438px) 100vw, 438px" /></a><p id="caption-attachment-6267" class="wp-caption-text">Drag SSIS Merge Join Transform from Toolbox</p></div></li>
<li>Connect both Sort to the Merge component (<em>sort from OLEDB Source most be on the left</em>)</li>
<li>Configure the Merge component
<div id="attachment_6021" style="width: 749px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6021" class="size-full wp-image-6021" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-merge.png" alt="" width="739" height="375" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-merge.png 739w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-merge-300x152.png 300w" sizes="(max-width: 739px) 100vw, 739px" /><p id="caption-attachment-6021" class="wp-caption-text">salesforce-using-ssis-delete-merge</p></div></li>
</ol>
<h3>Configure SSIS Salesforce Destination for Bulk Delete</h3>
<ol>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a></li>
<li>Connect the Merge and <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-destination-connector/" target="_blank" rel="noopener">ZS Salesforce Destination</a> components. Right click the arrow and enable data viewer</li>
<li>Connection Manager tab
<div id="attachment_5972" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5972" class="wp-image-5972 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png" alt="" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-upsert-destination-connection-manager-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-5972" class="wp-caption-text">Salesforce using SSIS, delete destination connection manager</p></div></li>
<li>Component Properties tab
<div id="attachment_6022" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6022" class="wp-image-6022 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-destination-component-properties.png" alt="" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-destination-component-properties.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-destination-component-properties-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-6022" class="wp-caption-text">Salesforce using SSIS, delete destination component properties</p></div></li>
<li><div class="su-note"  style="border-color:#e5ae9d;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:#ffc8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">For Delete purposes, Salesforce Destinations needs to map the ID from the Account object.For more information, please use the following link <a href="https://zappysys.zendesk.com/hc/en-us/articles/360008228693-SSIS-Salesforce-Destination-Update-Insert-with-Lookup-Fields-Text-to-Id-">SSIS Salesforce Destination &#8211; Update / Insert with Lookup Fields (Text to Id)</a> </div></div></li>
<li>Column Mapping
<div id="attachment_6025" style="width: 768px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6025" class="size-full wp-image-6025" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-destination-column-mapping.png" alt="" width="758" height="563" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-destination-column-mapping.png 758w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-destination-column-mapping-300x223.png 300w" sizes="(max-width: 758px) 100vw, 758px" /><p id="caption-attachment-6025" class="wp-caption-text">salesforce-using-ssis-delete-destination-column-mapping</p></div></li>
<li>Click OK</li>
<li>Save all changes</li>
<li>Right click in the data flow designer, click Execute Task
<div id="attachment_6023" style="width: 908px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6023" class="size-full wp-image-6023" src="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-results.png" alt="" width="898" height="487" srcset="https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-results.png 898w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-results-300x163.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/12/salesforce-using-ssis-delete-results-768x416.png 768w" sizes="(max-width: 898px) 100vw, 898px" /><p id="caption-attachment-6023" class="wp-caption-text">salesforce-using-ssis-delete-results</p></div></li>
</ol>
<h2>Error Handling</h2>
<p>When working on Salesforce with SSIS, we recommend <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=trash-destination.htm" target="_blank" rel="noopener">Trash Destination</a> component to help debugging outputs without performing DML on destinations.</p>
<p>Main benefits of usage:</p>
<ol>
<li>Enable data viewers and get live feedback of the data</li>
<li>Save the results on different formats (<em>XML, JSON, plain text files</em>).</li>
</ol>
<h2>Conclusion</h2>
<p>In this article, We have seen how easy it is to integrate Salesforce using SSIS. Using drag and drop connector you can perform Bulk insert, update, delete and Upsert operations.</p>
<p>Download <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> to learn more about other possible scenarios which are not discussed in this article.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/loading-data-salesforce-using-ssis-bulk-insert-update-delete/">Load data in Salesforce using SSIS  – Insert, Upsert, Delete, Update</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>
