Source ERP · 101 of 105

CRMPro → Salesforce — Traverse 11: what the shipped templates set up

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

CRMPro → Salesforce — Traverse 11: 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/traverse-11.md, and that skill’s ERP table is what points at it. What follows is only what the shipped Traverse 11 → 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_UsersThe 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, CommercientSF7__tblArCust__c, CommercientSF7_ArSalesPerson__cSF_TRAVERSE11_tblArCust, SF_TRAVERSE11_tblArShipTo, SF_ERP_Salesforce_Clone_tblArSalesRep
Customer Multi Ship AddressesIf you are using multiple ship to addresses for a given AR Customer in your ERP system then you will be able to see all the addresses inside the CRM Account screen in a Commercient Multi Ship To Address MCO related list. New records are created and existing ones updated; none are deleted.CommercientSF7__tblArShipTo__cSF_TRAVERSE11_tblArShipTo, SF_TRAVERSE11_tblArCust
InvoiceBoth Open and Historical invoices are synchronized. Open invoice changes, such as a balance change, or a terms change are reflected in the CRM as they sync based on the frequency of the sync you have chosen (e.g. every hour for example). New records are created and existing ones updated; none are deleted.CommercientSF7__tblArOpenInvoice__cSF_TRAVERSE11_tblArOpenInvoice, CommercientFlags
Invoice History HeadersInvoice line item details are synced in their entirety to the Commercient Invoice Details MCO or the Invoice History Details MCO based on your ERP system functionality. New records are created and existing ones updated; none are deleted.CommercientSF7__tblArHistDetail__c, CommercientSF7__tblArHistHeader__cSF_TRAVERSE11_tblArHistDetail, SF_TRAVERSE11_tblArHistHeader, CommercientFlags, SF_TRAVERSE11_tblArCust
OpportunityThe templates push CommercientSF7_QuoteHeader__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF7_QuoteHeader__cCRM_Configuration, SF_ERP_Salesforce_Clone_tblSoTransHeader, SF_TRAVERSE11_tblArCust, CommercientFlags, SF_TRAVERSE11_tblSoTransDetail, SF_TRAVERSE11_tblSoTransHeader
QuoteLineThe templates push CommercientSF7_QuoteDetail__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF7_QuoteDetail__cSF_ERP_Salesforce_Clone_tblSoTransDetail, CommercientFlags, SF_ERP_Salesforce_Clone_tblSoTransHeader
SalesorderCommercient will sync the Sales Orders from the ERP Sales Order Entry module to the Commercient Sales Order Header (MCO) objects in CRM. In the CRM, customer service and sales people can visualize the status of the order such as on hold, backorder, forward order, scheduled for delivery, whether it has shipped, and completion status. New records are created and existing ones updated; none are deleted.CommercientSF7__tblSoTransHeader__c, CommercientSF7__tblSoTransDetail__cSF_TRAVERSE11_tblSoTransHeader, SF_TRAVERSE11_tblArCust, CommercientFlags, SF_TRAVERSE11_tblSoTransDetail

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_TRAVERSE_User1=0'' / ''1
TRAVERSE AccountAccountCommercientSF__Commercient_ArCustomerCode__c1vw_TRAVERSE_Accountvw_TRAVERSE_Account'' / ''
TRAVERSE SalesPersonCommercientSF7_ArSalesPerson__cExternalKey__c1vw_TRAVERSE_SalesPersonvw_TRAVERSE_SalesPerson'' / __c
TRAVERSE CustomerCommercientSF7__tblArCust__cCommercientSF7__CustId__c2vw_TRAVERSE_Customervw_TRAVERSE_CustomerCommercientSF7__ / __c
TRAVERSE Customer Reverse LookupAccountCommercientSF__Commercient_ArCustomerCode__c3vw_TRAVERSE_CustomerToAccountLookupvw_TRAVERSE_CustomerToAccountLookup'' / ''
TRAVERSE ShipTpAddressCommercientSF7__tblArShipTo__cCommercientSF7__ExternalKey__c4vw_TRAVERSE_ShipTovw_TRAVERSE_ShipToCommercientSF7__ / __c
TRAVERSE SoTrans HeaderCommercientSF7__tblSoTransHeader__cCommercientSF7__TransId__c5vw_TRAVERSE_SoTransHeadervw_TRAVERSE_SoTransHeaderCommercientSF7__ / __c
TRAVERSE SoTrans DetailsCommercientSF7__tblSoTransDetail__cCommercientSF7__ExternalKey__c6vw_TRAVERSE_SoTransDetailvw_TRAVERSE_SoTransDetailCommercientSF7__ / __c
TRAVERSE ArOpenInvoiceCommercientSF7__tblArOpenInvoice__cCommercientSF7__Counter__c7vw_TRAVERSE_ArOpenInvoicevw_TRAVERSE_ArOpenInvoiceCommercientSF7__ / __c
TRAVERSE ArHist HeaderCommercientSF7__tblArHistHeader__cCommercientSF7__ExternalKey__c8vw_TRAVERSE_ArHistHeadervw_TRAVERSE_ArHistHeaderCommercientSF7__ / __c
TRAVERSE ArHist DetailsCommercientSF7__tblArHistDetail__cCommercientSF7__ExternalKey__c9vw_TRAVERSE_ArHistDetailvw_TRAVERSE_ArHistDetailCommercientSF7__ / __c
TRAVERSE Quote HeaderCommercientSF7_QuoteHeader__cExternalKey__c11vw_TRAVERSE_QuoteHeadervw_TRAVERSE_QuoteHeader'' / __c
TRAVERSE Quote DetailsCommercientSF7_QuoteDetail__cExternalKey__c12vw_TRAVERSE_Quote_Linevw_TRAVERSE_Quote_Line'' / __c

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 TRAVERSE 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.

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_TRAVERSE_Accountinsert + updatevw_TRAVERSE_Account:vw_TRAVERSE_User:, vw_TRAVERSE_SalesPerson:SF_TRAVERSE11_tblArCust, SF_TRAVERSE11_tblArShipTo
vw_TRAVERSE_SalesPersoninsert + updatevw_TRAVERSE_SalesPerson:ExternalKeySF_ERP_Salesforce_Clone_tblArSalesRep
vw_TRAVERSE_Customerinsert + updatevw_TRAVERSE_Customer:vw_TRAVERSE_Account:SF_TRAVERSE11_tblArCust
vw_TRAVERSE_CustomerToAccountLookupinsert + updatevw_TRAVERSE_CustomerToAccountLookup:vw_TRAVERSE_Customer:SF_TRAVERSE11_tblArCust
vw_Traverse_ShipToinsert + updatevw_Traverse_ShipTo:vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:ExternalKeySF_TRAVERSE11_tblArShipTo, SF_TRAVERSE11_tblArCust
vw_TRAVERSE_SoTransHeaderinsert + updatevw_TRAVERSE_SoTransHeader:vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:SF_TRAVERSE11_tblSoTransHeader, SF_TRAVERSE11_tblArCust, CommercientFlags
vw_TRAVERSE_SoTransDetailinsert + updatevw_TRAVERSE_SoTransDetail:vw_TRAVERSE_SoTransHeader:, SEP:ExternalKeySF_TRAVERSE11_tblSoTransDetail, CommercientFlags, SF_TRAVERSE11_tblSoTransHeader
vw_TRAVERSE_ArOpenInvoiceinsert + updatevw_TRAVERSE_ArOpenInvoice:vw_TRAVERSE_Account:, SEP:SF_TRAVERSE11_tblArOpenInvoice, CommercientFlags
vw_TRAVERSE_ArHistHeaderinsert + updatevw_TRAVERSE_ArHistHeader:vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:, vw_TRAVERSE_SoTransHeader:ExternalKeySF_TRAVERSE11_tblArHistHeader, CommercientFlags, SF_TRAVERSE11_tblArCust
vw_TRAVERSE_ArHistDetailinsert + updatevw_TRAVERSE_ArHistDetail:vw_TRAVERSE_ArHistHeader:, TblArHistHaeader:, SEP:ExternalKeySF_TRAVERSE11_tblArHistDetail, SF_TRAVERSE11_tblArHistHeader, CommercientFlags
vw_TRAVERSE_QuoteHeaderinsert + updatevw_TRAVERSE_QuoteHeader:vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:, vw_TRAVERSE_SoTransHeader:, vw_TRAVERSE_SoTransDetail:, SEP:ExternalKey__c, ExternalKeyCRM_Configuration, SF_ERP_Salesforce_Clone_tblSoTransHeader, SF_TRAVERSE11_tblArCust, CommercientFlags, SF_TRAVERSE11_tblSoTransDetail
vw_TRAVERSE_Quote_Lineinsert + updatevw_TRAVERSE_Quote_Line:vw_TRAVERSE_QuoteHeader:ExternalKey__cSF_ERP_Salesforce_Clone_tblSoTransDetail, CommercientFlags, SF_ERP_Salesforce_Clone_tblSoTransHeader

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 12. A run processes active rows in ascending Sync_Order, which is the order the templates put them in:

  • 0 — GET USER
  • 1 — TRAVERSE Account, TRAVERSE SalesPerson
  • 2 — TRAVERSE Customer
  • 3 — TRAVERSE Customer Reverse Lookup
  • 4 — TRAVERSE ShipTpAddress
  • 5 — TRAVERSE SoTrans Header
  • 6 — TRAVERSE SoTrans Details
  • 7 — TRAVERSE ArOpenInvoice
  • 8 — TRAVERSE ArHist Header
  • 9 — TRAVERSE ArHist Details
  • 11 — TRAVERSE Quote Header
  • 12 — TRAVERSE Quote Details

