# Upsert Salesforce Data using External Id in SSIS

**URL:** <https://community.cdata.com/t/upsert-salesforce-data-using-external-id-in-ssis/657>\
**Category:** Data Sources\
**Tags:** article, salesforce, ssis\
**Created:** [March 11, 2024, 2:27pm UTC](https://community.cdata.com/t/upsert-salesforce-data-using-external-id-in-ssis/657 "2024-03-11T14:27:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_H](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@Andrew\_H](https://community.cdata.com/u/Andrew_H)\
**Post date:** [March 11, 2024, 2:27pm UTC](https://community.cdata.com/t/upsert-salesforce-data-using-external-id-in-ssis/657/1 "2024-03-11T14:27:03Z")

</div>

1. First, set up the data source. A&nbsp;Salesforce&nbsp;source is used in this example, but any source will work for this process.

 ![3dcfd1ae-66e0-4b36-9a81-d9316ef7e8fd.png](https://us1.discourse-cdn.com/cdata/original/2X/d/d9511f49c83a9283ad23ad71828e8bafc56b1097.png)

1. Drag a Derived Column transformation&nbsp;component&nbsp;from the Data Flow Transformations section of the toolbox onto the data flow.

 ![fcc05ab6-20f5-4a8f-8145-f5a3a8467a6a.png](https://us1.discourse-cdn.com/cdata/original/2X/c/cfe5b52fdd86ac6226b22ef9b40fbb9bca573d47.png)

1. Double-click the Derived Column to open the Transformation Editor and add a new column.&nbsp;Set the Derived Column Name to the name of the new column (MyExternalIdColumn&nbsp;in this example). Select the “add as new column” option in the Derived Column field. Set the Expression field to the name of the external Id&nbsp;column&nbsp;in the Salesforce destination table, including quotes. This example uses “external\_id\_c\_\_c”.

 ![ed520968-520d-45db-a11f-73a1b784783b.png](https://us1.discourse-cdn.com/cdata/original/2X/5/53d8e9e4fd71499c47b36828a1c7a105f7851768.png)

1. Add the Salesforce destination&nbsp;component. In the Salesforce connection&nbsp;manager,&nbsp; in&nbsp;addition to your credentials used to log in to Salesforce, set the&nbsp;PseudoColumn&nbsp;advanced property to \*=\*. Setting the&nbsp;PseudoColumn&nbsp;to \*=\* tells the&nbsp;component&nbsp;to include the pseudo column “ExternalIdColumn” in the schema of the destination table.&nbsp;You will use this column during&nbsp;the mapping below.

1. In the Salesforce destination&nbsp;component, specify the table that will be used for the&nbsp;upsert&nbsp;operation (i.e., the destination table).&nbsp;In&nbsp;the mapping section, map the derived column that you created in step #3 (in this example,&nbsp;MyExternalIdColumn) to “ExternalIdColumn”&nbsp;pseudocolum&nbsp;mentioned in step#4.&nbsp;Additionally, map the column from&nbsp;the source table to the Salesforce external id column of the destination table. In this example, we mapped the “external\_ID\_\_c” from&nbsp;the source to “external\_id\_c\_\_c”&nbsp;in&nbsp;the destination table.

 ![bbaf8112-720c-4178-a3b6-04a205ba8084.png](https://us1.discourse-cdn.com/cdata/original/1X/03fd6044fdb395ce877871cc47cadb6a18cb3624.png)

6.&nbsp;You can now execute the task to UPSERT data to Salesforce based on the Salesforce external Id column of the destination table.
