Salesforce Upsert By External ID
Overview
This documentation provides detailed information about the "Salesforce Upsert By External ID" pipeline, which facilitates the upsert of records into Salesforce based on a unique identifier (External ID).
Pipeline Parameters
Salesforce Settings
This group contains settings specific to your Salesforce instance and the resources you intend to access
Salesforce Object
The Salesforce object from which you want to import records. Example: Account
You can find the list of available objects in your Salesforce instance by navigating to Setup > Object Manager.
Salesforce External ID Field
This field used to match records in Salesforce for upsert operations, typically a unique identifier.\
How to Create External ID Field in Salesforce
1. Log in to your Salesforce account.
2. Navigate to Setup > Object Manager.
3. Select the object for which you want to create an External ID field.
4. Click on "Fields & Relationships" and then "New".
5. Select the field type as "Text" and click "Next".
6. Enter the field details, including Field Label, Length, and Description.
7. Check the "External ID" checkbox and click "Next".
8. Configure the field-level security settings and click "Next".
9. Review the field details and click "Save".
Source Entity Settings
Settings for the source entity from which data is pulled before being upserted into Salesforce.
Source Entity
The entity from which data will be pulled for deleting into Salesforce.
Source Entity Only Updated
Indicates if only updated records should be considered.
Source Entity Filter
Criteria for selecting records from the source entity.
Source to Salesforce Mapping
Mapping of source entity fields to Salesforce fields. This mapping determines how data from the source entity is transformed and stored in Salesforce. Mapping must always include the External ID field to match records in Salesforce for upsert operations. Example:
{
"Salesforce_field_1": $.data.source_field_1,
"Salesforce_field_2": $.data.source_field_2,
"Salesforce_field_3": $.data.source_field_3,
"Salesforce_external_id": $.data.source_id
}
Pipeline Creation Process
Follow these steps to create a pipeline for importing records from Salesforce:
- Obtain Salesforce Credentials: Gather the necessary credentials, including Salesforce Base URL, Salesforce Object, Salesforce Username, Salesforce Password, Salesforce Consumer Key, Salesforce Consumer Secret
- Open Pipeline Editor: In your BuiltAPI Workspace, navigate to the Pipelines section and click on the "Create Pipeline" button.
- Select
Salesforce Import Records
Connector: From the list of available connectors, choose theSalesforce Import Records
connector. - Configure Connector Parameters:
- Enter the Salesforce Base URL, Salesforce Object, Salesforce Username, Salesforce Password, Salesforce Consumer Key, Salesforce Consumer Secret.
- Select or Create the Target Entity where you want to store the imported records.
- Click on "Create pipeline" button
- Set schedule:
- Open "Schedule" tab
- Click on "+ Create Schedule" button
- In the "Create Schedule" window, configure the schedule settings
- Click on "Create schedule" button
Validation and Debugging
- Check last run status and logs to verify if the pipeline executed successfully.
- Inspect the target entity to ensure that the imported data is stored correctly.