Source ERP · 66 of 105

CRMPro → Salesforce — Process PRO: what the shipped templates set up

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

CRMPro → Salesforce — Process PRO: 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/process-pro.md, and that skill’s ERP table is what points at it. What follows is only what the shipped Process PRO → 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
LocationERP ICLOCT data becomes CommercientSF7__ICLOCT__c in Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF7__ICLOCT__cSF_ERP_Salesforce_Clone_ICLOCT
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, CommercientSF7__ARCUST__c, CommercientSF7__SOSLSM__cSF_ERP_Salesforce_Clone_ARCUST, SF_ERP_Salesforce_Clone_ARCADR, SF_ERP_Salesforce_Clone_SOSLSM
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__ARCADR__cSF_ERP_Salesforce_Clone_ARCADR, SF_ERP_Salesforce_Clone_ARCUST
ProductERP ICILOC, ICITEM, ICLOCT data becomes CommercientSF7__ICILOC__c, Product2 in Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF7__ICILOC__c, Product2SF_ERP_Salesforce_Clone_ICILOC, SF_ERP_Salesforce_Clone_ICITEM, from, to, SF_ERP_Salesforce_Clone_ICLOCT
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__ARMAST__c, CommercientSF7__ARTRAN__cSF_ERP_Salesforce_Clone_ARMAST, SF_ERP_Salesforce_Clone_ARCUST, CommercientFlags, SF_ERP_Salesforce_Clone_ARTRAN
Purchase OrderThe templates push CommercientSF7_POMAST__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF7_POMAST__cSF_ERP_Salesforce_Clone_POMAST, CommercientFlags, SF_ERP_Salesforce_Clone_ARCUST
Purchase Order LineThe templates push CommercientSF7_POTRAN__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF7_POTRAN__cSF_ERP_Salesforce_Clone_POTRAN, SF_ERP_Salesforce_Clone_POMAST
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__SOMAST__c, CommercientSF7__SOTRAN__cSF_ERP_Salesforce_Clone_SOMAST, SF_ERP_Salesforce_Clone_ARCUST, CommercientFlags, SF_ERP_Salesforce_Clone_SOTRAN

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_PROCESSPRO_User1=0'' / ''1
ProcessPro SalespersonCommercientSF7__SOSLSM__cCommercientSF7__ExternalKey__c1vw_PROCESSPRO_SalesPersonvw_PROCESSPRO_SalesPersonCommercientSF7__ / __c1
AccountAccountCommercientSF__Commercient_ArCustomerCode__c2vw_PROCESSPRO_Accountvw_PROCESSPRO_Account'' / ''1
ProcessPro Customer MasterCommercientSF7__ARCUST__cCommercientSF7__ExternalKey__c3vw_PROCESSPRO_Customervw_PROCESSPRO_CustomerCommercientSF7__ / __c1
Customer To Account Reverse LookupAccountCommercientSF__Commercient_ArCustomerCode__c4vw_PROCESSPRO_CustomerToAccountLookupvw_PROCESSPRO_CustomerToAccountLookup'' / ''1
ProcessPro Customer Ship To AddressCommercientSF7__ARCADR__cCommercientSF7__ExternalKey__c5vw_PROCESSPRO_ShipToAddressvw_PROCESSPRO_ShipToAddressCommercientSF7__ / __c1
ProcessPro Sales Order HeaderCommercientSF7__SOMAST__cCommercientSF7__ExternalKey__c6vw_PROCESSPRO_SalesOrderHeadervw_PROCESSPRO_SalesOrderHeaderCommercientSF7__ / __c1
ProcessPro Sales Order DetailCommercientSF7__SOTRAN__cCommercientSF7__ExternalKey__c7vw_PROCESSPRO_SalesOrderDetailvw_PROCESSPRO_SalesOrderDetailCommercientSF7__ / __c1
ProcessPro Invoice HeaderCommercientSF7__ARMAST__cCommercientSF7__ExternalKey__c8vw_PROCESSPRO_InvoiceHeadervw_PROCESSPRO_InvoiceHeaderCommercientSF7__ / __c1
ProcessPro Invoice DetailCommercientSF7__ARTRAN__cCommercientSF7__ExternalKey__c9vw_PROCESSPRO_InvoiceDetailvw_PROCESSPRO_InvoiceDetailCommercientSF7__ / __c1
ProductProduct2CommercientSF__ExternalKey__c10vw_PROCESSPRO_Productvw_PROCESSPRO_Product'' / ''1
LocationCommercientSF7__ICLOCT__cCommercientSF7__ExternalKey__c11vw_PROCESSPRO_Locationvw_PROCESSPRO_LocationCommercientSF7__ / __c1
Item LocationCommercientSF7__ICILOC__cCommercientSF7__ExternalKey__c12vw_PROCESSPRO_ItemLocationvw_PROCESSPRO_ItemLocationCommercientSF7__ / __c1
ProcessPro Purchase Order HeaderCommercientSF7_POMAST__cExternalKey__c13vw_PROCESSPRO_PurchaseOrderHeadervw_PROCESSPRO_PurchaseOrderHeader'' / __c1
ProcessPro Purchase Order DetailCommercientSF7_POTRAN__cExternalKey__c14vw_PROCESSPRO_PurchaseOrderDetailvw_PROCESSPRO_PurchaseOrderDetail'' / __c1

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. Text columns a template does not use are inserted as '' rather than left NULL. Get_SOQL_Query carries a query on GET USER, Account, Product — 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_PROCESSPRO_SalesPersoninsert + updatevw_PROCESSPRO_SalesPerson:SF_ERP_Salesforce_Clone_SOSLSM
vw_PROCESSPRO_Accountinsert + updatevw_PROCESSPRO_Account:vw_PROCESSPRO_User:, vw_PROCESSPRO_SalesPerson:SF_ERP_Salesforce_Clone_ARCUST, SF_ERP_Salesforce_Clone_ARCADR, SF_ERP_Salesforce_Clone_SOSLSM
vw_PROCESSPRO_Customerinsert + updatevw_PROCESSPRO_Customer:vw_PROCESSPRO_SalesPerson:, vw_PROCESSPRO_Account:SF_ERP_Salesforce_Clone_ARCUST, SF_ERP_Salesforce_Clone_SOSLSM
vw_PROCESSPRO_CustomerToAccountLookupinsert + updatevw_PROCESSPRO_CustomerToAccountLookup:vw_PROCESSPRO_Customer:SF_ERP_Salesforce_Clone_ARCUST
vw_PROCESSPRO_ShipToAddressinsert + updatevw_PROCESSPRO_ShipToAddress:vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:SF_ERP_Salesforce_Clone_ARCADR, SF_ERP_Salesforce_Clone_ARCUST
vw_PROCESSPRO_SalesOrderHeaderinsert + updatevw_PROCESSPRO_SalesOrderHeader:vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:SF_ERP_Salesforce_Clone_SOMAST, SF_ERP_Salesforce_Clone_ARCUST, CommercientFlags
vw_PROCESSPRO_SalesOrderDetailinsert + updatevw_PROCESSPRO_SalesOrderDetail:vw_PROCESSPRO_SalesOrderHeader:SF_ERP_Salesforce_Clone_SOTRAN, SF_ERP_Salesforce_Clone_SOMAST
vw_PROCESSPRO_InvoiceHeaderinsert + updatevw_PROCESSPRO_InvoiceHeader:vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:SF_ERP_Salesforce_Clone_ARMAST, SF_ERP_Salesforce_Clone_ARCUST, CommercientFlags
vw_PROCESSPRO_InvoiceDetailinsert + updatevw_PROCESSPRO_InvoiceDetail:vw_PROCESSPRO_InvoiceHeader:SF_ERP_Salesforce_Clone_ARTRAN, SF_ERP_Salesforce_Clone_ARMAST
vw_PROCESSPRO_Productinsert + updatevw_PROCESSPRO_Product:CommercientSF__ExternalKey__cSF_ERP_Salesforce_Clone_ICITEM
vw_PROCESSPRO_Locationinsert + updatevw_PROCESSPRO_Location:SF_ERP_Salesforce_Clone_ICLOCT
vw_PROCESSPRO_ItemLocationinsert + updatevw_PROCESSPRO_ItemLocation:vw_PROCESSPRO_Product:, vw_PROCESSPRO_Location:SF_ERP_Salesforce_Clone_ICILOC, SF_ERP_Salesforce_Clone_ICITEM, from, to, SF_ERP_Salesforce_Clone_ICLOCT
vw_PROCESSPRO_PurchaseOrderHeaderinsert + updatevw_PROCESSPRO_PurchaseOrderHeader:vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:SF_ERP_Salesforce_Clone_POMAST, CommercientFlags, SF_ERP_Salesforce_Clone_ARCUST
vw_PROCESSPRO_PurchaseOrderDetailinsert + updatevw_PROCESSPRO_PurchaseOrderDetail:vw_PROCESSPRO_PurchaseOrderHeader:SF_ERP_Salesforce_Clone_POTRAN, SF_ERP_Salesforce_Clone_POMAST

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

  • 0 — GET USER
  • 1 — ProcessPro Salesperson
  • 2 — Account
  • 3 — ProcessPro Customer Master
  • 4 — Customer To Account Reverse Lookup
  • 5 — ProcessPro Customer Ship To Address
  • 6 — ProcessPro Sales Order Header
  • 7 — ProcessPro Sales Order Detail
  • 8 — ProcessPro Invoice Header
  • 9 — ProcessPro Invoice Detail
  • 10 — Product
  • 11 — Location
  • 12 — Item Location
  • 13 — ProcessPro Purchase Order Header
  • 14 — ProcessPro Purchase Order Detail

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_PROCESSPRO_Account reads vw_PROCESSPRO_User:, vw_PROCESSPRO_SalesPerson:
  • vw_PROCESSPRO_CustomerToAccountLookup reads vw_PROCESSPRO_Customer:
  • vw_PROCESSPRO_Customer reads vw_PROCESSPRO_SalesPerson:, vw_PROCESSPRO_Account:
  • vw_PROCESSPRO_ShipToAddress reads vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:
  • vw_PROCESSPRO_ItemLocation reads vw_PROCESSPRO_Product:, vw_PROCESSPRO_Location:
  • vw_PROCESSPRO_InvoiceHeader reads vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:
  • vw_PROCESSPRO_InvoiceDetail reads vw_PROCESSPRO_InvoiceHeader:
  • vw_PROCESSPRO_PurchaseOrderHeader reads vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:
  • vw_PROCESSPRO_PurchaseOrderDetail reads vw_PROCESSPRO_PurchaseOrderHeader:
  • vw_PROCESSPRO_SalesOrderHeader reads vw_PROCESSPRO_Account:, vw_PROCESSPRO_Customer:
  • vw_PROCESSPRO_SalesOrderDetail reads vw_PROCESSPRO_SalesOrderHeader:

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
ProcessPro SalespersonCommercientSF7__SOSLSM__c33id_colCommercientSF7__ExternalKey__c, salesmnName, salesmnSalesmn, saletypSaletyp, salegrpSalegrp
AccountAccount13id_colCommercientSF__Commercient_ArCustomerCode__c, companyName, phone, phone2Phone, address1, address2BillingStreet, cityBillingCity
ProcessPro Customer MasterCommercientSF7__ARCUST__c97id_colCommercientSF7__ExternalKey__c, companyName, SFDCIDAccount, custnocustno, companycompany
Customer To Account Reverse LookupAccount2id_colCommercientSF__Commercient_ArCustomerCode__c, SFDCIDCommercientSF7__ProcessPro_Customer_Master__c
ProcessPro Customer Ship To AddressCommercientSF7__ARCADR__c49id_colCommercientSF7__ExternalKey__c, companyName, custnoAccount, custnoProcessPro_Customer_Master, custnoCommercientSF7__CustomerNumber__c
ProcessPro Sales Order HeaderCommercientSF7__SOMAST__c82id_colCommercientSF7__ExternalKey__c, sonoName, custnoAccount, custnoProcessPro_Customer_Master, sonosono
ProcessPro Sales Order DetailCommercientSF7__SOTRAN__c97id_colCommercientSF7__ExternalKey__c, sono, tranlinenoName, SFDCIDProcessPro_Sales_Order_Header, sonoCommercientSF7__sono__c, custnoCommercientSF7__custno__c
ProcessPro Invoice HeaderCommercientSF7__ARMAST__c80id_colCommercientSF7__ExternalKey__c, invnoName, id_colAccount, id_colProcessPro_Customer_Master, invnoCommercientSF7__InvoiceNumber__c
ProcessPro Invoice DetailCommercientSF7__ARTRAN__c72id_colCommercientSF7__ExternalKey__c, invno, tranlinenoName, id_colProcessPro_Invoice_Header, invnoCommercientSF7__Invoice_No__c, sonoCommercientSF7__SO_No__c
ProductProduct25id_colCommercientSF__ExternalKey__c, itemName, itemProductCode, itmdescDescription
LocationCommercientSF7__ICLOCT__c10id_colCommercientSF7__ExternalKey__c, loctidName, locdescDescription, addrs1Address1, addrs2Address2
Item LocationCommercientSF7__ICILOC__c100id_colCommercientSF7__ExternalKey__c, item, loctidName, itemCommercientSF7__Product__c, loctidCommercientSF7__ProcessPro_Location__c, loctidCommercientSF7__loctid__c
ProcessPro Purchase Order HeaderCommercientSF7_POMAST__c55id_colExternalKey__c, purnoName, purnoPurchase Order Number, vendnoCustomer and Vendor, companyVendor Company Name
ProcessPro Purchase Order DetailCommercientSF7_POTRAN__c66id_colExternalKey__c, purno, tranlinenoName, SFDCIDlookupto_CommercientSF7_POMAST__c, purnoPurchase Order Number, umeasurUnit of Measure short description

