Source ERP · 69 of 105

CRMPro → Salesforce — QuickBooks Desktop (QUICKBOOKS): what the shipped templates set up

Read it in the terminal with "dlake skills show dlake-crmpro-salesforce/erps/quickbooks-desktop-quickbooks". It extends the dlake-crmpro-salesforce skill, which holds what is true whatever the source ERP.

CRMPro → Salesforce — QuickBooks Desktop (QUICKBOOKS): what the shipped templates set up

Keep this skill current. dlake ships updates often and this text is embedded in the CLI you have installed. Before relying on it, compare dlake --version with npm view @commercient/dlake version; if they differ, run npm install -g @commercient/dlake@latest and then dlake skills install, which overwrites the installed skill files with the current text.

dlake-crmpro is the parent skill and the authority for everything general: the crmpro_* tools, CRM_Configuration and CRM_FieldList, TimeStampRepository, the three kinds of source view, the NULL-cursor rule and the silent zero-record run. Read it first; this page does not repeat it. dlake-crmpro-salesforce is the destination skill this page is a child of, and the authority for the Salesforce conventions that hold across every ERP: read it first, then come back here for what this source’s own templates set. This page is dlake-crmpro-salesforce/erps/quickbooks-desktop-quickbooks.md, and that skill’s ERP table is what points at it. What follows is only what the shipped QuickBooks Desktop (QUICKBOOKS) → Salesforce templates themselves set, read from their Insert_Query, CreateViewQuery and MappingJson. This page grows as the catalogue does.

1. What the templates deliver

GroupBusiness outcomeObjectsSource tables and views
GET USERThe templates push users to Salesforce. New records are created, existing ones updated, and records removed in the ERP are deleted.users
AccountIn addition to creating the Account record from your ERP customer records, Commercient syncs over the entire Accounting AR Customer record into a Commercient AR Customer object which is a Managed Custom Object (MCO). A lookup field is provided to lookup to the default AR Customer record MCO from the Account record. New records are created and existing ones updated; none are deleted.account, CommercientSF11__Terms__c, Contact, CommercientSF11__Customer__c, CommercientSF11__SalesRep__cSF_ERP_Salesforce_Clone_Customer, SF_ERP_Salesforce_Clone_Terms, SF_ERP_Salesforce_Clone_Contact, SF_ERP_Salesforce_Clone_SalesRep
CRM Opportunity and LineThe templates push Opportunity, OpportunityLineItem to Salesforce. New records are created and existing ones updated; none are deleted.Opportunity, OpportunityLineItemSF_ERP_Salesforce_Clone_Estimate, SF_ERP_Salesforce_Clone_oe_hdr, CommercientFlags, SF_ERP_Salesforce_Clone_EstimateLine, SF_ERP_Salesforce_Clone_ItemInventory
CRM Quote and LineThe templates push Quote, QuoteLineItem to Salesforce. New records are created and existing ones updated; none are deleted.Quote, QuoteLineItemSF_ERP_Salesforce_Clone_Estimate, CommercientFlags, SF_ERP_Salesforce_Clone_EstimateLine, SF_ERP_Salesforce_Clone_ItemInventory
ProductThe templates push CommercientSF11__Quickbooks_Iteminventory__c, Product2 to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF11__Quickbooks_Iteminventory__c, Product2SF_ERP_Salesforce_Clone_ItemInventory
Open AR Invoice HeaderThe detail lines on open invoices are visible too so that you are aware of what items you are awaiting payment on from your customer. New records are created and existing ones updated; none are deleted.CommercientSF11__InvoiceLine__c, CommercientSF11__Invoice__cSF_ERP_Salesforce_Clone_InvoiceLine, SF_ERP_Salesforce_Clone_Invoice, CommercientFlags
SalesorderThe templates push CommercientSF11__SalesOrderLine__c, CommercientSF11__SalesOrder__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF11__SalesOrderLine__c, CommercientSF11__SalesOrder__cSF_ERP_Salesforce_Clone_SalesOrderLine, SF_ERP_Salesforce_Clone_SalesOrder, CommercientFlags

