Source ERP · 3 of 19

CRMPro → Dynamics CRM — Epicor 10: what the shipped templates set up

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

CRMPro → Dynamics CRM — Epicor 10: 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-dynamicscrm is the destination skill this page is a child of, and the authority for the Dynamics CRM 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-dynamicscrm/erps/epicor-10.md, and that skill’s ERP table is what points at it. The catalogue spells this destination DynamicCRM, so that is the value to pass as a tool argument — dlake admin crmpro_templates --crmName DynamicCRM — but the product is Dynamics CRM, which is what this page calls it. What follows is only what the shipped Epicor 10 → Dynamics CRM 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
salesorderThe templates push salesorder to Dynamics CRM.salesorderSF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed, ctepricelist
salesorderdetailThe templates push salesorderdetail to Dynamics CRM.salesorderdetailSF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer
invoiceThe templates push invoice to Dynamics CRM.invoiceSF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead, ctepricelist
invoicedetailThe templates push invoicedetail to Dynamics CRM.invoicedetailSF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer
quotedetailThe templates push quotedetail to Dynamics CRM.quotedetailSF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_Customer
EPICOR10 SalesOrderThe templates push comrcint_epicor10_salesorder to Dynamics CRM.comrcint_epicor10_salesorderSF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed, ctepricelist
EPICOR10 SalesOrder DetailThe templates push comrcint_epicor10_salesorderdetail to Dynamics CRM.comrcint_epicor10_salesorderdetailSF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer
EPICOR10 InvoiceThe templates push comrcint_epicor10_invoice to Dynamics CRM.comrcint_epicor10_invoiceSF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead, ctepricelist
EPICOR10 Invoice DetailThe templates push comrcint_epicor10_invoicedetail to Dynamics CRM.comrcint_epicor10_invoicedetailSF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer
CRM Quote and LineThe templates push quote to Dynamics CRM.quoteSF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_QuoteHed, ctepricelist

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
salesordersalesordercomrcint_externalkey20vw_EPICOR10_STD_SalesOrder:vw_EPICOR10_STD_SalesOrder'' / ''1
salesorderdetailsalesorderdetailcomrcint_externalkey21vw_EPICOR10_STD_SalesDetail:vw_EPICOR10_STD_SalesDetail'' / ''1
invoiceinvoicecomrcint_externalkey22vw_EPICOR10_STD_InvoiceHeader:vw_EPICOR10_STD_InvoiceHeader'' / ''1
invoicedetailinvoicedetailcomrcint_externalkey23vw_EPICOR10_STD_InvoiceDetail:vw_EPICOR10_STD_InvoiceDetail'' / ''1
quotequotecomrcint_externalkey24vw_EPICOR10_STD_Quote:vw_EPICOR10_STD_Quote'' / ''1
quotedetailquotedetailcomrcint_externalkey25vw_EPICOR10_STD_QuoteDetail:vw_EPICOR10_STD_QuoteDetail'' / ''1
EPICOR10 SalesOrdercomrcint_epicor10_salesordercomrcint_externalkey26vw_EPICOR10_SalesOrder:vw_EPICOR10_SalesOrdercomrcint_ / ''1
EPICOR10 SalesOrder Detailcomrcint_epicor10_salesorderdetailcomrcint_externalkey27vw_EPICOR10_SalesDetail:vw_EPICOR10_SalesDetailcomrcint_ / ''1
EPICOR10 Invoicecomrcint_epicor10_invoicecomrcint_externalkey28vw_EPICOR10_InvoiceHeader:vw_EPICOR10_InvoiceHeadercomrcint_ / ''1
EPICOR10 Invoice Detailcomrcint_epicor10_invoicedetailcomrcint_externalkey29vw_EPICOR10_InvoiceDetail:vw_EPICOR10_InvoiceDetailcomrcint_ / ''1

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 '', Sync_Batch_Size 200. Text columns a template does not use are inserted as '' rather than left NULL.

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_EPICOR10_STD_SalesOrderinsert + updateCRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_SalesOrder:comrcint_externalkeySF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed
vw_EPICOR10_STD_SalesDetailinsert + updatevw_EPICOR10_STD_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_STD_SalesDetail:comrcint_externalkeySF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer
vw_EPICOR10_STD_InvoiceHeaderinsert + updateCRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_InvoiceHeader:comrcint_externalkeySF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead
vw_EPICOR10_STD_InvoiceDetailinsert + updatevw_EPICOR10_STD_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_STD_InvoiceDetail:comrcint_externalkeySF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer
vw_EPICOR10_STD_Quoteinsert-onlyCRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_Quote:comrcint_externalkeySF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_QuoteHed
vw_EPICOR10_STD_QuoteDetailinsert-onlyvw_EPICOR10_STD_Quote:, vw_CRM_Product:, vw_EPICOR10_STD_QuoteDetail:comrcint_externalkeySF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_Customer
vw_EPICOR10_SalesOrderinsert + updateCRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_SalesOrder:externalkeySF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed
vw_EPICOR10_SalesDetailinsert + updatevw_EPICOR10_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_SalesDetail:externalkeySF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer
vw_EPICOR10_InvoiceHeaderinsert + updateCRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_InvoiceHeader:comrcint_externalkeySF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead
vw_EPICOR10_InvoiceDetailinsert + updatevw_EPICOR10_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_InvoiceDetail:externalkeySF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer

4. Order of work

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

  • 20 — salesorder
  • 21 — salesorderdetail
  • 22 — invoice
  • 23 — invoicedetail
  • 24 — quote
  • 25 — quotedetail
  • 26 — EPICOR10 SalesOrder
  • 27 — EPICOR10 SalesOrder Detail
  • 28 — EPICOR10 Invoice
  • 29 — EPICOR10 Invoice 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_EPICOR10_STD_SalesOrder reads CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_SalesOrder:; no template in this set writes CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_SalesOrder:
  • vw_EPICOR10_STD_SalesDetail reads vw_EPICOR10_STD_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_STD_SalesDetail:; no template in this set writes vw_EPICOR10_STD_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_STD_SalesDetail:
  • vw_EPICOR10_STD_InvoiceHeader reads CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_InvoiceHeader:; no template in this set writes CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_InvoiceHeader:
  • vw_EPICOR10_STD_InvoiceDetail reads vw_EPICOR10_STD_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_STD_InvoiceDetail:; no template in this set writes vw_EPICOR10_STD_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_STD_InvoiceDetail:
  • vw_EPICOR10_STD_QuoteDetail reads vw_EPICOR10_STD_Quote:, vw_CRM_Product:, vw_EPICOR10_STD_QuoteDetail:; no template in this set writes vw_EPICOR10_STD_Quote:, vw_CRM_Product:, vw_EPICOR10_STD_QuoteDetail:
  • vw_EPICOR10_SalesOrder reads CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_SalesOrder:; no template in this set writes CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_SalesOrder:
  • vw_EPICOR10_SalesDetail reads vw_EPICOR10_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_SalesDetail:; no template in this set writes vw_EPICOR10_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_SalesDetail:
  • vw_EPICOR10_InvoiceHeader reads CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_InvoiceHeader:; no template in this set writes CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_InvoiceHeader:
  • vw_EPICOR10_InvoiceDetail reads vw_EPICOR10_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_InvoiceDetail:; no template in this set writes vw_EPICOR10_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_InvoiceDetail:
  • vw_EPICOR10_STD_Quote reads CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_Quote:; no template in this set writes CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_Quote:

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 → Dynamics CRM pairs
salesordersalesorder22Company, OrderNumcomrcint_externalkey, Company, OrderNumName, BTAddress1billto_line1, BTAddress2billto_line2, BTAddress3billto_line3
salesorderdetailsalesorderdetail14Company, OrderLine, OrderNumcomrcint_externalkey, Address1shipto_line1, Address2shipto_line2, Address3shipto_line3, Cityshipto_city
invoiceinvoice22BTAddress1billto_line1, BTAddress2billto_line2, BTAddress3billto_line3, BTCitybillto_city, BTStatebillto_stateorprovince
invoicedetailinvoicedetail14Company,InvoiceLine,InvoiceNumcomrcint_externalkey, Address1shipto_line1, Address2shipto_line2, Address3shipto_line3, Cityshipto_city
quotequote22Company, QuoteNumcomrcint_externalkey, Company, QuoteNumName, BTAddress1billto_line1, BTAddress2billto_line2, BTAddress3billto_line3
quotedetailquotedetail14Company, QuoteNum, QuoteLinecomrcint_externalkey, Address1shipto_line1, Address2shipto_line2, Address3shipto_line3, Cityshipto_city
EPICOR10 SalesOrdercomrcint_epicor10_salesorder3Company, OrderNumexternalkey, Company, OrderNumName, SFDCIDpricelevel__pricelevelid__lookup
EPICOR10 SalesOrder Detailcomrcint_epicor10_salesorderdetail5Company, OrderLine, OrderNumcomrcint_externalkey, Company, OrderLine, OrderNumname, SFDCIDcomrcint_epicor10_salesorder__epicor10_salesorder_r__lookup, SFDCIDproduct__productid__lookup, SFDCIDuom__uomid__lookup
EPICOR10 Invoicecomrcint_epicor10_invoice3Company,InvoiceNumcomrcint_externalkey, Company,InvoiceNumName, SFDCIDpricelevel__pricelevelid__lookup
EPICOR10 Invoice Detailcomrcint_epicor10_invoicedetail3Company,InvoiceLine,InvoiceNumcomrcint_externalkey, Company,InvoiceLine,InvoiceNumname, SFDCIDcomrcint_epicor10_invoice__epicor10_invoice_r__lookup

