<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Lookup Salesforce Parent Object Id using External ID in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4420360#M7130</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Salesforce, you can use an External ID field to link a child record to a parent record. You can use an External ID in place of a record's ID when associating records.&lt;/P&gt;&lt;P&gt;We try to use pipeline to bulk upsert records&amp;nbsp; in Salesforce, however, there is no option to lookup (map) to parent object using the parent's external Id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, we need to upsert Opportunity which requires Contact ID. We do have the Contact External ID, but not the Contact Salesforce ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion how to accomplish this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2025 18:37:28 GMT</pubDate>
    <dc:creator>CCS</dc:creator>
    <dc:date>2025-02-20T18:37:28Z</dc:date>
    <item>
      <title>Lookup Salesforce Parent Object Id using External ID</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4420360#M7130</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Salesforce, you can use an External ID field to link a child record to a parent record. You can use an External ID in place of a record's ID when associating records.&lt;/P&gt;&lt;P&gt;We try to use pipeline to bulk upsert records&amp;nbsp; in Salesforce, however, there is no option to lookup (map) to parent object using the parent's external Id.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, we need to upsert Opportunity which requires Contact ID. We do have the Contact External ID, but not the Contact Salesforce ID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion how to accomplish this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 18:37:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4420360#M7130</guid>
      <dc:creator>CCS</dc:creator>
      <dc:date>2025-02-20T18:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Salesforce Parent Object Id using External ID</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4420946#M7135</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="935893" data-lia-user-login="CCS" class="lia-mention lia-mention-user"&gt;CCS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are my own thoughts about your questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Y&lt;SPAN&gt;ou need to query Salesforce to get the Contact ID based on the Contact's External ID. You can use the REST API to perform this query. Here's an example of how to do this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;GET /services/data/vXX.X/sobjects/Contact/External_ID_Field__c/External_ID_Value&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Replace XX.X with your API version, External_ID_Field__c with the API name of your External ID field, and External_ID_Value with the actual External ID value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;&lt;SPAN&gt;The response will include the Contact ID, which you can then use in your upsert operation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Y&lt;SPAN&gt;ou have the Contact ID, you can proceed to upsert the Opportunity. Here's an example of how to do this using the REST API:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;PATCH /services/data/vXX.X/sobjects/Opportunity/Opportunity_External_ID_Field__c/Opportunity_External_ID_Value
Content-Type: application/json

{
    "Name": "Opportunity Name",
    "StageName": "Prospecting",
    "CloseDate": "2025-12-31",
    "ContactId": "Contact_ID_Value"
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Replace Opportunity_External_ID_Field__c with the API name of your Opportunity's External ID field, Opportunity_External_ID_Value with the actual External ID value, and Contact_ID_Value with the Contact ID you retrieved earlier.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 03:00:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4420946#M7135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-02-21T03:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup Salesforce Parent Object Id using External ID</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4422409#M7144</link>
      <description>&lt;P&gt;Thanks for the reply Yilong, but this solution doesn't work for bulk upserts. We need to upsert 100K+ records&amp;nbsp;&lt;SPAN&gt;daily (and in a case of data migration much more) and bulk upload is the only way due to the 15K batches in a 24-hour period limit.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2025 16:42:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Lookup-Salesforce-Parent-Object-Id-using-External-ID/m-p/4422409#M7144</guid>
      <dc:creator>CCS</dc:creator>
      <dc:date>2025-02-21T16:42:47Z</dc:date>
    </item>
  </channel>
</rss>