2. The process rows the templates create

Each template’s Insert_Query writes one CRM_Configuration row. These are the values it sets; a column the inserts never set is not listed.

Display nameCRM_Object_API_NameCRM_PK_API_NameSync_OrderTimeStamp_PrefixSQL_Query targetfield prefix / postfixSync_Operation_Type
GET USERusers0vw_QUICKBOOKS_User1=0'' / ''1
TermsCommercientSF11__Terms__cCommercientSF11__ExternalKey__c1vw_Termsvw_QUICKBOOK_TermsCommercientSF11__ / __c
SalesRepCommercientSF11__SalesRep__cCommercientSF11__ExternalKey__c2vw_SalesRepvw_QUICKBOOK_SalesRepCommercientSF11__ / __c
CRM AccountaccountCommercientSF__Commercient_ArCustomerCode__c3vw_CRM_Accountvw_QUICKBOOK_CRM_Account'' / ''
CustomerCommercientSF11__Customer__cCommercientSF11__ExternalKey__c4vw_Customervw_QUICKBOOK_CustomerCommercientSF11__ / __c
SalesOrderCommercientSF11__SalesOrder__cCommercientSF11__ExternalKey__c5vw_SalesOrdervw_QUICKBOOK_SalesOrderCommercientSF11__ / __c
SalesOrderLineCommercientSF11__SalesOrderLine__cCommercientSF11__ExternalKey__c6vw_SalesOrderLinevw_QUICKBOOK_SalesOrderLineCommercientSF11__ / __c
InvoiceCommercientSF11__Invoice__cCommercientSF11__ExternalKey__c7vw_Invoicevw_QUICKBOOK_InvoiceCommercientSF11__ / __c
InvoicelineCommercientSF11__InvoiceLine__cCommercientSF11__ExternalKey__c8vw_Invoicelinevw_QUICKBOOK_InvoicelineCommercientSF11__ / __c
ItemInventoryCommercientSF11__Quickbooks_Iteminventory__cCommercientSF11__ExternalKey__c10vw_ItemInventoryvw_QUICKBOOK_ItemInventoryCommercientSF11__ / __c
ContactContactExternalKey__c15vwContact:vw_QUICKBOOK_Contact'' / ''
ProductProduct2CommercientSF11__ExternalKey__c16vwProduct:vw_QUICKBOOK_Product'' / ''
OpportunityOpportunityExternalKey__c17vwOpportunity:vw_QUICKBOOK_Opportunity'' / ''
OpportunityLineItemOpportunityLineItemExternalKey__c18vwOpportunityLineItem:vw_QUICKBOOK_OpportunityLineItem'' / ''
QuoteQuoteExternalKey__c19vwQuote:vw_QUICKBOOK_Quote'' / ''
QuoteLineItemQuoteLineItemExternalKey__c20vwQuoteLineItem:vw_QUICKBOOK_QuoteLinteItem'' / ''

Every one of these inserts Is_Active as 0, so an imported process is inactive until an operator activates it. Across the set they insert Is_Create_Entity 0, Is_Create_Fields 0, Is_Active_Get_Records 0, Is_Active_Delete_Records 0, Sync_Batch_Size 200. IsAccountMatching is set on CRM Account. Text columns a template does not use are inserted as '' rather than left NULL. Get_SOQL_Query carries a query on GET USER — those rows read records back from Salesforce as well as pushing. On Contact, QuoteLineItem the SQL_Query names a view the same template’s CreateViewQuery does not create (vw_QUICKBOOK_Contact against vw_Quickbook_Contacts; vw_QUICKBOOK_QuoteLinteItem against vw_QUICKBOOK_QuoteLineItem), so check the view exists under the name the row selects from before activating it.

3. The views

