Skip to main content

Hello, my team uses a solution called Sitetracker that works on top of Salesforce. I'd like to read data from Sitetracker and also write to it.

 

In my FME Desktop workspace I tried adding a Reader. In the Add Reader dialog, I set:

In the Salesforce Parameters dialog I set:

  • Host = URL as above
  • User = username of our service account
  • Password = password of that service account
  • Security Token = security token provided by SalesForce email
  • Table List = "Quality__c" manually typed, as the ellipses show it to be stuck on loading

When I try clicking on the Table List ellipses, they get stuck on the Loading dialog as per this screenshot:

2021-09-27_SalesforceReader_TablesLoadingIf I manually type the name of our custom entity "Quality__c" into the Table List, then I can click "OK" on both dialogs. 

 

If I use the URL prefixed with "https://", I get it hanging like this:

2021-09-27_SalesForceReader_ReaderCreationHangingLog 

If I use the URL without that prefix, I successfully can create the Reader. But when I try running that workspace, I get this error:

HTTP/FTP transfer error: 'Couldn't resolve host name'
Please ensure that your network connection is properly set up
No proxy settings have been entered.  If you require a proxy to access external URLs, please ensure the appropriate information has been entered
Salesforce: Could not connect to Salesforce. Please check your network settings
A fatal error has occurred. Check the logfile above for details

 

I get similar issues with the Salesforce Writer. Can you please advise what I may be doing wrong? Things I have tried:

  • With/without the security token
  • With/without the "https://" prefix in the URL
  • With/without the "/" suffix in the URL
  • FME versions 2019.2.3 and 2021.1.2 (i.e. the latest)
  • Proxy set to "No Proxy" or "Use System Proxy Settings"

Hi @peterhorniak​ ,

 

Can you try setting the host to the default login.salesforce.com and entering the username, password, and token and then clicking the ellipse to open the table list? When yo do this, do you get the same error message or does it still hang? Also, when you were able to create the reader, was this after you manually typed in the object in the table list parameter?

 

In most cases, you shouldn't have to change the host; however, if you do, try setting it to <instance>.salesforce.com (i.e. example.salesforce.com).

 

The SalesforceConnector can also be used to read in data from Salesforce (this uses an OAuth web connection instead of the method used in the reader/writer) or if you create a custom app in SF, you can make use of a web connection and use the rest api as well. Are you able to authenticate using OAuth in the Salesforce Web Connection and read the object using SOQL?


Hi @peterhorniak​ ,

 

Can you try setting the host to the default login.salesforce.com and entering the username, password, and token and then clicking the ellipse to open the table list? When yo do this, do you get the same error message or does it still hang? Also, when you were able to create the reader, was this after you manually typed in the object in the table list parameter?

 

In most cases, you shouldn't have to change the host; however, if you do, try setting it to <instance>.salesforce.com (i.e. example.salesforce.com).

 

The SalesforceConnector can also be used to read in data from Salesforce (this uses an OAuth web connection instead of the method used in the reader/writer) or if you create a custom app in SF, you can make use of a web connection and use the rest api as well. Are you able to authenticate using OAuth in the Salesforce Web Connection and read the object using SOQL?

Aside, I haven't used Sitetracker myself but assuming it creates a custom object in Salesforce. We should be able to read it in like any other object. Just need to sort out this authentication issue.


Hi Chris, thanks for your suggestion! When using the default login, I get the error as below.

 

But it turns out that when I omitted "https://" prefix from the Host parameter, I accidentally added "\" at the end. When I omitted that prefix and suffix, the Reader and Writer were created normally.

Thanks for your support!

