function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

SF QuickBooks Integration Apex Trigger to Write to Product Line Items

I have a customer that is planning to implement a SF to QuickBooks bi-directional tool. They have been working with DBSync so far. They need to be able to have QuickBooks write back the actuals from the Invoice to the individual SFDC Opportunity Product Line Items. They are being told by DBSync that it's not possible to write back from QuickBooks to the SFDC Product Line Items, which seems a bit obsurd. 


Use Case

The product order is created in SFDC using the Opportunity and Product Line Items. The order is then sent to QuickBooks to create a sales order. Due to inventory, they may not be able to ship the quantity ordered. Once the actual order is shipped, QuickBooks generates an Invoice for the actual shipped. The actual shipped information needs to be updated in the Product Line Items so the actuals are current in the SFDC Opportunities for reporting purposes.


DBSync said the only way they can do this is to have Quickbooks create a new Opportunity with Product Line Items with actuals. This work around creates several issues. The Opportunity ID and the Product Line Item ID's change and lose the creation date and stage history. Not only will this throw off all the reporting, it disconnects with the Campaign Opportunity and influence reporting on the new ID's. It also creates duplicate Opportunities that will have to be deleted. Not an option for this customer. 


It seems to me that this can't be the only customer that has this requirement and that an Apex Trigger can be created to update the actuals from the Invoice to the individual Porduct Line Items. 


Has anyone created a Trigger like this and is it possible?


You feedback is most appreciated.