Each template creates its view with CreateViewQuery, in the gateway dbo schema. “Change detection” names which of the three kinds dlake-crmpro defines the view’s own WHERE makes it; where a view’s shape is not one of those three the column is left empty and the view’s own WHERE is the authority.

ViewChange detectionRepository keyReads other prefixesIdentity columnSource tables
vw_QUICKBOOK_Termsinsert + updatevw_Terms:ExternalKeySF_ERP_Salesforce_Clone_Terms
vw_QUICKBOOK_SalesRepinsert + updatevw_SalesRep:ExternalKeySF_ERP_Salesforce_Clone_SalesRep
vw_QUICKBOOK_CRM_Accountinsert + updatevw_CRM_Account:vw_SalesRep:, vw_QUICKBOOKS_User:SF_ERP_Salesforce_Clone_Customer
vw_QUICKBOOK_Customerinsert + updatevw_Customer:vw_CRM_Account:, vw_SalesRep:ExternalKeySF_ERP_Salesforce_Clone_Customer
vw_QUICKBOOK_SalesOrderinsert + updatevw_SalesOrder:vw_CRM_Account:, vw_Customer:ExternalKeySF_ERP_Salesforce_Clone_SalesOrder, CommercientFlags
vw_QUICKBOOK_SalesOrderLineinsert + updatevw_SalesOrderLine:vw_SalesOrder:ExternalKeySF_ERP_Salesforce_Clone_SalesOrderLine
vw_QUICKBOOK_Invoiceinsert + updatevw_Invoice:vw_CRM_Account:, vw_Customer:ExternalKeySF_ERP_Salesforce_Clone_Invoice, CommercientFlags
vw_QUICKBOOK_Invoicelineinsert + updatevw_Invoiceline:vw_Invoice:ExternalKeySF_ERP_Salesforce_Clone_InvoiceLine
vw_QUICKBOOK_ItemInventoryinsert + updatevw_ItemInventory:vw_Item:ExternalKeySF_ERP_Salesforce_Clone_ItemInventory
vw_Quickbook_Contactsinsert + updatevwAccount:, vwCustomer:, vwContact:ExternalKeySF_ERP_Salesforce_Clone_Contact
vw_QUICKBOOK_Productinsert + updatevwProduct:SF_ERP_Salesforce_Clone_ItemInventory
vw_QUICKBOOK_Opportunityinsert-onlyvwAccount:, vwOpportunity:ExternalKeySF_ERP_Salesforce_Clone_Estimate, SF_ERP_Salesforce_Clone_oe_hdr, CommercientFlags
vw_Quickbook_OpportunityLineIteminsert-onlyvwProduct:, vwOpportunity:, vwOpportunityLineItem:ExternalKeySF_ERP_Salesforce_Clone_EstimateLine, SF_ERP_Salesforce_Clone_Estimate, SF_ERP_Salesforce_Clone_ItemInventory
vw_QUICKBOOK_Quoteinsert-onlyvwAccount:, vwOpportunity:, vwQuote:ExternalKeySF_ERP_Salesforce_Clone_Estimate, CommercientFlags
vw_QUICKBOOK_QuoteLineIteminsert-onlyvwProduct:, vwQuote:, vwQuoteLineItem:ExternalKey__cSF_ERP_Salesforce_Clone_EstimateLine, SF_ERP_Salesforce_Clone_Estimate, SF_ERP_Salesforce_Clone_ItemInventory

The repository key these templates build is <TimeStamp_Prefix>:<key>. The literal in the view and the TimeStamp_Prefix on the configuration row have to be the same string, case included.

4. Order of work

The templates set Sync_Order from 0 to 20. A run processes active rows in ascending Sync_Order, which is the order the templates put them in:

  • 0 — GET USER
  • 1 — Terms
  • 2 — SalesRep
  • 3 — CRM Account
  • 4 — Customer
  • 5 — SalesOrder
  • 6 — SalesOrderLine
  • 7 — Invoice
  • 8 — Invoiceline
  • 10 — ItemInventory
  • 15 — Contact
  • 16 — Product
  • 17 — Opportunity
  • 18 — OpportunityLineItem
  • 19 — Quote
  • 20 — QuoteLineItem

These views read another process’s repository prefix, which is what makes the order a dependency order: the row appears in the view only once the process that writes that prefix has run, so a parent flows on one run and its children on the next.

  • vw_QUICKBOOK_CRM_Account reads vw_SalesRep:, vw_QUICKBOOKS_User:
  • vw_Quickbook_Contacts reads vwAccount:, vwCustomer:, vwContact:; no template in this set writes vwAccount:, vwCustomer:, vwContact:
  • vw_QUICKBOOK_Opportunity reads vwAccount:, vwOpportunity:; no template in this set writes vwAccount:, vwOpportunity:
  • vw_Quickbook_OpportunityLineItem reads vwProduct:, vwOpportunity:, vwOpportunityLineItem:; no template in this set writes vwProduct:, vwOpportunity:, vwOpportunityLineItem:
  • vw_QUICKBOOK_Quote reads vwAccount:, vwOpportunity:, vwQuote:; no template in this set writes vwAccount:, vwOpportunity:, vwQuote:
  • vw_QUICKBOOK_QuoteLineItem reads vwProduct:, vwQuote:, vwQuoteLineItem:; no template in this set writes vwProduct:, vwQuote:, vwQuoteLineItem:
  • vw_QUICKBOOK_Customer reads vw_CRM_Account:, vw_SalesRep:
  • vw_QUICKBOOK_ItemInventory reads vw_Item:; no template in this set writes vw_Item:
  • vw_QUICKBOOK_Invoiceline reads vw_Invoice:
  • vw_QUICKBOOK_Invoice reads vw_CRM_Account:, vw_Customer:
  • vw_QUICKBOOK_Product reads vwProduct:; no template in this set writes vwProduct:
  • vw_QUICKBOOK_SalesOrderLine reads vw_SalesOrder:
  • vw_QUICKBOOK_SalesOrder reads vw_CRM_Account:, vw_Customer:

5. Field mapping

CRM_FieldList carries one row per pushed column, with Object_Name equal to the CRM_Object_API_Name value — as dlake-crmpro puts it, an object with no CRM_FieldList rows pushes nothing and records no error. Each template carries its intended mapping in MappingJson. Read that with dlake admin crmpro_templates, then check crmpro_field_mapping on the created process before activating it.