6. Community templates

The catalogue carries 23 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: 23
  • Default operations: insert on 23, update on 23, delete on 23
  • Marked circular-sync: 0
  • Licence groups they span: 5
  • Destination objects: account, contact, epicor10_customer, epicor10_invoicedetail, epicor10_invoiceheader, epicor10_itemmaster, epicor10_itemwarehouse, epicor10_quotedetail, epicor10_quoteheader, epicor10_salesorderdetail, epicor10_salesorderheader, epicor10_salesperson, epicor10_shiptoaddress, invoice, invoicedetail, product, quote, quotedetail, salesorder, salesorderdetail and 2 more
  • Object display names: CRM Account, CRM Contact, CRM Product, CRM UOM, EPICOR10 Customer, EPICOR10 InvoiceDetail, EPICOR10 InvoiceHeader, EPICOR10 ItemMaster, EPICOR10 ItemWarehouse, EPICOR10 QuoteDetail, EPICOR10 QuoteHeader, EPICOR10 SalesOrderDetail, 9 more and a further template
  • Template groups: CRM Order and Line, CRM Quote and Line, Account

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_EPICOR10_STD_SalesOrder:
  • vw_EPICOR10_STD_SalesDetail:
  • vw_EPICOR10_STD_InvoiceHeader:
  • vw_EPICOR10_STD_InvoiceDetail:
  • vw_EPICOR10_STD_QuoteDetail:
  • vw_EPICOR10_SalesOrder:
  • vw_EPICOR10_SalesDetail:
  • vw_EPICOR10_InvoiceHeader:
  • vw_EPICOR10_InvoiceDetail:
  • vw_EPICOR10_STD_Quote:

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 Epicor 10 → Dynamics CRM templates set up. dlake-crmpro-dynamicscrm is the destination skill this page sits under: its own text is the authority for the Dynamics CRM 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.