6. Community templates

The catalogue carries 15 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: 15
  • Default operations: insert on 15, update on 15, delete on 15
  • Marked circular-sync: 0
  • Licence groups they span: 10
  • Destination objects: Account, CommercientSF7__ARCADR__c, CommercientSF7__ARCUST__c, CommercientSF7__ARMAST__c, CommercientSF7__ARTRAN__c, CommercientSF7__ICILOC__c, CommercientSF7__ICLOCT__c, CommercientSF7__SOMAST__c, CommercientSF7__SOSLSM__c, CommercientSF7__SOTRAN__c, CommercientSF7_POMAST__c, CommercientSF7_POTRAN__c, Product2 and a custom object
  • Object display names: Account, Customer To Account Reverse Lookup, ProcessPro Customer Master, ProcessPro Customer Ship To Address, ProcessPro Invoice Detail, ProcessPro Invoice Header, ProcessPro Item Location, ProcessPro Item Lot, ProcessPro Location, ProcessPro Purchase Order Detail, ProcessPro Purchase Order Header, ProcessPro Sales Order Detail and 3 more
  • Template groups: Account, Product, Invoice, Purchase Order, Salesorder, Customer Multi Ship Addresses

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_PROCESSPRO_Location
  • vw_PROCESSPRO_User
  • vw_PROCESSPRO_Account
  • vw_PROCESSPRO_CustomerToAccountLookup
  • vw_PROCESSPRO_Customer
  • vw_PROCESSPRO_ShipToAddress
  • vw_PROCESSPRO_ItemLocation
  • vw_PROCESSPRO_InvoiceHeader
  • vw_PROCESSPRO_InvoiceDetail
  • vw_PROCESSPRO_Product
  • vw_PROCESSPRO_PurchaseOrderHeader
  • vw_PROCESSPRO_PurchaseOrderDetail
  • vw_PROCESSPRO_SalesOrderHeader
  • vw_PROCESSPRO_SalesOrderDetail
  • vw_PROCESSPRO_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 Process PRO → 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.