Creating reader for format: Salesforce
Trying to find a DYNAMIC plugin for reader named `SALESFORCE'
FME API version of module 'SALESFORCE' matches current internal version (3.8 20190820)
Creating reader for format: Salesforce
Trying to find a DYNAMIC plugin for reader named `SALESFORCE'
FME API version of module 'SALESFORCE' matches current internal version (3.8 20190820)
Salesforce: Authenticating as user '<omitted>' on SOAP endpoint 'https://login.salesforce.com/services/Soap/u/37.0'
HTTP/FTP Transfer: Downloading resource 'https://login.salesforce.com/services/Soap/u/37.0' to internal memory buffer
HTTP transfer summary - status code: 500, download size: '662 bytes', DNS lookup time: '0.001037 seconds', total transfer time: '4.903654 seconds', url: 'https://login.salesforce.com/services/Soap/u/37.0'
Received HTTP response header: 'HTTP/1.1 500 Server Error' from 'https://login.salesforce.com/services/Soap/u/37.0'
Salesforce: HTTP 500: INVALID_LOGIN: Invalid username, password, security token; or user locked out.
A fatal error has occurred. Check the logfile above for details
Failed to obtain any schemas from reader 'SALESFORCE' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information
UniversalReader -- readSchema resulted in 0 schema features being returned
Reader Parameter(0) = >login.salesforce.com<
Reader Parameter(1) = >USER<
Reader Parameter(2) = ><omitted><
Reader Parameter(3) = >PASSWORD<
Reader Parameter(4) = ><omitted><
Reader Parameter(5) = >SECURITY_TOKEN<
Reader Parameter(6) = ><omitted><
Reader Parameter(7) = >_MERGE_SCHEMAS<
Reader Parameter(8) = >YES<
Reader Parameter(9) = >RETRIEVE_ALL_TABLE_NAMES<
Reader Parameter(10) = >YES<
Reader Directive(0) = >RUNTIME_MACROS<
Reader Directive(1) = >USER,<omitted>,PASSWORD,<omitted>,SECURITY_TOKEN,<omitted>,_MERGE_SCHEMAS,YES,RETRIEVE_ALL_TABLE_NAMES,YES<
UniversalReader -- readSchema resulted in 0 schema features being returned
Failed to obtain any schemas from reader 'SALESFORCE' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information

 


Hi Chris, thanks for your suggestion! When using the default login, I get the error as below.

 

But it turns out that when I omitted "https://" prefix from the Host parameter, I accidentally added "\" at the end. When I omitted that prefix and suffix, the Reader and Writer were created normally.

Thanks for your support!

Creating reader for format: Salesforce
Trying to find a DYNAMIC plugin for reader named `SALESFORCE'
FME API version of module 'SALESFORCE' matches current internal version (3.8 20190820)
Creating reader for format: Salesforce
Trying to find a DYNAMIC plugin for reader named `SALESFORCE'
FME API version of module 'SALESFORCE' matches current internal version (3.8 20190820)
Salesforce: Authenticating as user '<omitted>' on SOAP endpoint 'https://login.salesforce.com/services/Soap/u/37.0'
HTTP/FTP Transfer: Downloading resource 'https://login.salesforce.com/services/Soap/u/37.0' to internal memory buffer
HTTP transfer summary - status code: 500, download size: '662 bytes', DNS lookup time: '0.001037 seconds', total transfer time: '4.903654 seconds', url: 'https://login.salesforce.com/services/Soap/u/37.0'
Received HTTP response header: 'HTTP/1.1 500 Server Error' from 'https://login.salesforce.com/services/Soap/u/37.0'
Salesforce: HTTP 500: INVALID_LOGIN: Invalid username, password, security token; or user locked out.
A fatal error has occurred. Check the logfile above for details
Failed to obtain any schemas from reader 'SALESFORCE' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information
UniversalReader -- readSchema resulted in 0 schema features being returned
Reader Parameter(0) = >login.salesforce.com<
Reader Parameter(1) = >USER<
Reader Parameter(2) = ><omitted><
Reader Parameter(3) = >PASSWORD<
Reader Parameter(4) = ><omitted><
Reader Parameter(5) = >SECURITY_TOKEN<
Reader Parameter(6) = ><omitted><
Reader Parameter(7) = >_MERGE_SCHEMAS<
Reader Parameter(8) = >YES<
Reader Parameter(9) = >RETRIEVE_ALL_TABLE_NAMES<
Reader Parameter(10) = >YES<
Reader Directive(0) = >RUNTIME_MACROS<
Reader Directive(1) = >USER,<omitted>,PASSWORD,<omitted>,SECURITY_TOKEN,<omitted>,_MERGE_SCHEMAS,YES,RETRIEVE_ALL_TABLE_NAMES,YES<
UniversalReader -- readSchema resulted in 0 schema features being returned
Failed to obtain any schemas from reader 'SALESFORCE' from 1 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information

 

Awesome, thanks for letting me know you were able to get it working!


Reply