Several of these rows share a Sync_Order value: each template group carries its own numbering, so give the imported processes an order across the whole set rather than taking the template values as one.

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_TRAVERSE_Account reads vw_TRAVERSE_User:, vw_TRAVERSE_SalesPerson:
  • vw_TRAVERSE_CustomerToAccountLookup reads vw_TRAVERSE_Customer:
  • vw_TRAVERSE_Customer reads vw_TRAVERSE_Account:
  • vw_Traverse_ShipTo reads vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:
  • vw_TRAVERSE_ArOpenInvoice reads vw_TRAVERSE_Account:, SEP:; no template in this set writes SEP:
  • vw_TRAVERSE_ArHistDetail reads vw_TRAVERSE_ArHistHeader:, TblArHistHaeader:, SEP:; no template in this set writes TblArHistHaeader:, SEP:
  • vw_TRAVERSE_ArHistHeader reads vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:, vw_TRAVERSE_SoTransHeader:
  • vw_TRAVERSE_QuoteHeader reads vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:, vw_TRAVERSE_SoTransHeader:, vw_TRAVERSE_SoTransDetail:, SEP:; no template in this set writes SEP:
  • vw_TRAVERSE_Quote_Line reads vw_TRAVERSE_QuoteHeader:
  • vw_TRAVERSE_SoTransHeader reads vw_TRAVERSE_Account:, vw_TRAVERSE_Customer:
  • vw_TRAVERSE_SoTransDetail reads vw_TRAVERSE_SoTransHeader:, SEP:; no template in this set writes SEP:

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
TRAVERSE AccountAccount14CustIdCommercientSF__Commercient_ArCustomerCode__c, CustNameName, Addr1,Addr2BillingStreet, CityBillingCity, RegionBillingState
TRAVERSE SalesPersonCommercientSF7_ArSalesPerson__c29SalesRepIDExternalKey__c, NameName, Addr1Addr1, Addr2Addr2, CityCity
TRAVERSE CustomerCommercientSF7__tblArCust__c66CustIdCommercientSF7__CustId__c, CustNameName, AcctTypeAcctType, Addr1Addr1, Addr2Addr2
TRAVERSE Customer Reverse LookupAccount2CustIdCommercientSF__Commercient_ArCustomerCode__c, SFDCIDTraverse_Customer_Record__c
TRAVERSE ShipTpAddressCommercientSF7__tblArShipTo__c26CustId,ShiptoIdCommercientSF7__ExternalKey__c, CustId,ShiptoIdName, CustIdCustId, ShiptoIdShiptoId, ShiptoNameShiptoName
TRAVERSE SoTrans HeaderCommercientSF7__tblSoTransHeader__c77TransIdCommercientSF7__TransId__c, NameCommercientSF7__Name__c, TransTypeCommercientSF7__TransType__c, BatchIdCommercientSF7__BatchId__c, LocIdCommercientSF7__LocId__c
TRAVERSE SoTrans DetailsCommercientSF7__tblSoTransDetail__c74TransID,EntryNumCommercientSF7__ExternalKey__c, TransID,EntryNumCommercientSF7__Name__c, TransIDCommercientSF7__TransId__c, EntryNumCommercientSF7__EntryNum__c, ItemJobCommercientSF7__ItemJob__c
TRAVERSE ArOpenInvoiceCommercientSF7__tblArOpenInvoice__c31CounterCommercientSF7__Counter__c, NameName, CustIdCustId, InvcNumInvcNum, RecTypeRecType
TRAVERSE ArHist HeaderCommercientSF7__tblArHistHeader__c98TransId, PostRunCommercientSF7__ExternalKey__c, TransId, PostRunCommercientSF7__Name__c, PostRunCommercientSF7__PostRun__c, TransIdCommercientSF7__TransId__c, TransTypeCommercientSF7__TransType__c
TRAVERSE ArHist DetailsCommercientSF7__tblArHistDetail__c80TransIDCommercientSF7__TransId__c, EntryNumCommercientSF7__EntryNum__c, PostRunCommercientSF7__PostRun__c, ItemJobCommercientSF7__ItemJob__c, WhseIdCommercientSF7__WhseId__c
TRAVERSE Quote HeaderCommercientSF7_QuoteHeader__c77TransIdExternalKey__c, TransIdName, TransTypeTransType, TransTypeTransType_Name, BatchIdBatchId
TRAVERSE Quote DetailsCommercientSF7_QuoteDetail__c74TransID, EntryNumExternalKey__c, TransID, EntryNumName, TransIDTransId, EntryNumEntryNum, ItemJobItemJob

