dotConnect for Salesforce Documentation
In This Topic
    ExternalID
    In This Topic

    The following example illustrates the ExternalID approach towards migration of two related tables from SQL Server to Salesforce objects.

    We want to migrate the related Orders and OrderDetails tables to the Opportunity and OpportunityLineItem tables correspondingly:

    To migrate them, we do the following:

    1. First of all, in the Salesforce database we complement the set of columns of the Opportunity parent table with the OppExternalId custom column that will be filled in the process of migration with external IDs.
    2. Create 2 Data Flow Tasks and bind them with a precedence constraint:
      • the 1st Data Flow Task for data migration from the parent table;
      • the 2nd Data Flow Task for data migration from the child table;
      • within each task we create 2 data flow objects - an OLE DB Source and a Devart Salesforce Destination - and bind them with a data flow path.
    3. Create 2 connections:
      • the 1st one for OLE DB Source data flow components;
      • the 2nd one for Devart Salesforce Destination data flow components.
    4. In the Devart Salesforce Destination data flow object of the 1st Data Flow Task we switch to the Component Properties tab and set the following properties:

      • set the Salesforce Object property value to Opportunity;
      • set the Action property value to Insert.
    5. Then we switch to the Column Mappings tab and map the OrderID column to OppExternalID, then we set the rest of the mapping as required:

    6. In the Devart Salesforce Destination data flow object of the 2nd Data Flow Task we switch to the Component Properties tab and set the following properties:

      • set the Salesforce Object property value to OpportunityLineItem.
      • set the Action property value to Insert.
    7. After this, we switch to the Column Mappings tab and map OrderID column to OpportunityID, then we set the rest of the mapping as required:

    8. Then we switch to the Input and Output Properties tab and in the External Columns node select the Salesforce column that is a lookup (OpportunityID).

      • in this column's Properties, the ReferencedObject custom property value is set automatically and specifies the required referenced object;
      • we set the RelationshipUpdateMode property value to ExternalID to define values to be inserted into this lookup column;
      • for the ExternalID custom property we select the required External ID from the drop-down list, in our case it is OppExternalID.

    This is how you can implement data migration to the Salesforce database using the ExternalID approach.

    See Also

    Loading Related Data  |  Loading Related Data via CachedID