Alteryx Designer

Definitive answers from Designer experts.

Troubleshooting: "400: Bad Request" error with the Salesforce Input tool

Alteryx
Alteryx
Created

Issue

 

When using the Salesforce Input tool, the following error is seen at run-time:

 

400: Bad Request

 

SophiaF_0-1576062561391.png

 

  • This may only occur on some tables
  • It fails almost immediately after the workflow starts running.
  • It may also been seen on the Salesforce Credentials screen along with the error:
invalid_grant: authentication failure

 

SophiaF_0-1576513837243.jpeg

 

Environment

 

  • Alteryx Designer
    • Version 2018.3+
  • Salesforce Input tool
    • Version 4.0 or 4.1

 

Diagnosis

 

Confirm where you are seeing the error. If it is on the Salesforce Credentials configuration page when you click Connect, and you see "invalid_grant", please see Solution B.

 

Otherwise, validate the query to get a more verbose error log.

 

1. Use the Query Builder option (this is the default option) and select the Table and Output Fields you want to read in.

2. Change to the Custom Query option and click the Validate button:

SophiaF_1-1576062825037.png

 

3. If you receive the error: "OPERATION_TOO_LARGE: exceeded 100000 distinct ids", see Solution A.

 

 

Solution A

 

The data you are attempting to pull is too large to be returned in one call based on the Salesforce API limits used by the Salesforce Input Tool. Limit the number of results returned by modifying the WHERE Clause (SOQL) in the tool's configuration:

 

SophiaF_0-1576063764604.png

 

Please see the Additional Resources section below for a guide on SOQL (Salesforce Object Query Language). Here are some suggestions:

 

Try limiting date fields by relative dates :

CreatedDate = THIS_YEAR

Try limiting a string field to a certain value:

Name='SFDC Computing'

You can also combine conditions with logical operators like AND & OR:

Name='SFDC Computing' AND NumberOfEmployees>25

For more advanced comparisons, you can perform fuzzy matches by using the LIKE operator. For example, you can retrieve all accounts whose names start with SFDC by using this condition: 

WHERE Name LIKE 'SFDC%'

- The % wildcard character matches any or no character. The _ character in contrast can be used to match just one character.

 

 

Solution B

 

The credentials are incorrect. Please confirm your Username, Password, and Token are correct.

 

 

Additional Resources