Skip to content

[QUESTION] - OpportunityLineItem records never insert into target org #1195

@zgold-loft

Description

@zgold-loft

2026-04-29__08_22_35.log

Apologies if this doesn't include all the necessary info; I'm pretty new to SFDMU and am trying to learn it so we can seed sandboxes easily from actual data. I'm primarily using the GUI app but am somewhat comfortable with the code itself.

Right now, I seem to be able to successfully migrate most objects/records, but OpportunityLineItem records continuously and uniformly fail. I know this object is notoriously difficult, but I'm still not sure what the issue is. I think I must be doing something wrong with the External ID fields; there seems to be an issue with finding parent records (both Product2 and PricebookEntry records) even though those objects themselves seem to migrate correctly. I suspect that there's something about how the "externalId" key that I misunderstand.

I've read through the documentation, tried various changes to the configuration all with the same result, and gone back and forth with a couple different AI models that haven't been super helpful.

Relevant export JSON is below, and the anonymized log is attached

"objects": [
                {
                    "query": "SELECT Id, Email, FirstName, LastName, all, creatable_false, creatable_true, custom_false, custom_true, lookup_false, lookup_true, readonly_false, readonly_true, type_address, type_anytype, type_base64, type_boolean, type_currency, type_date, type_datetime, type_double, type_email, type_id, type_integer, type_location, type_long, type_multipicklist, type_percent, type_phone, type_picklist, type_string, type_textarea, type_time, type_url, updateable_false, updateable_true FROM Contact WHERE LastModifiedDate >= LAST_N_DAYS:28 OR Rollups_Last_Run__c >= LAST_N_DAYS:28 ORDER BY LastModifiedDate DESC LIMIT 5000",
                    "operation": "Upsert",
                    "externalId": "Name"
                },
                {
                    "query": "SELECT AcctSeed__Accounting_Type__c, AcctSeed__ExtId__c, AcctSeed__Inventory_Product__c, AcctSeed__Inventory_Type__c, AcctSeed__Non_Inventoried_Item__c, AcctSeed__Tax_Code__c, AcctSeed__Tax_Rate__c, AcctSeed__Unit_Cost__c, Adult_Audience__c, Allow_Waitlist__c, Ask_for_registration_details__c, Black_African_African_American__c, Cancel_Reason__c, Canceled_Date__c, Capacity__c, Class_Duration__c, Close_Date__c, Commission_Approved__c, Commission_Pay_Date__c, Compensation__c, Contact_Hour_Pay_Rate__c, Contact_Hours_Per_Session__c, Copy_Fee__c, Crowdcast_Registration_via_Website__c, Days_of_the_Week__c, Description, Do_Not_Send_Automatic_Roster__c, Do_not_send_confirmation_email__c, Do_not_send_evaluation_email__c, Do_not_send_reminder_email__c, East_Asian_Asian_American__c, Ed_Contacted_TA__c, Ed_Notes__c, Ed_Run_with_5_or_6__c, Ed_TA_Responded__c, End_Datetime__c, Event_Needs__c, ExternalId, External_Id__c, External_Link__c, External_Notes__c, Family, Female__c, Final_Attendance_Room_Count__c, Final_Attendance__c, First_Pay_Date__c, Genderqueer__c, Genre__c, Goals_Discover_Explore__c, Goals_Expand_Discuss__c, Goals_Feedback_Polish__c, Goals_Gather_Socialize__c, Goals_Generate_Create__c, Hispanic_Latino__c, Id, IsActive, Level__c, Low_Income_Price__c, Male__c, Member_Price__c, Middle_Eastern_North_African__c, Name, Native_American_American_Indian__c, Native_Hawaiian_Pacific_Islander__c, New_Class__c, Not_for_Website__c, Notes__c, Number_of_Artists_Presenting__c, Number_of_Sessions__c, Pay_What_You_Can__c, Payee_Legal_Name_s__c, Payee_Name_s__c, People_with_Disabilities__c, Price__c, Primary_Audience__c, Requires_Approval__c, Room_Number__c, Run_With_Low_Enrollment__c, Second_Pay_Date__c, Senior_Audience__c, South_Asian_Indian_American__c, Start_Datetime__c, Status__c, Teaching_Artist_Name_s__c, Teaser__c, Total_Sales_Amount__c, Transgender__c, White_Caucasian__c, Youth_Audience__c, all, creatable_false, creatable_true, custom_false, custom_true, lookup_false, lookup_true, readonly_false, readonly_true, type_address, type_anytype, type_base64, type_boolean, type_currency, type_date, type_datetime, type_double, type_email, type_id, type_integer, type_location, type_long, type_multipicklist, type_percent, type_phone, type_picklist, type_string, type_textarea, type_time, type_url, updateable_false, updateable_true FROM Product2 WHERE CreatedDate >= LAST_N_DAYS:90",
                    "operation": "Upsert",
                    "externalId": "Name"
                },
                {
                    "query": "SELECT Id, IsActive, IsArchived, Name, Pricebook2Id, Product2Id, ProductCode, UnitPrice, UseStandardPrice, all, creatable_false, creatable_true, custom_false, custom_true, lookup_false, lookup_true, readonly_false, readonly_true, type_address, type_anytype, type_base64, type_boolean, type_currency, type_date, type_datetime, type_double, type_email, type_id, type_integer, type_location, type_long, type_multipicklist, type_percent, type_phone, type_picklist, type_string, type_textarea, type_time, type_url, updateable_false, updateable_true FROM PricebookEntry WHERE CreatedDate >= LAST_N_DAYS:90",
                    "operation": "Upsert",
                    "master": false,
                    "externalId": "Product2.Name"
                },
                {
                    "query": "SELECT AccountId, AcctSeed__Tax_Amount__c, Amount, Amount_Requested__c, Bank_Name__c, CampaignId, Check_Date__c, CloseDate, CreatedDate, Date_1__c, Date_2__c, Description, Do_Not_Assign_Default_Designation__c, External_ID__c, Fiscal, FiscalQuarter, FiscalYear, ForecastCategory, ForecastCategoryName, Funding_Year__c, Gift_Certificate__c, Gift_Type__c, HasOpenActivity, HasOpportunityLineItem, HasOverdueTask, Id, IsClosed, IsDeleted, IsWon, LOI_Deadline__c, LOI_Submitted_Date__c, LastActivityDate, LastModifiedDate, LastReferencedDate, LastStageChangeDate, LastViewedDate, LeadSource, Multiple_Methods_1__c, Multiple_Methods_2__c, Multiple_Methods_Amount_1__c, Multiple_Methods_Amount_2__c, NBenefit_Value__c, NCheck_Number_Text__c, NContact__c, NTransaction_ID__c, Name, Name_on_Check_Credit_Card__c, NextStep, Order_ID__c, Pay_Method__c, Probability, PushCount, RecordTypeId, Refund_To__c, StageName, SystemModstamp, Type, all, c21payas__OrderNumber__c, creatable_false, creatable_true, custom_false, custom_true, lookup_false, lookup_true, npe03__Recurring_Donation__c, npsp__Primary_Contact__c, readonly_false, readonly_true, type_address, type_anytype, type_base64, type_boolean, type_currency, type_date, type_datetime, type_double, type_email, type_id, type_integer, type_location, type_long, type_multipicklist, type_percent, type_phone, type_picklist, type_string, type_textarea, type_time, type_url, updateable_false, updateable_true FROM Opportunity WHERE (CreatedDate >= LAST_N_DAYS:28 OR CloseDate >= LAST_N_DAYS:28) AND npe03__Recurring_Donation__c = null AND External_ID__c != null AND (NContact__r.LastModifiedDate >= LAST_N_DAYS:28 OR NContact__r.Rollups_Last_Run__c >= LAST_N_DAYS:28) LIMIT 1000",
                    "operation": "Upsert",
                    "excludedFields": [
                        "Pricebook2Id"
                    ],
                    "externalId": "External_ID__c"
                },
                {
                    "query": "SELECT AcctSeed__GL_Account_Variable_2__c, AcctSeed__GL_Account_Variable_3__c, AcctSeed__Tax_Amount__c, AcctSeed__Total_with_Tax__c, Acknoweldge_Date__c, Acknowledge_Me_As__c, Acknowledgment_Sent_Date__c, Additional_Gift__c, Anonymous__c, Canceled__c, Completed_Date__c, Completed__c, Contact__c, CreatedDate, Critique_Due_Date__c, Critique_Start_Date__c, Critique_Turnaround_Window__c, Date__c, Description, Discount, Discount__c, Do_Not_Send_Gift_Receipt__c, Do_Not_Send_Reminder_Email__c, Do_Not_Use__c, Email_Opt_Out__c, End_Date__c, External_Id__c, Gift_Certificate_Applied_to_Purchase__c, Gift_Certificate_Code__c, Gift_Certificate_Email__c, Honor_Memorial_Notification_Address__c, Honor_Memorial_Notification_Date__c, Honor_Memorial_Notification_Email__c, Honor_Memorial_Person_to_Notify__c, Honor_Of_Name__c, Id, IsDeleted, LastModifiedDate, LastReferencedDate, LastViewedDate, ListPrice, Member_Card_Sent_Date__c, Method__c, Name, Notes__c, OpportunityId, Payment_Type__c, Price_Level__c, PricebookEntryId, Pricing_Tier_Discount_Amount__c, ProductCode, Promo_Code_ID__c, Promo_Code__c, Promo_Discount_Amount__c, Promo_Type__c, Quantity, Refund_Amount__c, Refund_Date__c, Rental_End_Date__c, Rental_Start_Date__c, Send_Evaluation_Email_Date__c, Send_Reminder_Email_Date__c, ServiceDate, SortOrder, Status__c, Student_Email__c, Student_Name__c, Student_Phone__c, Subtotal, SystemModstamp, TA_Paid__c, Teaching_Artist__c, TotalPrice, UnitPrice, all, creatable_false, creatable_true, custom_false, custom_true, lookup_false, lookup_true, readonly_false, readonly_true, type_address, type_anytype, type_base64, type_boolean, type_currency, type_date, type_datetime, type_double, type_email, type_id, type_integer, type_location, type_long, type_multipicklist, type_percent, type_phone, type_picklist, type_string, type_textarea, type_time, type_url, updateable_false, updateable_true FROM OpportunityLineItem WHERE CreatedDate >= LAST_N_DAYS:90",
                    "operation": "Upsert",
                    "excludedFields": [
                        "Critique_Due_Date__c",
                        "Discount__c",
                        "Do_Not_Send_Reminder_Email__c",
                        "Email_Opt_Out__c",
                        "Product_Crowdcast_Registration__c",
                        "Product_External_ID__c",
                        "Product_Family__c",
                        "Product_Record_Type__c",
                        "Product_Start_Date__c",
                        "Promo_Code_ID__c",
                        "Promo_Type__c",
                        "Send_Evaluation_Email_Date__c",
                        "Send_Reminder_Email_Date__c",
                        "Teaching_Artist__c",
                        "AcctSeed__Total_with_Tax__c"
                    ],
                    "externalId": "Name"
                }
            ]
        }

Any and all help would be appreciated. Thank you!

Metadata

Metadata

Assignees

Labels

help-wantedUser need a help or something not working, not a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions