Source ERP · 24 of 105

CRMPro → Salesforce — Exact Globe Next: what the shipped templates set up

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

CRMPro → Salesforce — Exact Globe Next: 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/exact-globe-next.md, and that skill’s ERP table is what points at it. What follows is only what the shipped Exact Globe Next → 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 User to Salesforce. New records are created, existing ones updated, and records removed in the ERP are deleted.User
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, existing ones updated, and records removed in the ERP are deleted.Account, Contact, CommercientSF19__MACOLAGLOBE_Customer__c, CommercientSF19__MACOLAGLOBE_SalesRep__cCommercientFlags, SF_ERP_Salesforce_Clone_cicmpy, CompanyP, SF_ERP_Salesforce_Clone_land, SF_ERP_Salesforce_Clone_AddressStates, SF_ERP_Salesforce_Clone_cicntp
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, existing ones updated, and records removed in the ERP are deleted.CommercientSF19__MACOLAGLOBE_Addresses__cCommercientFlags, SF_ERP_Salesforce_Clone_Addresses, CompanyP
Invoice History HeadersThe Invoices from the ERP invoice module are synchronized to the Commercient Invoice Header (MCO) object in CRM. Customer service and sales people can visualize the status of the Invoice such as open, closed, as well as the balance remaining and the due date. New records are created, existing ones updated, and records removed in the ERP are deleted.CommercientSF19__MACOLAGLOBE_InvoiceHeader__c, CommercientSF19__MACOLAGLOBE_InvoiceLines__cCommercientFlags, SF_ERP_Salesforce_Clone_frhkrg, CompanyP, SF_ERP_Salesforce_Clone_cicmpy, SF_ERP_Salesforce_Clone_frhsrg
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, existing ones updated, and records removed in the ERP are deleted.CommercientSF19__MACOLAGLOBE_SalesOrderHeader__c, CommercientSF19__MACOLAGLOBE_SalesOrderLines__cCommercientFlags, SF_ERP_Salesforce_Clone_orkrg, CompanyP, SF_ERP_Salesforce_Clone_cicmpy, SF_ERP_Salesforce_Clone_orsrg

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 USERSUser0vw_EXACTGLOBENEXT_User1=0'' / ''1
SYNC ACCOUNTAccountCommercientSF__Commercient_ArCustomerCode__c1vw_EXACTGLOBENEXT_Accountvw_EXACTGLOBENEXT_Account'' / ''1
SYNC SALESPERSONCommercientSF19__MACOLAGLOBE_SalesRep__cCommercientSF19__ExternalKey__c1vw_EXACTGLOBENEXT_Salespersonvw_EXACTGLOBENEXT_SalespersonCommercientSF19__ / __c1
SYNC SHIPTOACCOUNTAccountCommercientSF__Commercient_ArCustomerCode__c2vw_EXACTGLOBENEXT_ShipToAccountvw_EXACTGLOBENEXT_ShipToAccount'' / ''1
SYNC CUSTOMERCommercientSF19__MACOLAGLOBE_Customer__cCommercientSF19__ExternalKey__c3vw_EXACTGLOBENEXT_Customervw_EXACTGLOBENEXT_CustomerCommercientSF19__ / __c1
SYNC CUSTOMER TO ACCOUNT LOOKUPAccountCommercientSF__Commercient_ArCustomerCode__c4vw_EXACTGLOBENEXT_CustomerToAccountLookupvw_EXACTGLOBENEXT_CustomerToAccountLookup'' / ''1
SYNC ADDRESSCommercientSF19__MACOLAGLOBE_Addresses__cCommercientSF19__ExternalKey__c5vw_EXACTGLOBENEXT_Addressvw_EXACTGLOBENEXT_AddressCommercientSF19__ / __c1
SYNC CONTACTContactExternalKey__c6vw_EXACTGLOBENEXT_Contactvw_EXACTGLOBENEXT_Contact'' / ''1
SYNC SALES ORDER HEADERCommercientSF19__MACOLAGLOBE_SalesOrderHeader__cCommercientSF19__ExternalKey__c16vw_EXACTGLOBENEXT_SalesOrderHeadervw_EXACTGLOBENEXT_SalesOrderHeaderCommercientSF19__ / __c1
SYNC SALES ORDER DETAILCommercientSF19__MACOLAGLOBE_SalesOrderLines__cCommercientSF19__ExternalKey__c17vw_EXACTGLOBENEXT_SalesOrderDetailvw_EXACTGLOBENEXT_SalesOrderDetailCommercientSF19__ / __c1
SYNC INVOICE HISTORY HEADERCommercientSF19__MACOLAGLOBE_InvoiceHeader__cCommercientSF19__ExternalKey__c18vw_EXACTGLOBENEXT_InvoiceHistoryHeadervw_EXACTGLOBENEXT_InvoiceHistoryHeaderCommercientSF19__ / __c1
SYNC INVOICEHISTORYDETAILCommercientSF19__MACOLAGLOBE_InvoiceLines__cCommercientSF19__ExternalKey__c19vw_EXACTGLOBENEXT_InvoiceHistoryDetailvw_EXACTGLOBENEXT_InvoiceHistoryDetailCommercientSF19__ / __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, IsAccountMatching False, 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 USERS, SYNC ACCOUNT, SYNC SHIPTOACCOUNT — 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_EXACTGLOBENEXT_Accountinsert + updatevw_EXACTGLOBENEXT_Account:vw_EXACTGLOBENEXT_User:CommercientSF__Commercient_ArCustomerCode__cCommercientFlags, SF_ERP_Salesforce_Clone_cicmpy, CompanyP, SF_ERP_Salesforce_Clone_land, SF_ERP_Salesforce_Clone_AddressStates
vw_EXACTGLOBENEXT_Salespersoninsert + updatevw_EXACTGLOBENEXT_Salesperson:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_humres, CompanyP
vw_EXACTGLOBENEXT_ShipToAccountinsert + updatevw_EXACTGLOBENEXT_ShipToAccount:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_User:CommercientSF__Commercient_ArCustomerCode__cCommercientFlags, SF_ERP_Salesforce_Clone_cicmpy, CompanyP, SF_ERP_Salesforce_Clone_land, SF_ERP_Salesforce_Clone_AddressStates
vw_EXACTGLOBENEXT_Customerinsert + updatevw_EXACTGLOBENEXT_Customer:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_ShipToAccount:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_cicmpy, CompanyP
vw_EXACTGLOBENEXT_CustomerToAccountLookupinsert + updatevw_EXACTGLOBENEXT_CustomerToAccountLookup:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_ShipToAccount:CommercientFlags, SF_ERP_Salesforce_Clone_cicmpy, CompanyP
vw_EXACTGLOBENEXT_Addressinsert + updatevw_EXACTGLOBENEXT_Address:vw_EXACTGLOBENEXT_Customer:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_Addresses, CompanyP
vw_EXACTGLOBENEXT_Contactinsert + updatevw_EXACTGLOBENEXT_Contact:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_ShipToAccount:ExternalKey__cCommercientFlags, SF_ERP_Salesforce_Clone_cicntp, CompanyP, SF_ERP_Salesforce_Clone_cicmpy
vw_EXACTGLOBENEXT_SalesOrderHeaderinsert + updatevw_EXACTGLOBENEXT_SalesOrderHeader:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_ShipToAccount:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_orkrg, CompanyP, SF_ERP_Salesforce_Clone_cicmpy
vw_EXACTGLOBENEXT_SalesOrderDetailinsert + updatevw_EXACTGLOBENEXT_SalesOrderDetail:vw_EXACTGLOBENEXT_SalesOrderHeader:, vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_Product:, vw_EXACTGLOBENEXT_Item:, vw_EXACTGLOBENEXT_ShipToAccount:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_orsrg, CompanyP, SF_ERP_Salesforce_Clone_orkrg, SF_ERP_Salesforce_Clone_cicmpy
vw_EXACTGLOBENEXT_InvoiceHistoryHeaderinsert + updatevw_EXACTGLOBENEXT_InvoiceHistoryHeader:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_ShipToAccount:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_frhkrg, CompanyP, SF_ERP_Salesforce_Clone_cicmpy
vw_EXACTGLOBENEXT_InvoiceHistoryDetailinsert + updatevw_EXACTGLOBENEXT_InvoiceHistoryDetail:vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_InvoiceHistoryHeader:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_Product:, vw_EXACTGLOBENEXT_Item:, vw_EXACTGLOBENEXT_ShipToAccount:ExternalKeyCommercientFlags, SF_ERP_Salesforce_Clone_frhsrg, CompanyP, SF_ERP_Salesforce_Clone_frhkrg, SF_ERP_Salesforce_Clone_cicmpy

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

  • 0 — GET USERS
  • 1 — SYNC ACCOUNT, SYNC SALESPERSON
  • 2 — SYNC SHIPTOACCOUNT
  • 3 — SYNC CUSTOMER
  • 4 — SYNC CUSTOMER TO ACCOUNT LOOKUP
  • 5 — SYNC ADDRESS
  • 6 — SYNC CONTACT
  • 16 — SYNC SALES ORDER HEADER
  • 17 — SYNC SALES ORDER DETAIL
  • 18 — SYNC INVOICE HISTORY HEADER
  • 19 — SYNC INVOICEHISTORYDETAIL

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_EXACTGLOBENEXT_Account reads vw_EXACTGLOBENEXT_User:
  • vw_EXACTGLOBENEXT_ShipToAccount reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_User:
  • vw_EXACTGLOBENEXT_CustomerToAccountLookup reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_ShipToAccount:
  • vw_EXACTGLOBENEXT_Contact reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_ShipToAccount:
  • vw_EXACTGLOBENEXT_Customer reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_ShipToAccount:
  • vw_EXACTGLOBENEXT_Address reads vw_EXACTGLOBENEXT_Customer:
  • vw_EXACTGLOBENEXT_InvoiceHistoryHeader reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_ShipToAccount:
  • vw_EXACTGLOBENEXT_InvoiceHistoryDetail reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_InvoiceHistoryHeader:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_Product:, vw_EXACTGLOBENEXT_Item:, vw_EXACTGLOBENEXT_ShipToAccount:; no template in this set writes vw_EXACTGLOBENEXT_Product:, vw_EXACTGLOBENEXT_Item:
  • vw_EXACTGLOBENEXT_SalesOrderHeader reads vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_Customer:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_ShipToAccount:
  • vw_EXACTGLOBENEXT_SalesOrderDetail reads vw_EXACTGLOBENEXT_SalesOrderHeader:, vw_EXACTGLOBENEXT_Account:, vw_EXACTGLOBENEXT_User:, vw_EXACTGLOBENEXT_Product:, vw_EXACTGLOBENEXT_Item:, vw_EXACTGLOBENEXT_ShipToAccount:; no template in this set writes vw_EXACTGLOBENEXT_Product:, vw_EXACTGLOBENEXT_Item:

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
SYNC ACCOUNTAccount14CommercientSFommercient_ArCustomerCodeCommercientSF__Commercient_ArCustomerCode__c, BillingStreetBillingStreet, BillingPostalCodeBillingPostalCode, BillingCityBillingCity, BillingStateBillingState
SYNC SALESPERSONCommercientSF19__MACOLAGLOBE_SalesRep__c160res_idCommercientSF19__res_id__c, fullnameCommercientSF19__fullname__c, sur_nameCommercientSF19__sur_name__c, first_nameCommercientSF19__first_name__c, middle_nameCommercientSF19__middle_name__c
SYNC SHIPTOACCOUNTAccount14CommercientSFommercient_ArCustomerCodeCommercientSF__Commercient_ArCustomerCode__c, BillingStreetBillingStreet, BillingPostalCodeBillingPostalCode, BillingCityBillingCity, BillingStateBillingState
SYNC CUSTOMERCommercientSF19__MACOLAGLOBE_Customer__c342cmp_wwnCommercientSF19__cmp_wwn__c, cmp_codecmp_code, cnt_idCommercientSF19__cnt_id__c, cmp_parentCommercientSF19__cmp_parent__c, cmp_nameCommercientSF19__cmp_name__c
SYNC CUSTOMER TO ACCOUNT LOOKUPAccount2CommercientSFommercient_ArCustomerCodeCommercientSF__Commercient_ArCustomerCode__c, CommercientSF19__MACOLAGLOBE_CustomerCommercientSF19__MACOLAGLOBE_Customer__c
SYNC ADDRESSCommercientSF19__MACOLAGLOBE_Addresses__c66IDColIDCol, TypeCommercientSF19__Type__c, ContactPersonContactPerson, AddressLine1CommercientSF19__AddressLine1__c, AddressLine2CommercientSF19__AddressLine2__c
SYNC CONTACTContact12SalutationSalutation, FirstNameFirstName, LastNameLastName, FaxFax, PhonePhone
SYNC SALES ORDER HEADERCommercientSF19__MACOLAGLOBE_SalesOrderHeader__c168ordernrCommercientSF19__ordernr__c, fakdebnrCommercientSF19__fakdebnr__c, verzdebnrCommercientSF19__verzdebnr__c, naldebnrCommercientSF19__naldebnr__c, einddebnreinddebnr__c
SYNC SALES ORDER DETAILCommercientSF19__MACOLAGLOBE_SalesOrderLines__c130ordernrCommercientSF19__ordernr__c, regelregel__c, afldatafldat__c, artcodeartcode, ar_soortCommercientSF19__ar_soort__c
SYNC INVOICE HISTORY HEADERCommercientSF19__MACOLAGLOBE_InvoiceHeader__c143faknrfaknr__c, fakdatfakdat__c, dagbknrdagbknr__c, debnrdebnr__c, fakdebnrfakdebnr__c
SYNC INVOICEHISTORYDETAILCommercientSF19__MACOLAGLOBE_InvoiceLines__c80fakdatfakdat__c, dagbknrdagbknr__c, regelregel__c, artcodeartcode, ar_soortCommercientSF19__ar_soort__c

6. Community templates

The catalogue carries 138 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: 138
  • Default operations: insert on 138, update on 138, delete on 138
  • Marked circular-sync: 18
  • Licence groups they span: 11
  • Destination objects: Account, Product2, CommercientSF19__MACOLAGLOBE_Customer__c, PriceBookEntry, CommercientSF19__MACOLAGLOBE_InvoiceHeader__c, CommercientSF19__MACOLAGLOBE_Addresses__c, CommercientSF19__MACOLAGLOBE_InvoiceLines__c, CommercientSF19__MACOLAGLOBE_SalesOrderHeader__c, CommercientSF19__MACOLAGLOBE_SalesOrderLines__c, Contact, CommercientSF19__MACOLAGLOBE_Items__c, CommercientSF19__MACOLAGLOBE_SalesRep__c, User, CommercientSF19__ACCOUNTMATCHING__c, CommercientSF19__ADDRESS__c, CommercientSF19__CONTACT__c, CommercientSF19__INVOICEDETAIL__c, CommercientSF19__ITEM__c, CommercientSF19__ITEMTOPRODUCTLOOKUP__c, CommercientSF19__PRODUCT__c, 2 more and 5 custom objects
  • Object display names: SYNC ACCOUNT, SYNC CUSTOMER, SYNC CUSTOMER TO ACCOUNT LOOKUP, SYNC ADDRESS, SYNC CONTACT, SYNC SHIPTOACCOUNT, SYNC INVOICE HISTORY HEADER, SYNC INVOICEHISTORYDETAIL, SYNC ITEM, SYNC ITEM TO PRODUCT LOOKUP, SYNC PRODUCT, SYNC SALES ORDER DETAIL, 14 more and 6 further templates
  • Template groups: Account, Product, Invoice History Headers, Salesorder, Customer Multi Ship Addresses, Invoice

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_EXACTGLOBENEXT_User
  • vw_EXACTGLOBENEXT_Account
  • vw_EXACTGLOBENEXT_ShipToAccount
  • vw_EXACTGLOBENEXT_CustomerToAccountLookup
  • vw_EXACTGLOBENEXT_Contact
  • vw_EXACTGLOBENEXT_Customer
  • vw_EXACTGLOBENEXT_Address
  • vw_EXACTGLOBENEXT_InvoiceHistoryHeader
  • vw_EXACTGLOBENEXT_InvoiceHistoryDetail
  • vw_EXACTGLOBENEXT_SalesOrderHeader
  • vw_EXACTGLOBENEXT_SalesOrderDetail
  • vw_EXACTGLOBENEXT_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 Exact Globe Next → 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.