Source ERP · 6 of 11
CRMPro → MDC — Sage 100 2017: what the shipped templates set up
Read it in the terminal with "dlake skills show dlake-crmpro-mdc/erps/sage-100-2017". It extends the dlake-crmpro-mdc skill, which holds what is true whatever the source ERP.
CRMPro → MDC — Sage 100 2017: 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-mdc is the destination skill this page is a child of, and the authority for the MDC
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-mdc/erps/sage-100-2017.md, and that skill’s ERP
table is what points at it. What follows is only what the shipped Sage 100 2017 → MDC 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 MDC. | salesorder | SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
| salesorderdetail | The templates push salesorderdetail to MDC. | salesorderdetail | SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
| invoice | The templates push invoice to MDC. | invoice | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
| invoicedetail | The templates push invoicedetail to MDC. | invoicedetail | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYDETAIL, SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
| quotedetail | The templates push quotedetail to MDC. | quotedetail | SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
| SAGE1002017 SalesOrder | The templates push comrcint_sage1002017_salesorder to MDC. | comrcint_sage1002017_salesorder | SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
| SAGE1002017 SalesOrder Detail | The templates push comrcint_sage1002017_salesorderdetail to MDC. | comrcint_sage1002017_salesorderdetail | SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
| SAGE1002017 Invoice | The templates push comrcint_sage1002017_invoice to MDC. | comrcint_sage1002017_invoice | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
| SAGE1002017 Invoice Detail | The templates push comrcint_sage1002017_invoicedetail to MDC. | comrcint_sage1002017_invoicedetail | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYDETAIL, SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
| CRM Quote and Line | The templates push quote to MDC. | quote | SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
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 | 22 | vw_SAGE1002017_STD_SalesOrder: | vw_SAGE1002017_STD_SalesOrder | '' / '' | 1 |
| salesorderdetail | salesorderdetail | comrcint_externalkey | 23 | vw_SAGE1002017_STD_SalesDetail: | vw_SAGE1002017_STD_SalesDetail | '' / '' | 1 |
| invoice | invoice | comrcint_externalkey | 24 | vw_SAGE1002017_STD_InvoiceHeader: | vw_SAGE1002017_STD_InvoiceHeader | '' / '' | 1 |
| invoicedetail | invoicedetail | comrcint_externalkey | 25 | vw_SAGE1002017_STD_InvoiceDetail: | vw_SAGE1002017_STD_InvoiceDetail | '' / '' | 1 |
| quote | quote | comrcint_externalkey | 26 | vw_SAGE1002017_STD_Quote: | vw_SAGE1002017_STD_Quote | '' / '' | 1 |
| quotedetail | quotedetail | comrcint_externalkey | 27 | vw_SAGE1002017_STD_QuoteDetail: | vw_SAGE1002017_STD_QuoteDetail | '' / '' | 1 |
| SAGE1002017 SalesOrder | comrcint_sage1002017_salesorder | comrcint_externalkey | 28 | vw_SAGE1002017_SalesOrder: | vw_SAGE1002017_SalesOrder | comrcint_ / '' | 1 |
| SAGE1002017 SalesOrder Detail | comrcint_sage1002017_salesorderdetail | comrcint_externalkey | 29 | vw_SAGE1002017_SalesDetail: | vw_SAGE1002017_SalesDetail | comrcint_ / '' | 1 |
| SAGE1002017 Invoice | comrcint_sage1002017_invoice | comrcint_externalkey | 30 | vw_SAGE1002017_InvoiceHeader: | vw_SAGE1002017_InvoiceHeader | comrcint_ / '' | 1 |
| SAGE1002017 Invoice Detail | comrcint_sage1002017_invoicedetail | comrcint_externalkey | 31 | vw_SAGE1002017_InvoiceDetail: | vw_SAGE1002017_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_SAGE1002017_STD_SalesOrder | insert-only | — | AR_CUSTOMER:, CRM_Account:, vw_SAGE1002017_STD_SalesOrder: | comrcint_externalkey | SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
vw_SAGE1002017_STD_SalesDetail | insert-only | — | CRM_Account:, vw_SAGE100_Product:, vw_SAGE1002017_STD_SalesOrder:, vw_SAGE1002017_STD_SalesDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
vw_SAGE1002017_STD_InvoiceHeader | insert + update | — | AR_CUSTOMER:, CRM_Account:, vw_SAGE1002017_STD_InvoiceHeader: | comrcint_externalkey | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
vw_SAGE1002017_STD_InvoiceDetail | insert + update | — | vw_SAGE1002017_STD_InvoiceHeader:, CRM_Account:, vw_SAGE100_Product:, vw_SAGE1002017_STD_InvoiceDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYDETAIL, SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
vw_SAGE1002017_STD_Quote | insert-only | — | AR_CUSTOMER:, CRM_Account:, vw_SAGE1002017_STD_Quote: | comrcint_externalkey | SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
vw_SAGE1002017_STD_QuoteDetail | insert-only | — | CRM_Account:, vw_SAGE100_Product:, vw_SAGE1002017_STD_Quote:, vw_SAGE1002017_STD_QuoteDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
vw_SAGE1002017_SalesOrder | insert-only | — | AR_CUSTOMER:, CRM_Account:, vw_SAGE1002017_SalesOrder: | externalkey | SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
vw_SAGE1002017_SalesDetail | insert-only | — | CRM_Account:, vw_SAGE100_Product:, vw_SAGE1002017_STD_SalesOrder:, vw_SAGE1002017_SalesDetail: | externalkey | SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
vw_SAGE1002017_InvoiceHeader | insert + update | — | AR_CUSTOMER:, CRM_Account:, vw_SAGE1002017_InvoiceHeader: | externalkey | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, CommercientFlags |
vw_SAGE1002017_InvoiceDetail | insert + update | — | vw_SAGE1002017_STD_InvoiceHeader:, CRM_Account:, vw_SAGE100_Product:, vw_SAGE1002017_InvoiceDetail: | externalkey | SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYDETAIL, SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS |
4. Order of work
The templates set Sync_Order from 22 to 31. A run processes active rows in ascending
Sync_Order, which is the order the templates put them in:
22— salesorder23— salesorderdetail24— invoice25— invoicedetail26— quote27— quotedetail28— SAGE1002017 SalesOrder29— SAGE1002017 SalesOrder Detail30— SAGE1002017 Invoice31— SAGE1002017 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_SAGE1002017_STD_SalesOrderreadsAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_STD_SalesOrder:; no template in this set writesAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_STD_SalesOrder:vw_SAGE1002017_STD_SalesDetailreadsCRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_SalesOrder:,vw_SAGE1002017_STD_SalesDetail:; no template in this set writesCRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_SalesOrder:,vw_SAGE1002017_STD_SalesDetail:vw_SAGE1002017_STD_InvoiceHeaderreadsAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_STD_InvoiceHeader:; no template in this set writesAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_STD_InvoiceHeader:vw_SAGE1002017_STD_InvoiceDetailreadsvw_SAGE1002017_STD_InvoiceHeader:,CRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_InvoiceDetail:; no template in this set writesvw_SAGE1002017_STD_InvoiceHeader:,CRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_InvoiceDetail:vw_SAGE1002017_STD_QuoteDetailreadsCRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_Quote:,vw_SAGE1002017_STD_QuoteDetail:; no template in this set writesCRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_Quote:,vw_SAGE1002017_STD_QuoteDetail:vw_SAGE1002017_SalesOrderreadsAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_SalesOrder:; no template in this set writesAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_SalesOrder:vw_SAGE1002017_SalesDetailreadsCRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_SalesOrder:,vw_SAGE1002017_SalesDetail:; no template in this set writesCRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_STD_SalesOrder:,vw_SAGE1002017_SalesDetail:vw_SAGE1002017_InvoiceHeaderreadsAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_InvoiceHeader:; no template in this set writesAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_InvoiceHeader:vw_SAGE1002017_InvoiceDetailreadsvw_SAGE1002017_STD_InvoiceHeader:,CRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_InvoiceDetail:; no template in this set writesvw_SAGE1002017_STD_InvoiceHeader:,CRM_Account:,vw_SAGE100_Product:,vw_SAGE1002017_InvoiceDetail:vw_SAGE1002017_STD_QuotereadsAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_STD_Quote:; no template in this set writesAR_CUSTOMER:,CRM_Account:,vw_SAGE1002017_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 → MDC pairs |
|---|---|---|---|
| salesorder | salesorder | 20 | SALESORDERNO → comrcint_externalkey, SALESORDERNO → name, ADDRESSLINE1 → billto_line1, ADDRESSLINE2 → billto_line2, ADDRESSLINE3 → billto_line3 |
| salesorderdetail | salesorderdetail | 12 | SALESORDERNO, LINEKEY → comrcint_externalkey, SHIPTOADDRESS1 → shipto_line1, SHIPTOADDRESS2 → shipto_line2, SHIPTOADDRESS3 → shipto_line3, SHIPTOCITY → shipto_city |
| invoice | invoice | 20 | ADDRESSLINE1 → billto_line1, ADDRESSLINE2 → billto_line2, ADDRESSLINE3 → billto_line3, CITY → billto_city, STATE → billto_stateorprovince |
| invoicedetail | invoicedetail | 12 | INVOICENO, HEADERSEQNO, DETAILSEQNO → comrcint_externalkey, SHIPTOADDRESS1 → shipto_line1, SHIPTOADDRESS2 → shipto_line2, SHIPTOADDRESS3 → shipto_line3, SHIPTOCITY → shipto_city |
| quote | quote | 20 | SALESORDERNO → comrcint_externalkey, SALESORDERNO → name, ADDRESSLINE1 → billto_line1, ADDRESSLINE2 → billto_line2, ADDRESSLINE3 → billto_line3 |
| quotedetail | quotedetail | 12 | SALESORDERNO, LINEKEY → comrcint_externalkey, SHIPTOADDRESS1 → shipto_line1, SHIPTOADDRESS2 → shipto_line2, SHIPTOADDRESS3 → shipto_line3, SHIPTOCITY → shipto_city |
| SAGE1002017 SalesOrder | comrcint_sage1002017_salesorder | 4 | SALESORDERNO → externalkey, SALESORDERNO → name, ARDIVISIONNO, CUSTOMERNO → account__customerid__lookup, Commercient Price List → pricelevel__pricelevelid__lookup |
| SAGE1002017 SalesOrder Detail | comrcint_sage1002017_salesorderdetail | 5 | SALESORDERNO, LINEKEY → comrcint_externalkey, SALESORDERNO, LINEKEY → name, SALESORDERNO → salesorder__salesorderid__lookup, ITEMCODE → product__productid__lookup, Unit → uom__uomid__lookup |
| SAGE1002017 Invoice | comrcint_sage1002017_invoice | 4 | INVOICENO, HEADERSEQNO → externalkey, INVOICENO, HEADERSEQNO → Name, ARDIVISIONNO, CUSTOMERNO → account__customerid__lookup, Commercient Price List → pricelevel__pricelevelid__lookup |
| SAGE1002017 Invoice Detail | comrcint_sage1002017_invoicedetail | 5 | INVOICENO, HEADERSEQNO, DETAILSEQNO → externalkey, INVOICENO, HEADERSEQNO, DETAILSEQNO → name, SFDCID → invoice__invoiceid__lookup, ITEMCODE → product__productid__lookup, UOM → uom__uomid__lookup |
6. 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_SAGE1002017_STD_SalesOrder:vw_SAGE1002017_STD_SalesDetail:vw_SAGE1002017_STD_InvoiceHeader:vw_SAGE1002017_STD_InvoiceDetail:vw_SAGE1002017_STD_QuoteDetail:vw_SAGE1002017_SalesOrder:vw_SAGE1002017_SalesDetail:vw_SAGE1002017_InvoiceHeader:vw_SAGE1002017_InvoiceDetail:vw_SAGE1002017_STD_Quote:
7. 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 Sage 100 2017 → MDC templates set up. dlake-crmpro-mdc is the destination
skill this page sits under: its own text is the authority for the MDC 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.