Salesforce Delete by ID
Overview
This documentation provides detailed information about the "Salesforce Delete by ID" pipeline. This connector facilitates the deletion of records from Salesforce using their standard, system-generated Salesforce Record ID.
This pipeline is used when you have the specific Salesforce ID of the record(s) you wish to delete and want to trigger this deletion based on data or conditions within your BuiltAPI Source Entity.
Pipeline Parameters
Name
This is the name of the pipeline.
Salesforce Settings
This group contains settings specific to your Salesforce instance and the resources you intend to access.
Salesforce Object
- Type: Variable
- Description: The Salesforce object (e.g., "Account", "Contact") from which records will be deleted.
- How to find: You can find the API name of the available objects in your Salesforce instance by navigating to Setup > Object Manager.
Salesforce ID Value Mapping
- Type: JSONata
- Description: A JSONata expression that specifies how to extract the Salesforce Record ID from the Source Entity record. This extracted ID will be used to identify and delete the corresponding record in Salesforce.
- Configuration: Enter a JSONata expression. The expression should point to the field in your Source Entity that holds the Salesforce Record ID.
- Example: "$.data.id" or "$._id" This example indicates that the Salesforce Record ID for deletion will be taken from the "id" field located within the "data" object of each record in the Source Entity.
Source Entity Settings
Settings for the source entity from which data (specifically, the Salesforce Record IDs for deletion) is pulled.
Source Entity
- Type: Entity
- Description: The BuiltAPI entity that holds the records containing the Salesforce Record IDs of the records to be deleted.
- Configuration: Select the appropriate entity from the dropdown menu.
Source Entity Only Updated
- Type: Boolean
- Description: If enabled (toggled on), the pipeline will only process records from the Source Entity that have been updated since the last successful run of this pipeline. If disabled, all records matching the filter will be processed.
- Default: Typically enabled for ongoing synchronization.
Source Entity Filter
- Type: JSON (Mongo Query)
- Description: Defines conditions under which records from the Source Entity are selected for processing. Only records that match this filter will have their corresponding Salesforce records (matched by Salesforce ID) deleted.
- Configuration: Enter a Mongo query JSON object.
- Example: """json { "data.status": "marked_for_deletion" } """ This filter selects records from the Source Entity where the "status" field within the "data" object is "marked_for_deletion". The pipeline will then attempt to delete Salesforce records whose Salesforce Record ID matches the value obtained via "Salesforce ID Value Mapping" from these selected source records.
Workflow
- The pipeline queries the Source Entity based on the Source Entity Filter (and considering the Source Entity Only Updated flag).
- For each record selected from the Source Entity, it extracts the Salesforce Record ID using the Salesforce ID Value Mapping (e.g., the "salesforce_id" value).
- It then attempts to delete the record in the specified Salesforce Object that has this exact Salesforce Record ID.
- If a record with the given Salesforce ID is found, it is deleted.