TemplateObjectMapped fieldsFirst ERP → Salesforce pairs
TermsCommercientSF11__Terms__c12ListIDCommercientSF11__ExternalKey__c, EditSequenceCommercientSF11__EditSequence__c, NameCommercientSF11__Name__c, StdDueDaysCommercientSF11__StdDueDays__c, StdDiscountDaysCommercientSF11__StdDiscountDays__c
SalesRepCommercientSF11__SalesRep__c7ListIDExternalKey, SalesRepEntityRefFullNameName, EditSequenceEditSequence, InitialInitial, IsActiveIsActive
CRM Accountaccount13ListIDCommercientSF__Commercient_ArCustomerCode__c, FullNameName, PhonePhone, BillAddressCityBillingCity, BillAddressStateBillingState
CustomerCommercientSF11__Customer__c79ListIDCommercientSF11__ExternalKey__c, NameName, BalanceBalance, BillAddressAddr1BillAddressAddr1, BillAddressAddr2BillAddressAddr2
SalesOrderCommercientSF11__SalesOrder__c67TxnIDCommercientSF11__ExternalKey__c, TxnIDName, RefNumberRefNumber, BillAddressAddr1BillAddressAddr1, BillAddressAddr2BillAddressAddr2
SalesOrderLineCommercientSF11__SalesOrderLine__c52TxnLineIDCommercientSF11__ExternalKey__c, TxnIDCommercientSF11__Name__c, BillAddressAddr1CommercientSF11__BillAddressAddr1__c, BillAddressAddr2CommercientSF11__BillAddressAddr2__c, BillAddressAddr3CommercientSF11__BillAddressAddr3__c
InvoiceCommercientSF11__Invoice__c71TxnIDCommercientSF11__ExternalKey__c, RefNumberCommercientSF11__RefNumber__c, BillAddressAddr1CommercientSF11__BillAddressAddr1__c, BillAddressAddr2CommercientSF11__BillAddressAddr2__c, BillAddressAddr3CommercientSF11__BillAddressAddr3__c
InvoicelineCommercientSF11__InvoiceLine__c62TxnLineIDCommercientSF11__ExternalKey__c, TxnLineIDCommercientSF11__Name__c, AppliedAmountCommercientSF11__AppliedAmount__c, BalanceRemainingCommercientSF11__BalanceRemaining__c, BalanceRemainingInHomeCurrencyCommercientSF11__BalanceRemainingInHomeCurrency__c
ItemInventoryCommercientSF11__Quickbooks_Iteminventory__c34ListIDCommercientSF11__ExternalKey__c, NameName, AssetAccountRefFullNameAssetAccountRefFullName, AssetAccountRefListIDAssetAccountRefListID, BarCodeValueBarCodeValue
ContactContact8SFDCIDAccountID, SFDCIDQuickbooks_Customer, ListIDExternalKey, FirstName, LastNameName, SalutationSalutation
ProductProduct25ListIDCommercientSF__ExternalKey__c, NameProductCode, FullNameDescription, NameName, IsActiveIsActive
OpportunityOpportunity6CustomerRefListIDAccountID, TxnIDName, TxnIDOpportunityNumber, TxnDateCloseDate, TotalAmountAmount
OpportunityLineItemOpportunityLineItem10LineItemRefListIDProduct2Id, TxnIDOpportunityId, TxnLineIDExternalKey, LineAmountUnitPrice, LineQuantityQuantity
QuoteQuote17TxnIDOpportunityID, CustomerRefListIDAccountId, StatusStatus, DueDateExpirationDate, TotalAmountGrandTotal
QuoteLineItemQuoteLineItem9TxnLineIDExternalKey__c, SFDCIDProduct2ID, SFDCIDQuoteID, LineQuantityQuantity, TxnDateServiceDate

6. Verifying

# per-prefix counts; every synced record carries its destination id
dlake tool query --profile <tenant> --sql "SELECT LEFT([Key], CHARINDEX(':',[Key])-1) AS prefix, COUNT(*) n, COUNT(NULLIF(SFDCID,'')) withId FROM dbo.TimeStampRepository WHERE CHARINDEX(':',[Key])>0 GROUP BY LEFT([Key], CHARINDEX(':',[Key])-1)"

withId = n for every prefix is the success condition dlake-crmpro defines. The split is on the first colon, which is the prefix boundary whether the key separator is : or ::.

The prefixes these templates set:

  • vw_QUICKBOOKS_User
  • vw_CRM_Account
  • vw_Terms
  • vwContact:
  • vwOpportunity:
  • vwOpportunityLineItem:
  • vwQuote:
  • vwQuoteLineItem:
  • vw_Customer
  • vw_ItemInventory
  • vw_Invoiceline
  • vw_Invoice
  • vwProduct:
  • vw_SalesOrderLine
  • vw_SalesOrder
  • vw_SalesRep

7. Where this sits

dlake-crmpro is the general operating surface — the crmpro_* tools, the setup and transaction tables, field mapping, and the source-view contract that applies to every destination. This page adds what the shipped QuickBooks Desktop (QUICKBOOKS) → Salesforce templates set up. dlake-crmpro-salesforce is the destination skill this page sits under: its own text is the authority for the Salesforce conventions that hold across every ERP, and its ERP table lists this page alongside every sibling ERP page for this destination. For the extract leg that fills the clone tables, see dlake-normalsync; for the on-premises agent that runs it, dlake-syncagent; for the writeback leg, dlake-txdownloaderpro; for standing an integration up, dlake-integration-setup.