An integrator.io export queries (or copies) data from an application or system. You also have options for transforming and filtering the data as it is extracted from the source application, Salesforce.
- Create an export
- Export records from source application (batch exports)
- Preview data
- Listen for real-time data from Salesforce
To begin exporting data from Salesforce, choose one of the following options:
- Form the Resources menu, select Exports. In the resulting Exports page, click + New export. For the application type, choose Salesforce.
– or –
- From the Tools menu, select Flow builder, and click Source Applications +. For the application type, choose Salesforce.
You can configure a Salesforce export to run on a scheduled basis or in real-time triggered by actual events that happen within Salesforce (like when a record is saved).
There are two options available in the What would you like to do? drop-down menu:
- Export records from source application: Choose this option for scheduled exports. Scheduled exports are a better fit for syncing data in bulk, or when the timing of a sync is not critical, or when it is just not possible due to where the data is being sent. Scheduled exports are easier to configure and manage, and can also be a better option when getting started with a new integration use case.
- Listen for real-time data from source application: Choose this option for real-time exports. Real-time exports are more difficult to configure and manage but are ideal for time-sensitive data changes.
You can also use a combination of scheduled and real-time exports. For example, you could enable a real-time export to send Account updates to your ERP, and then use a nightly scheduled export to send Contact updates.
Choose an option and select an existing connection from the Connection drop-down menu. If the connection you want to use does not yet exist, click the pencil icon to create a new connection.
If you selected Export records from the source application, the following page displays.
Name your export so that you can easily reference it from other parts of the application. For example: "Salesforce - Query All Accounts".
Use the SOQL query field to export data from salesforce resources. Below is an example of querying from salesforce Accounts where name is like “SF_Composite_Account%”.
select Name,Email__c,Phone,(select LastName,Title,Email from contacts where Name LIKE 'SF_Composite_Contact%') from Account where Name LIKE 'SF_Composite_Account%'
Provide the query and select the export type, then click Preview data to review the sample data that is coming from Salesforce.
When exporting data from Salesforce, integrator.io provides four options for the Export type.
Exports all data returned by the query.
Exports all new data since the date/time value that defines the last time the flow was run.
Store the timestamp from the Salesforce application in the Date field so that integrator.io can keep track of records that have changed since the last time the export was run. Choose a system-generated field to update the timestamp on each flow run. Applications maintain a standard 'Date Last Modified' (or 'Last Modified Date') field that always contains the date and time that a record was last changed. You can also select a non-system-generated field if you have your own logic in place (in the export application) to update the timestamp.
In the above image, the Created Date tracks the records that have changed since the last time the export was run, so records modified after the last export was run will be exported through the Created Date field reference.
Exports any data that has not been exported already. Once also automatically update records to mark them as exported (which can impact flow times).
Select a boolean field (i.e. a checkbox field) from the export application that integrator.io can use to keep track of records that have already been exported. Integrator.io will only export the records where this boolean field is false (unchecked), and integrator.io will also automatically make a subsequent request back into the export application to set this boolean field to true for all the records that were exported (so that those records are not exported again).
In the above image, a boolean field named Once Export is a checkbox that tracks the export status for all records.
Exports only one record by default. This option is used for testing in order to avoid syncing lots of data.
The Preview data section provides a sample that contains the first row of the Salesforce query results in JSON format.
Note: If your organization is not currently using the Salesforce Integration Adapter, install the adapter for all users before you proceed.
To configure a Salesforce real-time export, choose the Listen for real time data from source application option in the What would you like to do? drop-down menu. Select an existing connection from the Connection drop-down menu. If the connection you want to use does not yet exist, click the pencil icon to create a new connection.
You can specify the sObject type, Required trigger, Reference fields, Related lists, and Field-specific qualification criteria.
- sObject type: Select the Salesforce sObject type you want to export. Your list of sObject types depends on the permissions associated with the connection you selected. If you add any new custom sObject types to your Salesforce account, or if there are any changes to the permissions associated with the connection you selected, you can use the refresh icon to regenerate the list. You can choose any standard sObject type (i.e. account, opportunity, contact) or any custom sObject type as long as the sObject type supports Salesforce triggers.
- Required trigger: After selecting an sObject type in the SObject type field, an Apex trigger code is generated. This code is required per sObject type to facilitate real-time data exports. Copy this code using the copy icon and paste it in the Salesforce page in your account.
Note: To deploy Apex Triggers to Production, Salesforce requires at least 75% code test coverage. See Add a Test Class in the Salesforce Apex Developer Guide for more information.
- Log in to your Salesforce account and click Setup.
- Use the keyword “Triggers” in the search field under Home tab.
- Click Triggers for the sObject you want to use to trigger the flow. In this example, the sObject is Account.
- Click New.
- Copy the trigger text from integrator.io and paste it in the Apex Trigger text box.
- Click Save.
- Reference fields: To add additional fields to the export data defined as lookup fields on the sObject in Salesforce. This setting allows you to pull data from the reference fields (such as Name, AccountNumber) on the sObject
- Related list: To add additional fields from the related/sublist sObject to the export data defined on the sObject in Salesforce. This setting allows you to pull data from sublist fields such as Name, Email and Department from all Contact records related to an Account record. You can also use filters to only pull filtered Contacts belonging to a specific Department.
- Field-specific qualification criteria: To further refine which records you would like to export based on fields and their values, these criteria look at the record before it is exported and evaluate simple conditional expressions to filter the record to decide whether the record should be exported or discarded. For example, if you are exporting Account records, you can use this field to only export Accounts that belong to a specific Name. Or, if you are exporting an opportunity, you can use this field to export only those opportunities that exceed a certain amount. You can also perform more complex expressions using AND and OR operators.
- Define qualification criteria: Click to open a dialog box where you can visually select the Field-specific qualification criteria for the real-time export. You can choose from the available fields, operators, and values (if applicable). Add another criterion by clicking +, or remove one by clicking -.