<?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>Technical Architecture &#8211; Jitendra Zaa</title>
	<atom:link href="https://www.jitendrazaa.com/blog/tag/technical-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.jitendrazaa.com/blog</link>
	<description>AI, Salesforce, ServiceNow &#38; Enterprise Tech Guides</description>
	<lastBuildDate>Sat, 14 Mar 2020 17:22:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
<atom:link rel="search" type="application/opensearchdescription+xml" title="Search Jitendra Zaa" href="https://www.jitendrazaa.com/blog/wp-json/opensearch/1.1/document" />
<site xmlns="com-wordpress:feed-additions:1">87744916</site>	<item>
		<title>Podcast &#8211; How to Achieving Hyper-Threading in Salesforce</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/podcast-how-to-achieving-hyper-threading-in-salesforce/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/podcast-how-to-achieving-hyper-threading-in-salesforce/#comments</comments>
		
		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Thu, 02 Jan 2020 18:50:50 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[Technical Architecture]]></category>
		<category><![CDATA[Thread]]></category>
		<guid isPermaLink="false">https://www.jitendrazaa.com/blog/?p=6939</guid>

					<description><![CDATA[Total number of Asynchronous Apex which includes Batch Apex, Future Method, Queueable &#38; Scheduled job is 250k or 200 x Total User license whichever is greater. Now lets do some fact check : Execute method of Batch Apex can only call 1 Queueable Scheduler can call 50 Queueable We can have only 100 Schedulers in [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="justify wp-block-paragraph">Total number of Asynchronous Apex which includes Batch Apex, Future Method, Queueable &amp; Scheduled job is<a href="https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm"> 250k or 200 x Total User license whichever is greater</a>.</p>



<p class="wp-block-paragraph">Now lets do some fact check :</p>



<ul class="justify wp-block-list"><li>Execute method of Batch Apex can only call 1 Queueable </li><li>Scheduler can call 50 Queueable</li><li>We can have only 100 Schedulers in an Org</li><li>If we run 1 Scheduler every minute = 60 Scheduler</li><li>If each Scheduler executes 50 Queueable every minute, then 60&#215;50 = 3000 jobs / min. Which means 3000 x 24 = 72k jobs / day </li></ul>



<h2 class="wp-block-heading">Big Question </h2>



<p class="wp-block-paragraph">Can you design an application which can use full potential of Async governor limit &#8211; even 250k / day ?</p>



<h2 class="wp-block-heading">Designing Scalable Hyper Thread Application in Salesforce</h2>



<p class="wp-block-paragraph">I have discussed various approach to answer these questions on below podcast by <a href="https://salesforceway.com/podcast">SalesforceWay</a></p>



<p class="wp-block-paragraph"><a href="https://salesforceway.com/podcast/salesforce-asynchronous-1/">Part 1 &#8211; Salesforce Hyper-Threading Road blocks</a></p>



<p class="wp-block-paragraph"><a href="https://salesforceway.com/podcast/salesforce-asynchronous-2/">Part 2 &#8211; Salesforce Hyper-Threading Options</a></p>



<p class="wp-block-paragraph">Feel free to drop comments and your thoughts on solution !!! </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/podcast-how-to-achieving-hyper-threading-in-salesforce/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6939</post-id>	</item>
		<item>
		<title>A Tale of Governor Limits and Solutions in Salesforce</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/a-tale-of-governor-limits-and-solutions-in-salesforce/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/a-tale-of-governor-limits-and-solutions-in-salesforce/#comments</comments>
		
		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Tue, 21 Nov 2017 02:30:58 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Architect]]></category>
		<category><![CDATA[Governor Limits]]></category>
		<category><![CDATA[Technical Architecture]]></category>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=6244</guid>

					<description><![CDATA[Thrilling story of Salesforce Technical Architect on a quest to solve application problems and avoid governor limit errors]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;"><em>This is a work of fiction. Names, characters, businesses, places, events and incidents are either the products of the author’s imagination or used in a fictitious manner. Any resemblance to actual persons, living or dead, or actual events is purely coincidental.</em></p>
<p style="text-align: justify;">Ha ha ha joking.. <strong>its combination of many real stories of my previous projects</strong> and few readers might be from my team itself <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> . Leave comment my brave team mates if you are able to co-relate !!!</p>
<p style="text-align: justify;">I tried to summaries as much as possibilities about governor limit errors and way to get out of it. Most of scenario described below may not be the first choice of Technical Architects however because of many reasons like budget, resource skill, tools available and compliance, bad decision could be taken which causes ripple effect on Salesforce scalibility.</p>
<p style="text-align: justify;">Before start, I would encourage readers to leave comment on post and let everyone know in this suspenseful story, did you catch governor limits and Solution already before its exposed ? <strong>In this blog post, answers are mostly in invisible/white font which would not be seen until you highlight it. Its for few readers who don&#8217;t want spoilers. </strong></p>
<p>Let&#8217;s start a story.<span id="more-6244"></span></p>
<h2><strong>Part 1</strong></h2>
<p style="text-align: justify;">There was a huge Salesforce Implementation project going on from last 18 months. I Joined this project almost at end where all major decisions were taken and implementation was done. There was one particular screen where total 14 API calls made. Salesforce team tried their best to convert this to single API and move everything else to ETL tool however it was ruled out, because of many non disclosable limitations and reasons. For sake of simplicity, lets assume Visualforce page is designed in such a way that each section on page needs two API callouts. User can navigate each section one by one or jump to last section. If user directly jumps to last section then all 14 API calls will be made in single transaction. One thing to consider here is that API calls are dependent, You cannot call API number 2 before API 1.</p>
<p style="text-align: justify;">You already started imagining problems ? Well, lets wait for <span style="color: #ffffff;">invisible</span><em>(Select previous invisible text)</em> text.</p>
<hr />
<p><strong>Problem 1</strong></p>
<p style="text-align: justify;">You need to call two APIs in sequence however <strong>save response</strong> from first API. Do some processing and use it as request for second API. Guess the problem ?<strong> </strong><span style="color: #ffffff;"><strong>By default, callouts aren’t allowed after DML operations in the same transaction because DML operations result in pending uncommitted work that prevents callouts from executing.</strong> </span><em>(Select previous invisible text for problem)</em></p>
<p><strong>Solution</strong></p>
<p style="text-align: justify;">Guess a solution ? <span style="color: #ffffff;"><strong>Create an Apex based REST API which will perform DML operations</strong></span><em>(Select previous invisible text for solution). </em>This is not a suggested solution however it was the quick way looked feasible at that time.</p>
<hr />
<p><strong>Problem 2</strong></p>
<p style="text-align: justify;">So, everything was fine, code implemented and tested successfully. However on stress environment, guess what obvious error QA team must have started facing ? Any guess ? Error was <strong><span style="color: #ffffff;">Concurrent requests limit exceeded</span>. </strong>Check <a href="https://developer.salesforce.com/blogs/engineering/2015/11/avoiding-the-concurrent-request-limit-via-synchronous-callout-optimization.html">this blog post</a> to know cause of this error message.</p>
<p><strong>Solution</strong></p>
<p style="text-align: justify;">We cannot use Batch, future or <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_queueing_jobs.htm">Queueable </a>Apex because, response needs to be returned on Visualforce. User needs to change some choices before hitting next section. So best solution found without hitting <span style="color: #ffffff;"><strong>Concurrent limit</strong></span> request error was to use <strong><span style="color: #ffffff;">Continuation Object</span>.</strong> You can refer <a href="https://www.jitendrazaa.com/blog/salesforce/continuation-object-in-apex-asynchronous-callouts-for-long-running-request-live-demo/">this blog post</a> to read more about it. This blog post explains <a href="https://developer.salesforce.com/blogs/2017/09/invoking-apex-continuations-lightning-components.html">how to use it in Lightning Component</a>.</p>
<hr />
<p><strong>Problem 3</strong></p>
<p style="text-align: justify;">Finally we were able to make our system scalable and long running requests were not problem anymore. Ohh boy, we were saved. It was time to go play table tennis, fusse ball and all your favorite games over the weekend.</p>
<p style="text-align: justify;">But wait, you get a call from your technical lead saying sir, new design is not working in one particular scenario. if user directly jumps to last section, we had to make 14 API callouts back to back from Apex. We got an error, guess what it is this time ? <span style="color: #ffffff;"><strong><span style="color: #ffffff;">You cannot use more than 3 sequential continuation in a single request handling. You used 4 Continuation.</span></strong></span> <em>(Select previous invisible text for error).</em></p>
<p><strong>Solution</strong></p>
<p style="text-align: justify;">Was there any solution here ? Its Salesforce governor limit. If we don&#8217;t use <em>Continuation Object</em>, we will hit <em>Concurrent request limit error</em>, is catch 22 situation. But, <a href="https://www.jitendrazaa.com/blog/salesforce/limitless-chaining-of-continuation-object-in-salesforce/">Here is the solution,</a> Chain Unlimited Continuation Objects.</p>
<hr />
<h2><strong>Part 2</strong></h2>
<p style="text-align: justify;">We were able to solve some governor limit errors and system was atleast in working state. Problem was, it was taking around 4-6 minutes to complete end to end transactions, which was unacceptable. So, Part 2 for me was improve performance without impacting existing functionalities. So, I thought to check source code. Ohh boy, not sure which design pattern was used but almost 8-9 classes were involved. And there was one class I remember, which had more than 6k lines of code. Anyways, point is, I had very less time to address this as customers were unhappy and got threat that they may abandon System. So, my next quest was analyzing debug log. For one click, around 7 debug log files were generated. After spending hours, I found first Issue in code. Lets repeat Question &#8211; System was very slow, and there were two objects with 6 Millions+ records.</p>
<p><strong>Problem 4</strong></p>
<p style="text-align: justify;">Any guess on problem, why Salesforce was slow ? Should not be difficult to guess <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /><span style="color: #ffffff;"> </span><strong><span style="color: #ffffff;">It was unindexed SOQL.</span> </strong>Problem was not only indexing issue but the way Database was designed. Code was fetching information from 5 level of objects and condition was written on relationship fields. The object on which SOQL was primarily written had 6 Millions + records. Solution to this problem was to convert these 5 objects to one flat object (denormalized table) with indexed field. However application was already in use from last 2 years and there were huge impact. What else could have been done to address the problem asap ?</p>
<p><strong>Solution 4</strong></p>
<p style="text-align: justify;"><span style="color: #ffffff;"><strong>We searched whole organization using Force.com IDE to identify SOQL on same object and which fields from parents were used in condition. We created actual field on child object and indexed it. </strong></span><em>Select previous line to know answer.</em></p>
<hr />
<p><strong>Problem 5</strong></p>
<p style="text-align: justify;">So, in solution 4, we identified all fields which needs to be created in flat object. We considered leaf object as flat object because it will always have  parent records (5 level). Problem was, how to update these fields without impacting existing code? We didn&#8217;t needed these fields in current transaction so decided to use Asynchronous Apex, <a href="https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_queueing_jobs.htm">Queueable Apex</a>. Advantage of this approach was that we didn&#8217;t touch any existing trigger or Apex class. Do you smell problem here ? <span style="color: #ffffff;"><strong>Started getting sporadic errors related to &#8211; <a style="color: #ffffff;" href="https://help.salesforce.com/articleView?id=000229525&amp;type=1">Unable to lock row &#8211; Record currently unavailable</a>,</strong> </span><em>read problem by selecting previous text.</em></p>
<p><strong>Solution 5</strong></p>
<p style="text-align: justify;">If we move our code in Asynchronous block and if this code takes more than 10 second to complete then other area of application may receive this error. unfortunately, in our case around 7-8k records were going through DML at same time causing lock more than 10 sec. So as a solution, we did what we <strong>were trying to avoid</strong>, writing trigger on flat object to populate indexed fields.</p>
<hr />
<p><strong>Problem 6</strong></p>
<p style="text-align: justify;">There were some Apex code where around 7-8k records were upserted in same transaction. This object was vanilla object without any triggers. We added a trigger on this object to populate fields before insert or update of record. Guess the possible governor limit in this approach? QA and UAT testing was successful however our best friend <strong><a href="https://www.jitendrazaa.com/blog/salesforce/apex/faq-writing-test-class-in-salesforce/">Apex Test classes</a> </strong>saved us by giving early alarm of one possible error. &#8220;<span style="color: #ffffff;"><strong>Apex CPU time limit exceeded</strong></span>&#8221; <em>(Select previous invisible text for error). </em><a href="https://www.jitendrazaa.com/blog/salesforce/apex/faq-writing-test-class-in-salesforce/">Check this blog post for best practices</a>.</p>
<p><strong>Solution 6</strong></p>
<p style="text-align: justify;">When we are inserting / updating around 7k records in single transactions, even small code will cause Apex CPU time limit exceeded error. First of all, we should have avoided this huge DML in single transaction. But implementation was like a spider web with huge dependency with each other. Didn&#8217;t had much time left to perform impact analysis as old code was already on production.</p>
<p><strong>So how did we solved it ? </strong><span style="color: #ffffff;">We broke upsert into update and insert by introducing extra SOQL. Other than this, we did dirty check before performing any update operation.</span> <em>Select previous line to know answer. </em>Believe me, dirty check reduced around 70% of DML need in update operations.</p>
<p><strong>Few important best practices I would like to share here:</strong></p>
<ol>
<li style="text-align: justify;">We <strong>cannot use static variable to avoid recursive execution of trigger</strong> if 200+ record gets inserted via Apex. Static variable approach will work with dataloader but in case of Apex, trigger will not execute after 200 until its handled specially.</li>
<li style="text-align: justify;">Dirty check of record is very important. In your Apex code, before performing any update DML, check if data is even changed or not ? I have seen code around 90% of time, where DML is done on record but it already has same value in Database. All you have to do is issue 1 extra SOQL and compare. It will save CPU time as well DML governor limit. <strong>Its huge game changing approach in LDV (Large Data Volume) orgs</strong>.</li>
<li style="text-align: justify;"><strong><a href="https://www.jitendrazaa.com/blog/salesforce/all-about-upsert-and-external-id-in-dataloader-and-apex-videos/">Upsert</a> statements are very slow. </strong>Even slower than combined insert and update. It gives lots of advantages however needs to be considered while we are working with LDV.<a href="https://www.jitendrazaa.com/blog/salesforce/all-about-upsert-and-external-id-in-dataloader-and-apex-videos/"> Upsert is even worst in terms of performance</a> when we create parent child relationship using parent records external Id.</li>
</ol>
<hr />
<p><strong>Problem 7</strong></p>
<p style="text-align: justify;">This would be last problem for sake of simplicity of this blog post. All above solutions worked but there was a problem. This leaf object was growing exponentially. After stable code, it reached 10 Millions+ records. This object was only used to display around 4-5k records on screen in read only format with the help of server side pagination. We still wanted to show data on screen however reduce total number of records being created in object. Any guess ?</p>
<p><strong>Solution 7</strong></p>
<p style="text-align: justify;"><span style="color: #ffffff;">We saved these 4-5k records in single JSON file and saved in Attachment. At controller side, we used wrapper class to deserialize records and show it back on page.</span> <em>Select previous line to know answer.</em></p>
<p style="text-align: justify;">Hope this blog post will give you a different perspective while designing solutions on Force.com platform. If you reached till this point then am pretty sure you must have got more than half solution by your self.</p>
<p style="text-align: justify;"><strong>Let me know Tale of Governor limit in your project and how you handled it in below comment section.</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/a-tale-of-governor-limits-and-solutions-in-salesforce/feed/</wfw:commentRss>
			<slash:comments>22</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">6244</post-id>	</item>
		<item>
		<title>10 Salesforce Integration design considerations from Architect point of view &#8211; Mind Mapping included</title>
		<link>https://www.jitendrazaa.com/blog/salesforce/10-salesforce-integration-design-considerations-from-architect-point-of-view-mind-mapping-included/</link>
					<comments>https://www.jitendrazaa.com/blog/salesforce/10-salesforce-integration-design-considerations-from-architect-point-of-view-mind-mapping-included/#comments</comments>
		
		<dc:creator><![CDATA[Jitendra]]></dc:creator>
		<pubDate>Mon, 21 Dec 2015 03:28:16 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Architect]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Technical Architecture]]></category>
		<guid isPermaLink="false">http://www.jitendrazaa.com/blog/?p=5094</guid>

					<description><![CDATA[After working on multiple Salesforce implementation project as an Architect, its time to share what I learned from those implementations and would strongly suggest to be considered before designing any &#8220;Salesforce Integration&#8221;. Below image shows &#8220;integration mind mapping&#8221; used by me. I use it to consider some major aspects while discussing integration approaches with enterprise architects in [&#8230;]]]></description>
										<content:encoded><![CDATA[<p style="text-align: justify;">After working on multiple Salesforce implementation project as an Architect, its time to share what I learned from those implementations and would strongly suggest to be considered before designing any &#8220;Salesforce Integration&#8221;.</p>
<p style="text-align: justify;">Below image shows &#8220;integration mind mapping&#8221; used by me. I use it to consider some major aspects while discussing integration approaches with enterprise architects in various meetings. This image is very high level however if you think some more points to be considered or have some other thoughts on same, please share.</p>
<p><figure id="attachment_5098" aria-describedby="caption-attachment-5098" style="width: 820px" class="wp-caption aligncenter"><a href="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/12/Salesforce-Integration-Mind-mapping-diagram.png?ssl=1" rel="attachment wp-att-5098"><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="size-full wp-image-5098" src="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/12/Salesforce-Integration-Mind-mapping-diagram.png?resize=820%2C1000&#038;ssl=1" alt="Salesforce Integration Mind mapping diagram" width="820" height="1000" srcset="https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/12/Salesforce-Integration-Mind-mapping-diagram.png?w=820&amp;ssl=1 820w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/12/Salesforce-Integration-Mind-mapping-diagram.png?resize=246%2C300&amp;ssl=1 246w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/12/Salesforce-Integration-Mind-mapping-diagram.png?resize=768%2C937&amp;ssl=1 768w, https://i0.wp.com/www.jitendrazaa.com/blog/wp-content/uploads/2015/12/Salesforce-Integration-Mind-mapping-diagram.png?resize=624%2C761&amp;ssl=1 624w" sizes="(max-width: 820px) 100vw, 820px" /></a><figcaption id="caption-attachment-5098" class="wp-caption-text">Salesforce Integration Mind mapping diagram</figcaption></figure></p>
<p><strong>1. Data Compliance</strong></p>
<p style="text-align: justify;">Lets start with Compliance part first. It is possible that client has confidential data and doesn&#8217;t want to move it to Cloud. In that case, we can expose existing web application of Client using some Salesforce products like &#8220;<a href="https://www.jitendrazaa.com/blog/tag/canvas/">Canvas</a>&#8221; or &#8220;Lightning Connect&#8221;.  For Lightning Connect, data needs to be available on DMZ layer however for Canvas it can exist on Intranet and therefore end users can access data only within office, providing flexibility of cloud and security of intranet.<span id="more-5094"></span></p>
<p><strong>2. ETL tool</strong></p>
<p>As a best practice for Integration design, loading, transforming and extraction of data should be avoided within Salesforce. Salesforce is multi-tenant architect and therefore has many governor limits. I have seen many projects getting failed because of decision; not to use <a href="https://www.jitendrazaa.com/blog/tag/etl/">ETL tool</a>. There may be many reason why ETL may not have been considered, like architect didn&#8217;t foresee much in future about its necessity or Client was short on budget. Even though ETL tool adds up some budget but then it opens endless possibilities.</p>
<p>If ETL is considered, then there are some very important question needs to be answered and designed.</p>
<p><strong>a. What will happen if ETL or any System goes down</strong></p>
<p style="text-align: justify;">Software industry is full of possibilities and malfunctioning, no one can be sure about hardware and software design. Business continuity plan is very important to be considered. And this question must be considered in meetings and design &#8220;What will happen if ETL goes down&#8221; ? Simple answer is declaring clear &#8220;Accountability&#8221; between systems. Any application can go down or any application can face an error; it could be source System, middle ware or Salesforce. Defining clear accountability of system is very important. Who will be responsible to handle situation if ETL goes down ? Who will be responsible to handle situation if Salesforce goes down, or doesn&#8217;t respond in timely manner or some Apex or server error occurs ? We should be having proper error handling and logging mechanism between systems and backup plans as well. For example &#8211; If ETL goes down, maintain all request in some &#8220;<a href="https://en.wikipedia.org/wiki/Message_queue">Messaging Queue Server</a>&#8221; between Source system and ETL. once ETL comes on-line, start processing queue.</p>
<p><strong>b. Throttling capabilities</strong></p>
<p style="text-align: justify;">When more than two systems are involved in communication, not necessary that both system will perform same. Might be possible that Salesforce could be faster or slower on some unlucky days. We should consider this point as well in our design. Most ETL tool has capability of throttling to make request faster and slower on basis of error or network speed. Personally, I think this is very important in high traffic integration. In one of my project, we had to load (upsert) millions of data in Salesforce on weekly basis. Because of heavy design of Salesforce apex triggers and multiple field update workflows on same object, Salesforce performance was much slower than usual. There were no throttling capabilities and therefore there were lots of loss of data because of various error in Salesforce like &#8220;Concurrent Apex limit&#8221;, &#8220;Unable to lock rows&#8221; etc&#8230;</p>
<p style="text-align: justify;"><strong>c. Priority of incoming and outgoing messages</strong></p>
<p style="text-align: justify;">If we consider &#8220;messaging&#8221; and &#8220;throttling&#8221; in our design then most obvious question needs to be considered in &#8220;priority of messages&#8221;. As message may be sitting in queue, it is possible that some messages should be processed near real time and very important for next system. We should be having logic in &#8220;ETL&#8221; or &#8220;Messaging queue&#8221; to decide priority on basis of some message criteria.</p>
<p style="text-align: justify;"><strong>3. Fallout reporting capabilities</strong></p>
<p style="text-align: justify;">Either we are going with or without ETL tool, fallout reporting capabilities are very important in integration design. Fallout report may also be referred as &#8220;loss in data&#8221; report where few message or request has not be processed because of various errors between systems. If we skip this step, validating data accuracy could be very difficult and next to impossible. This may be considered as a part of error and log handling design.</p>
<p style="text-align: justify;"><strong>4. API limit considerations</strong></p>
<p style="text-align: justify;">If external system is trying to connect to Salesforce then it is using <a href="https://help.salesforce.com/HTViewHelpDoc?id=integrate_api_rate_limiting.htm">API limit</a> which is defined for every organization for a 24 hours. We also have a limit on Bulk API per 24 hours. My most of Salesforce implementation project has 3000+ Salesforce users and therefore I have not faced issue with API limit however good to consider in design.</p>
<p style="text-align: justify;"><strong>5. Single ETL tool to connect to every applications</strong></p>
<p style="text-align: justify;">This point I know is very debating. I am saying that every application connecting to Salesforce should have single ETL tool where few of you may disagree with me. In one of my project, I had to integrate Salesforce with around 18 Systems. <a href="http://www.boomi.com/">BOOMI</a> was ETL tool of choice and it was used to integrate around 8 systems. Other Systems were integrated using webservices, custom Java tool which implemented BULK API and <a href="https://www.jitendrazaa.com/blog/tag/cli/">command line dataloader</a>. We faced lots of issue maintaining and debugging error in all these tools. It would have been very easy if Single ETL tool could be used for all systems. As multiple tools were used, few tool were black box for us and they were using on there Will whenever they wanted to change data inside Salesforce. As discussed above, &#8220;Accountability&#8221; was main issue. If any tool was failing because of any reason, Salesforce team were to blame in every case and we were on fire <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f600.png" alt="😀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> .</p>
<p style="text-align: justify;"><strong>6. Different user for different System</strong></p>
<p style="text-align: justify;">Lets say, if you are integrating with 10 systems using ETL tool, it is always best practice to have different users for all those system. It has lots of benefit, flexibility and control. We can have different profiles for each user, complete control and easy to debug. Imagine single &#8220;integration user&#8221; is used to interact with all system, chances of <a href="https://developer.salesforce.com/blogs/engineering/2013/04/managing-lookup-skew-to-avoid-record-lock-exceptions.html">data skew</a> is very high. We cannot switch off user from Salesforce end, hard to configure profile as it may break existing integration and many more.</p>
<p style="text-align: justify;"><strong>7. Integration User license</strong></p>
<p style="text-align: justify;">As discussed above, its good practice to have different Salesforce user for different systems. It is not necessary that we need &#8220;full Salesforce user license&#8221;. If we are not using standard objects then cost can be saved by opting &#8220;Force.com app bundle license&#8221; or any other suitable <a href="https://help.salesforce.com/apex/HTViewHelpDoc?id=users_license_types_available.htm&amp;language=en_US">Salesforce user license</a>.</p>
<p style="text-align: justify;"><strong>8. Data Volume over the time and Data archiving considerations</strong></p>
<p style="text-align: justify;">If you are integrating with multiple systems or not, Data archiving strategy is very important to be considered. There are many advantages of data archiving including improve in performance of reports, list views, global search and saving space of Salesforce. Data archiving can be done using ETL tool or even <a href="https://www.jitendrazaa.com/blog/tag/cli/">command line dataloader</a> directly connecting to databases like SQL Server. While designing Data archive strategy, easily getting data back is also very important. Example &#8211; using Dataloader, if backup is done in multiple csv files, It would be hard to find record from hundreds of csv files. Even if RDBMS like SQL Server or MySQL is considered, indexing, partition and other performance improvement techniques must be considered. It should not be like one way road where we can archive data but cannot get it back when needed. I have used &#8220;<a href="http://www.forceamp.com/">DBamp</a>&#8221; in many of projects where ETL tools were not used and would recommend to try it out.</p>
<p><strong>9. Single Sign On</strong></p>
<p style="text-align: justify;">This is also very important topic and needs much attention and thoughtful discussion. Salesforce provides lots of option to implement <a href="https://www.jitendrazaa.com/blog/tag/sso/">Single Sign On</a> using federated authentication, Delegated authentication or many other Authorization providers. In addition of all APIs available to implement SSO, Salesforce also provides &#8220;<a href="http://www.salesforce.com/platform/products/identity/">Identity Connect</a>&#8221; which could be considered for SSO implementation. There are many third party applications as well like <a href="https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wdx3EAA">Ping Identity</a> or <a href="https://appexchange.salesforce.com/listingDetail?listingId=a0N300000055spaEAA">Okta</a>. Also, as a best practice, do not enable SSO for System admin users. If something happens with Identity provider or Web services are not responding, end users will be blocked and System admin could still log into system. If we enable SSO for System admin as well then complete Salesforce instance would not be accessible by anyone.</p>
<p><strong>10.  Outbound messages are your best friend</strong></p>
<p style="text-align: justify;">Question is &#8220;Are you using or considering Outbound messages ?&#8221;. I have seen, many Salesforce implementations where integration could be easily done by using outbound messages instead of Apex callouts. You don&#8217;t need to write Apex code, Test classes and polling mechanism if communication fails. Outbound message tries until message is successfully is delivered though there are some <a href="https://resources.docs.salesforce.com/198/latest/en-us/sfdc/pdf/integration_patterns_and_practices.pdf">design considerations</a> while using Outbound messages.</p>
<p style="text-align: justify;">Please feel free to leave comment and suggestions on this topic so that we can discuss each others experience in integration design and problems.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.jitendrazaa.com/blog/salesforce/10-salesforce-integration-design-considerations-from-architect-point-of-view-mind-mapping-included/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">5094</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: www.jitendrazaa.com @ 2026-10-11 05:54:47 by W3 Total Cache
-->