Salesforce Connector for UiPath How to Test Connection

Introduction

In this article we will delve deeper into Salesforce and UiPath integration, and will learn how to test connection. We are continuing from where we left off. By this time, you must have installed ODBC PowerPack, created ODBC Data Source, and configured authentication settings in your Salesforce account .

So, let's not waste time and begin.

Use Query Builder to generate SQL query

  1. The first thing you have to do is open Query Builder:

    ZappySys API Driver - Salesforce
    Amazon Ads Connector can be used to get Amazon advertisements using Amazon Advertisements API, download various advertisement-related reports.
    SalesforceDSN
    Open Query Builder in API ODBC Driver to read and write data to REST API
  2. Then simply select the Test Connection endpoint (action).

  3. Continue by configuring the Required parameters. You can also set optional parameters too.

  4. Move on by hitting Preview Data button to preview the results.

  5. If you see the results you need, simply copy the generated query:

    Test Connection
    This Endpoint has no parameters.
    SELECT * FROM test_connection
    Query Builder
  6. That's it! You can use this query in UiPath.

Let's not stop here and explore SQL query examples, including how to use them in Stored Procedures and Views (virtual tables) in the next steps.

SQL query examples

Use these SQL queries in your UiPath data source:

How to Test connection

SELECT * FROM test_connection

Test Connection in UiPath

  1. Open UiPath Studio.

  2. Before we really begin the work, make sure UiPath Studio is set as your profile (blue application icon).

  3. In case, it is set to UiPath StudioX, you can change it in UiPath StudioX Settings:

    Choosing UiPath Studio profile

    Simply select UiPath Studio option:

    Choosing UiPath Studio profile
  4. Start by creating a new project based on UiPath Process template:

    Creating new process in UiPath Studio to import ODBC data
  5. Add Run Query activity in Main Sequence box:

    Adding ODBC data source in UiPath Studio
  6. Click Configure Connection... button to create an ODBC connection:

    Configuring ODBC data source in UiPath in Run Query activity
  7. Continue by clicking Connection Wizard:

    Using connection wizard to setup ODBC source in UiPath Studio
  8. When the window opens, select ODBC-based driver, provider, and then choose ODBC data source:

    SalesforceDSN
    SalesforceDSN
    Choosing ODBC DSN in UiPath Studio connection wizard
    You can also select Use connection string option and use whole ODBC connection string instead. Obtain the connection string by pressing Copy Settings button in your data source configuration.
  9. Once you do that, it's time to configure a SQL query:

    Inputting SQL query for ODBC data source in UiPath Studio
    Make sure, you enclose the query in double quotes!
  10. Proceed by adding a Write CSV activity after Run Query:

    Adding Write CSV activity to write ODBC data in UiPath
    In this article we are using Write CSV, but you can freely add any other destination of your choice, e.g. Write DataTable to Excel.
  11. Once you do that, configure the added Write CSV, this will write Salesforce data to a CSV file:

    Configuring Write CSV activity to write ODBC data in UiPath
  12. It's time for fun! Which means it's time for debugging! Just run the package locally to debug:

    Running UiPath process package to get ODBC data
  13. Finally, ensure there are no execution errors!

    Successful UiPath package debugging

More actions supported by Salesforce Connector

Learn how to perform other actions directly in UiPath with these how-to guides:

More integrations

All
Data Integration
Database
BI & Reporting
Productivity
Programming Languages
Automation & Scripting
ODBC applications