6. Community templates

The catalogue carries 65 community templates for this pair. A community template is authored in a tenant rather than shipped with the product, and it imports the same way as any other. Its own names, notes, field mapping and SQL are tenant content, so what this section states is what the set amounts to: how many templates there are, what they default to doing, which destination objects they write and which groups they fall in. They are not part of the shipped set described above.

  • Templates: 65
  • Default operations: insert on 65, update on 65, delete on 65
  • Marked circular-sync: 2
  • Licence groups they span: 14
  • Destination objects: Account, CommercientSF7__tblArCust__c, CommercientSF7__tblArHistDetail__c, CommercientSF7__tblArHistHeader__c, CommercientSF7__tblArOpenInvoice__c, CommercientSF7__tblArShipTo__c, CommercientSF7__tblSoTransDetail__c, CommercientSF7__tblSoTransHeader__c, CommercientSF7_ArSalesPerson__c, Contact, Order, PricebookEntry, Product2, CommercientSF7__ACCOUNTMATCHING__c, CommercientSF7__CONTACTMATCHING__c, CommercientSF7__VWTRAVERSE11ACCOUNTMATCHING__c, CommercientSF7_QuoteDetail__c, CommercientSF7_QuoteHeader__c, CommercientSF7_TRAVERSE_In_Item__c, CommercientSF7_TRAVERSE_ITEMWAREHOUSE__c, 3 more and 7 custom objects
  • Object display names: TRAVERSE Account, TRAVERSE ArHist Details, TRAVERSE ArHist Header, TRAVERSE ArOpenInvoice, TRAVERSE Customer, TRAVERSE Customer Reverse Lookup, TRAVERSE ShipTpAddress, TRAVERSE SoTrans Details, TRAVERSE SoTrans Header, TRAVERSE SalesPerson, TRAVERSE Contacts, TRAVERSE Service Repair Orders Lines, 20 more and a further template
  • Template groups: Account, Product, Invoice, Customer Multi Ship Addresses, Opportunity, CRM Order and Line, Salesorder, Invoice History Headers, QuoteLine

A community template is imported the way a shipped one is, and the same rules apply to what it creates: read the process it creates with crmpro_get_process, its mapping with crmpro_field_mapping, and the view it selects from, before activating it.

7. 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_TRAVERSE_User
  • vw_TRAVERSE_Account
  • vw_TRAVERSE_CustomerToAccountLookup
  • vw_TRAVERSE_Customer
  • vw_TRAVERSE_ShipTo
  • vw_TRAVERSE_ArOpenInvoice
  • vw_TRAVERSE_ArHistDetail
  • vw_TRAVERSE_ArHistHeader
  • vw_TRAVERSE_QuoteHeader
  • vw_TRAVERSE_Quote_Line
  • vw_TRAVERSE_SoTransHeader
  • vw_TRAVERSE_SoTransDetail
  • vw_TRAVERSE_SalesPerson

8. 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 Traverse 11 → 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.