Salesforce Query Data Source


This feature is available on the following tiers: Enterprise, Advanced.



The Salesforce Query Data Source retrieves data from your Salesforce account using Salesforce Object Query Language (SOQL). This data can then be used to populate a list of options in dropdown or radiobutton questions. This data source is intended for obtaining a data set with more than 2000 records.

Data sources are usually set up to fetch data on a specified schedule.  This allows teams to maintain and update their data through the external service of their choice, minimizing the need to access the web portal.  

salesforce.png Organizations of all sizes use the Salesforce platform to manage customer relationships and power their business in the cloud. Looking for two-way integration? Read more about the ways ProntoForms can connect to Salesforce.

[ top ]


Set Up the Data Source


  1. Create the data source as described here.
  2. Select Salesforce Query Data Source as the type.  
  3. Name the data source and optionally enter a Description.
  4. Set up the data source using the information below.

[ top ]


Data Retrieval and Format

Push updates to a device after a fetch

If turned on, users will get a notification from the ProntoForms app after a fetch. It will prompt users to reconcile (send/receive or refresh).   This setting is recommended if it is important that users have the most up-to-date data.  

  • With "push updates" and an automatic fetch set up, some data sources send a notification for each fetch, whether or not the data source has new data.
  • If the fetch schedule is hourly, users may get notifications hourly even if the data has not changed.
  • Some users may find these notifications annoying or confusing.  Consider the fetch frequency carefully if notifications are enabled.  


[ top ]


Fetch Schedule

Automatically fetch new data on a schedule:

  • If checked, data will be retrieved from your Salesforce Report at the Fetch Frequency interval.
    • Make sure that the team has a Problem Contact Email Address.  If a fetch is unsuccessful for any reason, this address will receive an  email with an error message and details.  Without this email, it may not be immediately clear that a fetch has failed.  
  • If unchecked, the data source will not be updated automatically.   To retrieve new data from Salesforce, the data source will need to be manually updated through the "Fetch New Data" button in the web portal.


Fetch Frequency: 

Choose Hourly, Daily, Weekly or Monthly.  This is how often the data source will fetch new data from Salesforce.


Fetch Timezone: 

This applies to all fetch frequency options except “Hourly.”  Data will be fetched at midnight in the chosen time zone.

[ top ]


Salesforce Connection

SOQL Query

Query: This field uses  a SOQL expression, which is used to retrieve data from your Salesforce account. Please refer to Salesforce documentation for more information about SOQL (external link): Salesforce Object Query Language.

  • A simple example of a SOQL statement in this context would be:
    SELECT Id, Name FROM Contact
    Which would yield all IDs and Names from your Contacts. Sample results from this query could be:
    ID Name
    4321 John Smith
    1234 Jane Doe
    2341 John Doe
  • Salesforce API:
    • Query: Using the Query API is recommended for data sets yielding less than 10,000 results. It has more functions available that are documented by Salesforce here: Salesforce Object Query Language.
    • Bulk: Using the Bulk API is recommended for large data sets yielding greater than 10,000 results. It does not support the following SOQL functions: COUNT, ROLLUP, SUM, GROUP BY CUBE, OFFSET, or nested SOQL queries.

Troubleshooting SOQL Queries

Before implementing a SOQL query in ProntoForms, please test the query in the Salesforce Developer Console's Query Editor (see external documentation: Developer Console Query Editor). This will determine if the query is valid within Salesforce. If the query does not function in Salesforce, it will not function in ProntoForms. The Developer Console Query Editor looks like this:


Due to your Salesforce organization's data model being inaccessible to external integrations, ProntoForms cannot troubleshoot SOQL issues.


[ top ]


Fill the Source Data immediately:


  • If left unchecked, the data source will wait until the specified time and interval to retrieve data for the first time.
  • If checked, the first data retrieval will occur immediately after creating the data source.

[ top ]


Using Multiple Values from a Referenced Object: Multiple Data Sources

If trying to call multiple values from a referenced object, please have multiple data sources configured. Currently, ProntoForms only supports calling fields from a single object at a time, resulting in queries calling multiple fields from a referenced object only outputting one field.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


  • Avatar
    Huberto Garza

    ServiceMax Admins -- here's a good SOQL statement to try out: 

    SELECT SVMXC__Company__c,SVMXC__Company__r.Name,SVMXC__Site__c,SVMXC__Order_Type__c FROM SVMXC__Service_Order__c WHERE CreatedDate >= LAST_N_DAYS:180