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.
dlakeships updates often and this text is embedded in the CLI you have installed. Before relying on it, comparedlake --versionwithnpm view @commercient/dlake version; if they differ, runnpm install -g @commercient/dlake@latestand thendlake 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
| Group | Business outcome | Objects | Source tables and views |
|---|---|---|---|
| salesorder | The templates push salesorder to Dynamics CRM. | salesorder | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed, ctepricelist |
| salesorderdetail | The templates push salesorderdetail to Dynamics CRM. | salesorderdetail | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer |
| invoice | The templates push invoice to Dynamics CRM. | invoice | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead, ctepricelist |
| invoicedetail | The templates push invoicedetail to Dynamics CRM. | invoicedetail | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer |
| quotedetail | The templates push quotedetail to Dynamics CRM. | quotedetail | SF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_Customer |
| EPICOR10 SalesOrder | The templates push comrcint_epicor10_salesorder to Dynamics CRM. | comrcint_epicor10_salesorder | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed, ctepricelist |
| EPICOR10 SalesOrder Detail | The templates push comrcint_epicor10_salesorderdetail to Dynamics CRM. | comrcint_epicor10_salesorderdetail | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer |
| EPICOR10 Invoice | The templates push comrcint_epicor10_invoice to Dynamics CRM. | comrcint_epicor10_invoice | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead, ctepricelist |
| EPICOR10 Invoice Detail | The templates push comrcint_epicor10_invoicedetail to Dynamics CRM. | comrcint_epicor10_invoicedetail | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer |
| CRM Quote and Line | The templates push quote to Dynamics CRM. | quote | SF_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 name | CRM_Object_API_Name | CRM_PK_API_Name | Sync_Order | TimeStamp_Prefix | SQL_Query target | field prefix / postfix | Sync_Operation_Type |
|---|---|---|---|---|---|---|---|
| salesorder | salesorder | comrcint_externalkey | 20 | vw_EPICOR10_STD_SalesOrder: | vw_EPICOR10_STD_SalesOrder | '' / '' | 1 |
| salesorderdetail | salesorderdetail | comrcint_externalkey | 21 | vw_EPICOR10_STD_SalesDetail: | vw_EPICOR10_STD_SalesDetail | '' / '' | 1 |
| invoice | invoice | comrcint_externalkey | 22 | vw_EPICOR10_STD_InvoiceHeader: | vw_EPICOR10_STD_InvoiceHeader | '' / '' | 1 |
| invoicedetail | invoicedetail | comrcint_externalkey | 23 | vw_EPICOR10_STD_InvoiceDetail: | vw_EPICOR10_STD_InvoiceDetail | '' / '' | 1 |
| quote | quote | comrcint_externalkey | 24 | vw_EPICOR10_STD_Quote: | vw_EPICOR10_STD_Quote | '' / '' | 1 |
| quotedetail | quotedetail | comrcint_externalkey | 25 | vw_EPICOR10_STD_QuoteDetail: | vw_EPICOR10_STD_QuoteDetail | '' / '' | 1 |
| EPICOR10 SalesOrder | comrcint_epicor10_salesorder | comrcint_externalkey | 26 | vw_EPICOR10_SalesOrder: | vw_EPICOR10_SalesOrder | comrcint_ / '' | 1 |
| EPICOR10 SalesOrder Detail | comrcint_epicor10_salesorderdetail | comrcint_externalkey | 27 | vw_EPICOR10_SalesDetail: | vw_EPICOR10_SalesDetail | comrcint_ / '' | 1 |
| EPICOR10 Invoice | comrcint_epicor10_invoice | comrcint_externalkey | 28 | vw_EPICOR10_InvoiceHeader: | vw_EPICOR10_InvoiceHeader | comrcint_ / '' | 1 |
| EPICOR10 Invoice Detail | comrcint_epicor10_invoicedetail | comrcint_externalkey | 29 | vw_EPICOR10_InvoiceDetail: | vw_EPICOR10_InvoiceDetail | comrcint_ / '' | 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.
| View | Change detection | Repository key | Reads other prefixes | Identity column | Source tables |
|---|---|---|---|---|---|
vw_EPICOR10_STD_SalesOrder | insert + update | — | CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_SalesOrder: | comrcint_externalkey | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed |
vw_EPICOR10_STD_SalesDetail | insert + update | — | vw_EPICOR10_STD_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_STD_SalesDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer |
vw_EPICOR10_STD_InvoiceHeader | insert + update | — | CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_InvoiceHeader: | comrcint_externalkey | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead |
vw_EPICOR10_STD_InvoiceDetail | insert + update | — | vw_EPICOR10_STD_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_STD_InvoiceDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_Customer |
vw_EPICOR10_STD_Quote | insert-only | — | CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_STD_Quote: | comrcint_externalkey | SF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_QuoteHed |
vw_EPICOR10_STD_QuoteDetail | insert-only | — | vw_EPICOR10_STD_Quote:, vw_CRM_Product:, vw_EPICOR10_STD_QuoteDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_QuoteDtl, SF_ERP_Salesforce_Clone_Customer |
vw_EPICOR10_SalesOrder | insert + update | — | CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_SalesOrder: | externalkey | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_OrderHed |
vw_EPICOR10_SalesDetail | insert + update | — | vw_EPICOR10_SalesOrder:, vw_CRM_Product:, vw_EPICOR10_SalesDetail: | externalkey | SF_ERP_Salesforce_Clone_OrderDtl, SF_ERP_Salesforce_Clone_Customer |
vw_EPICOR10_InvoiceHeader | insert + update | — | CRM_PriceBook:, vw_CRM_Account:, vw_EPICOR10_Customer:, vw_EPICOR10_InvoiceHeader: | comrcint_externalkey | SF_ERP_Salesforce_Clone_InvcDtl, SF_ERP_Salesforce_Clone_PriceLstParts, e, cteprice, SF_ERP_Salesforce_Clone_InvcHead |
vw_EPICOR10_InvoiceDetail | insert + update | — | vw_EPICOR10_InvoiceHeader:, vw_CRM_Product:, vw_EPICOR10_InvoiceDetail: | externalkey | SF_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— salesorder21— salesorderdetail22— invoice23— invoicedetail24— quote25— quotedetail26— EPICOR10 SalesOrder27— EPICOR10 SalesOrder Detail28— EPICOR10 Invoice29— 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_SalesOrderreadsCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_STD_SalesOrder:; no template in this set writesCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_STD_SalesOrder:vw_EPICOR10_STD_SalesDetailreadsvw_EPICOR10_STD_SalesOrder:,vw_CRM_Product:,vw_EPICOR10_STD_SalesDetail:; no template in this set writesvw_EPICOR10_STD_SalesOrder:,vw_CRM_Product:,vw_EPICOR10_STD_SalesDetail:vw_EPICOR10_STD_InvoiceHeaderreadsCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_STD_InvoiceHeader:; no template in this set writesCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_STD_InvoiceHeader:vw_EPICOR10_STD_InvoiceDetailreadsvw_EPICOR10_STD_InvoiceHeader:,vw_CRM_Product:,vw_EPICOR10_STD_InvoiceDetail:; no template in this set writesvw_EPICOR10_STD_InvoiceHeader:,vw_CRM_Product:,vw_EPICOR10_STD_InvoiceDetail:vw_EPICOR10_STD_QuoteDetailreadsvw_EPICOR10_STD_Quote:,vw_CRM_Product:,vw_EPICOR10_STD_QuoteDetail:; no template in this set writesvw_EPICOR10_STD_Quote:,vw_CRM_Product:,vw_EPICOR10_STD_QuoteDetail:vw_EPICOR10_SalesOrderreadsCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_SalesOrder:; no template in this set writesCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_SalesOrder:vw_EPICOR10_SalesDetailreadsvw_EPICOR10_SalesOrder:,vw_CRM_Product:,vw_EPICOR10_SalesDetail:; no template in this set writesvw_EPICOR10_SalesOrder:,vw_CRM_Product:,vw_EPICOR10_SalesDetail:vw_EPICOR10_InvoiceHeaderreadsCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_InvoiceHeader:; no template in this set writesCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_InvoiceHeader:vw_EPICOR10_InvoiceDetailreadsvw_EPICOR10_InvoiceHeader:,vw_CRM_Product:,vw_EPICOR10_InvoiceDetail:; no template in this set writesvw_EPICOR10_InvoiceHeader:,vw_CRM_Product:,vw_EPICOR10_InvoiceDetail:vw_EPICOR10_STD_QuotereadsCRM_PriceBook:,vw_CRM_Account:,vw_EPICOR10_Customer:,vw_EPICOR10_STD_Quote:; no template in this set writesCRM_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.
| Template | Object | Mapped fields | First ERP → Dynamics CRM pairs |
|---|---|---|---|
| salesorder | salesorder | 22 | Company, OrderNum → comrcint_externalkey, Company, OrderNum → Name, BTAddress1 → billto_line1, BTAddress2 → billto_line2, BTAddress3 → billto_line3 |
| salesorderdetail | salesorderdetail | 14 | Company, OrderLine, OrderNum → comrcint_externalkey, Address1 → shipto_line1, Address2 → shipto_line2, Address3 → shipto_line3, City → shipto_city |
| invoice | invoice | 22 | BTAddress1 → billto_line1, BTAddress2 → billto_line2, BTAddress3 → billto_line3, BTCity → billto_city, BTState → billto_stateorprovince |
| invoicedetail | invoicedetail | 14 | Company,InvoiceLine,InvoiceNum → comrcint_externalkey, Address1 → shipto_line1, Address2 → shipto_line2, Address3 → shipto_line3, City → shipto_city |
| quote | quote | 22 | Company, QuoteNum → comrcint_externalkey, Company, QuoteNum → Name, BTAddress1 → billto_line1, BTAddress2 → billto_line2, BTAddress3 → billto_line3 |
| quotedetail | quotedetail | 14 | Company, QuoteNum, QuoteLine → comrcint_externalkey, Address1 → shipto_line1, Address2 → shipto_line2, Address3 → shipto_line3, City → shipto_city |
| EPICOR10 SalesOrder | comrcint_epicor10_salesorder | 3 | Company, OrderNum → externalkey, Company, OrderNum → Name, SFDCID → pricelevel__pricelevelid__lookup |
| EPICOR10 SalesOrder Detail | comrcint_epicor10_salesorderdetail | 5 | Company, OrderLine, OrderNum → comrcint_externalkey, Company, OrderLine, OrderNum → name, SFDCID → comrcint_epicor10_salesorder__epicor10_salesorder_r__lookup, SFDCID → product__productid__lookup, SFDCID → uom__uomid__lookup |
| EPICOR10 Invoice | comrcint_epicor10_invoice | 3 | Company,InvoiceNum → comrcint_externalkey, Company,InvoiceNum → Name, SFDCID → pricelevel__pricelevelid__lookup |
| EPICOR10 Invoice Detail | comrcint_epicor10_invoicedetail | 3 | Company,InvoiceLine,InvoiceNum → comrcint_externalkey, Company,InvoiceLine,InvoiceNum → name, SFDCID → comrcint_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,salesorderdetailand 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.