Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!

Salesforce connector exceed Salesforce login rate - account gets locked out

Highlighted
8 - Asteroid

I have a workflow that takes input from one Salesforce object and then makes a second and then a third call to SForce using values based on the previous calls. I am basically creating reports that Salesforce cannot do natively because it can't build secondary relationships based on relationships created by a report.

 

For example, in SForce, we have an Account object with a relationship to an Organizations object (via a junction object). The Organizations object also has a junction object relating its records to the Contacts object. So, to get a report of all the Contacts related to an Account, we have to join two separate joins, which SForce can't do.

So, my workflow first gets the IDs from the Account object, then gets all the IDs of the first relationship object that link to those Account IDs. Then I use that result to get the details from the third object, etc.

But, apparently, Alteryx is reconnecting to SForce for each request, so I hit the limit of 3600 logins per hour and got locked out.

 

Is anyone familiar with this problem? Is there a work-around, or a better way of designing my workflow?

Thanks.

 

Highlighted
Alteryx
Alteryx

Hi @asteryx,

 

The Salesforce Input tool will frequently send API calls to Salesforce, which you can see by running Fiddler when configuring the tool in Alteryx.  Showing HTTPS traffic will allow you to see where the number of hits really adds up.  For example, I pulled one column from a table of ours and it made over 125 calls pulling 220,000 records in under 25 seconds.

 

The Salesforce Output tool will send data in batches, which you can see by right-clicking to open the macro while on the canvas.  Batch limits are set to 10,000 records or 2.5 million characters.  I did not test output, but it is likely similar to the Salesforce Input tool.


The login limit is coming from Salesforce, so you may have to think of a workaround. For example, it sounds like your queries are dynamic and potentially sending an API call for each unique ID. You could try sending the queries in batches that send X number of IDs per record into the Salesforce Input. Each batch would update the WHERE clause to pull multiple IDs instead of one.

 

Jerad Rades

Customer Support Engineer

Highlighted
6 - Meteoroid

Hey @asteryx,

 

What Jerad explained to do using a batch macro is an awesome solution to dynamically pull down data from SFDC by passing through a variable into the where clause of the SOQL query. This way you can target a smaller amount of relevant records into your workflow without manually changing the filters on the input tool. I'm solely using Alteryx & Scheduler to integrate my company's DB with SFDC and I employ this method all the time to avoid running into our 100,000/24 hr API call limit.

 

However, I think there's one more piece that you might not know of which can further reduce the amount of steps and query batches. If you learn basic SOQL, then you can start to join data from different related objects in SFDC before it even makes into your Alteryx workflow. You just have to click the "Custom Query" radio button on the Salesforce input tool and enter in your query instead of using the "Query Builder". Below is an example of a Contact SOQL query that lets you bring in fields from the related Account object and also filter those results based on Account criteria:

 

 

SFDCCAP.JPG

 

In this example I'm pulling the Id's, First and Last Names from the Contact object. But I'm also bringing in fields from the Account object that the contact rolls up into like the Account Name and the Billing State. In my where clause I'm also using fields from the Account object to filter the results. 

 

Doing what I showed above used to involve using two separate Salesforce inputs(An Account Input with filters added & a Contact Input that pulls every contact record) and then joining the AccountId field on the Contact record to the Id on the Account record. This also takes two login events whereas the method I showed condenses everything down to one login. 

 

Learning SOQL is super easy and could take as little as 30 minutes to master the complexity of just the thing I showed here. Super easy and a good gateway into learning real SQL if you eventually want to learn that.

 

-Caleb

 

Highlighted
8 - Asteroid

Hi @stonehouse,

Late reply here...

 

Thanks for the extra advise. I'm well versed in SQL, so I should be able to come up with the SOQL I need.

The trick for me will be making it dynamic. I've been using the macro described here:

https://community.alteryx.com/t5/Data-Sources/Extracting-multiple-tables-from-Salesforce/m-p/18592/h....

 

I've got multiple inputs: Table name, Where clause, etc. You approach would, in fact, be simpler since I'd only need to send in one value to the macro.

So, when I get around to it, I'll build a workflow that builds the SOQL statement for me with dynamic input instead.

Highlighted
8 - Asteroid

I've looked around, but don't see a way to update the Salesforce connector with a pre-formed SOQL query in its entirety. Do you know how to update the connector for a custom query similar to the way you can update the Where clause?

Labels