Prerequisites :

Before we try to link the Invoice Group line-items as a Opportunity Product line-items in Salesforce from QuickBooks, please ensure, you already have the mappings to sync the Group-items from QuickBooks to Salesforce as regular products.

Mappings : Create the mappings to map the fields from QuickBooks to Salesforce.

Graphical user interface, application, Teams

Description automatically generated

Graphical user interface, text, application

Description automatically generated

Note : Do not forget to mention “External Id” mapping on Mapping rule.

Please use below mappings to map the fields from QuickBooks to Salesforce Record. 

Graphical user interface, text, application

Description automatically generated



Graphical user interface, text, application, email

Description automatically generated

Graphical user interface, text, application

Description automatically generated


(OpportunityLineItem)



Loop

InvoiceRet/InvoiceLineGroupRet

AVSFQB__Quickbooks_Id__c [ string, 100 ]



=

PARENTVALUE("RefNumber")+"_"+VALUE("TxnLineID")+"_"+RSPLIT(VALUE("ItemRef/FullName"),":")

Description [ string, 255 ]



=

VALUE("Desc")

OpportunityId [ reference, 18 ]




SESSION_GET("OPPID-"+PARENTVALUE("TxnID"))

PricebookEntryId [ reference, 18 ]



=

LOG(TLOOKUP("Select Id from PriceBookEntry where Name='"+VALUE("ItemGroupRef/FullName")+"' and Pricebook2.Name='Standard Price Book'"))

Quantity [ double, 0 ]

=

IF(ISEMPTY(VALUE("Quantity")),"1",VALUE("Quantity"))

UnitPrice [ currency, 0 ]

=

String es = VALUE("TotalAmount");

  String q1=VALUE("Quantity");

if(es !=null && !es.isEmpty()&& q1 !=null && !q1.isEmpty() ){

 

double T =  Double.parseDouble(es);

LOG("###res : " + T);

double qt =  Double.parseDouble(q1);

  double rs= T/qt;

return String.valueOf(rs);

}else {

return "0.00";

}}

Once field to field mapping is completed, then Save the mappings and save the Workflow.

This completes the mappings to link the Invoice Group line-items as a Opportunity Product line-items in Salesforce from Quickbooks.

Note : Same mappings can be used for all type of transaction from Quickbooks, like 

(Estimate, SalesOrder, Invoice and SalesReceipts)