Source ERP · 2 of 11
CRMPro → MDC — Baan: what the shipped templates set up
Read it in the terminal with "dlake skills show dlake-crmpro-mdc/erps/baan". It extends the dlake-crmpro-mdc skill, which holds what is true whatever the source ERP.
CRMPro → MDC — Baan: 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/baan.md, and that skill’s ERP table is
what points at it. What follows is only what the shipped Baan → 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 |
|---|---|---|---|
| CRM UOMSchedule | The templates push uomschedule to MDC. | uomschedule | SF_ERP_Salesforce_Clone_ttiitm001400 |
| CRM UOM | The templates push uom to MDC. | uom | SF_ERP_Salesforce_Clone_ttiitm001400 |
| CRM Product | The templates push product to MDC. | product | SF_ERP_Salesforce_Clone_ttiitm001400 |
| CRM PriceLevel | The templates push pricelevel to MDC. | pricelevel | — |
| CRM salesorder | The templates push salesorder to MDC. | salesorder | SF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls040400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres |
| CRM salesorderdetail | The templates push salesorderdetail to MDC. | salesorderdetail | SF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls041400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres |
| CRM invoice | The templates push invoice to MDC. | invoice | SF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttfacr200400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres |
| BAAN Sales Person | The templates push comrcint_baan_salesperson to MDC. | comrcint_baan_salesperson | SF_ERP_Salesforce_Clone_ttccom001400 |
| CRM Account | The templates push account to MDC. | account | SF_ERP_Salesforce_Clone_ttccom010400, cetPaymentTerm, cetDefaultPaymentTerm |
| BAAN Customer | The templates push comrcint_baan_customer to MDC. | comrcint_baan_customer | SF_ERP_Salesforce_Clone_ttccom010400 |
| BAAN ShipTo Address | The templates push comrcint_baan_shiptoaddress to MDC. | comrcint_baan_shiptoaddress | SF_ERP_Salesforce_Clone_ttccom013400 |
| BAAN SalesOrder | The templates push comrcint_baan_salesorder to MDC. | comrcint_baan_salesorder | SF_ERP_Salesforce_Clone_ttdsls040400 |
| BAAN SalesOrderDetail | The templates push comrcint_baan_salesorderdetail to MDC. | comrcint_baan_salesorderdetail | SF_ERP_Salesforce_Clone_ttdsls041400 |
| BAAN Invoice | The templates push comrcint_baan_invoice to MDC. | comrcint_baan_invoice | SF_ERP_Salesforce_Clone_ttfacr200400 |
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 |
|---|---|---|---|---|---|---|---|
| BAAN Sales Person | comrcint_baan_salesperson | comrcint_externalkey | 4 | BAAN_SalesPerson: | vw_BAAN_SalesPerson | comrcint_ / '' | 1 |
| CRM Account | account | comrcint_arcustomercode | 5 | vw_CRM_Account: | vw_CRM_Account | '' / '' | 1 |
| BAAN Customer | comrcint_baan_customer | comrcint_externalkey | 6 | BAAN_Customer: | vw_BAAN_Customer | comrcint_ / '' | 1 |
| BAAN ShipTo Address | comrcint_baan_shiptoaddress | comrcint_externalkey | 7 | BAAN_ShipToAddress: | vw_BAAN_ShipToAddress | comrcint_ / '' | 1 |
| CRM UOMSchedule | uomschedule | name | 8 | UOMSchedule: | vw_CRM_UOMSchedule | '' / '' | 1 |
| CRM UOM | uom | name | 9 | UOM: | vw_CRM_UOM | '' / '' | 1 |
| CRM Product | product | comrcint_externalkey | 10 | vw_CRM_Product: | vw_CRM_Product | '' / '' | 1 |
| CRM PriceLevel | pricelevel | comrcint_externalkey | 22 | CRM_PriceBook: | vw_BAAN_CRM_PriceLevel | '' / '' | 1 |
| CRM salesorder | salesorder | comrcint_externalkey | 24 | vw_BAAN_STD_SalesOrder: | vw_BAAN_STD_SalesOrder | '' / '' | 1 |
| CRM salesorderdetail | salesorderdetail | comrcint_externalkey | 25 | vw_BAAN_STD_SalesDetail: | vw_BAAN_STD_SalesDetail | '' / '' | 1 |
| CRM invoice | invoice | comrcint_externalkey | 26 | vw_BAAN_STD_InvoiceHeader: | vw_BAAN_STD_InvoiceHeader | '' / '' | 1 |
| BAAN SalesOrder | comrcint_baan_salesorder | comrcint_externalkey | 27 | BAAN_SalesOrderHeader: | vw_BAAN_SalesOrderHeader | comrcint_ / '' | 1 |
| BAAN SalesOrderDetail | comrcint_baan_salesorderdetail | comrcint_externalkey | 28 | BAAN_SalesOrderDetail: | vw_BAAN_SalesOrderDetail | comrcint_ / '' | 1 |
| BAAN Invoice | comrcint_baan_invoice | comrcint_externalkey | 29 | BAAN_InvoiceHeader: | vw_BAAN_InvoiceHeader | 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. On CRM Product the SQL_Query names a view the same template’s CreateViewQuery does
not create (vw_CRM_Product against vw_BAAN_CRM_Product), so check the view exists under the
name the row selects from before activating it.
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_BAAN_SalesPerson | insert + update | — | BAAN_SalesPerson: | externalkey | SF_ERP_Salesforce_Clone_ttccom001400 |
vw_CRM_Account | insert + update | — | PaymentTerm:, territory:, vw_CRM_Account: | — | SF_ERP_Salesforce_Clone_ttccom010400, cetPaymentTerm, cetDefaultPaymentTerm |
vw_BAAN_Customer | insert + update | — | vw_CRM_Account:, BAAN_SalesPerson:, BAAN_Customer: | externalkey | SF_ERP_Salesforce_Clone_ttccom010400 |
vw_BAAN_ShipToAddress | insert + update | — | vw_CRM_Account:, BAAN_Customer:, BAAN_ShipToAddress: | — | SF_ERP_Salesforce_Clone_ttccom013400 |
vw_CRM_UOMSchedule | insert + update | — | UOMSchedule: | name | SF_ERP_Salesforce_Clone_ttiitm001400 |
vw_CRM_UOM | insert + update | — | UOMSchedule:, UOM: | name | SF_ERP_Salesforce_Clone_ttiitm001400 |
vw_BAAN_CRM_Product | insert + update | — | vw_BAAN_CRM_Product: | comrcint_externalkey | SF_ERP_Salesforce_Clone_ttiitm001400 |
vw_BAAN_CRM_PriceLevel | — | — | comrcint_externalkey | — | |
vw_BAAN_STD_SalesOrder | insert + update | — | vw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_SalesOrder: | comrcint_externalkey | SF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls040400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres |
vw_BAAN_STD_SalesDetail | insert + update | — | vw_BAAN_STD_SalesOrder:, vw_CRM_Product:, vw_BAAN_STD_SalesDetail: | comrcint_externalkey | SF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls041400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres |
vw_BAAN_STD_InvoiceHeader | insert + update | — | vw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_InvoiceHeader: | comrcint_externalkey | SF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttfacr200400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres |
vw_BAAN_SalesOrderHeader | insert + update | — | BAAN_SalesPerson:, vw_CRM_Account:, BAAN_Customer:, BAAN_SalesOrderHeader: | externalkey | SF_ERP_Salesforce_Clone_ttdsls040400 |
vw_BAAN_SalesOrderDetail | insert + update | — | BAAN_SalesOrderHeader:, BAAN_SalesOrderDetail: | externalkey | SF_ERP_Salesforce_Clone_ttdsls041400 |
vw_BAAN_InvoiceHeader | insert + update | — | vw_CRM_Account:, BAAN_Customer:, BAAN_SalesPerson:, BAAN_InvoiceHeader: | externalkey | SF_ERP_Salesforce_Clone_ttfacr200400 |
4. Order of work
The templates set Sync_Order from 4 to 29. A run processes active rows in ascending
Sync_Order, which is the order the templates put them in:
4— BAAN Sales Person5— CRM Account6— BAAN Customer7— BAAN ShipTo Address8— CRM UOMSchedule9— CRM UOM10— CRM Product22— CRM PriceLevel24— CRM salesorder25— CRM salesorderdetail26— CRM invoice27— BAAN SalesOrder28— BAAN SalesOrderDetail29— BAAN Invoice
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_CRM_UOMSchedulereadsUOMSchedule:; no template in this set writesUOMSchedule:vw_CRM_UOMreadsUOMSchedule:,UOM:; no template in this set writesUOMSchedule:,UOM:vw_BAAN_CRM_Productreadsvw_BAAN_CRM_Product:; no template in this set writesvw_BAAN_CRM_Product:vw_BAAN_STD_SalesOrderreadsvw_CRM_Account:,vw_BAAN_Customer:,vw_BAAN_STD_SalesOrder:; no template in this set writesvw_CRM_Account:,vw_BAAN_Customer:,vw_BAAN_STD_SalesOrder:vw_BAAN_STD_SalesDetailreadsvw_BAAN_STD_SalesOrder:,vw_CRM_Product:,vw_BAAN_STD_SalesDetail:; no template in this set writesvw_BAAN_STD_SalesOrder:,vw_CRM_Product:,vw_BAAN_STD_SalesDetail:vw_BAAN_STD_InvoiceHeaderreadsvw_CRM_Account:,vw_BAAN_Customer:,vw_BAAN_STD_InvoiceHeader:; no template in this set writesvw_CRM_Account:,vw_BAAN_Customer:,vw_BAAN_STD_InvoiceHeader:vw_BAAN_SalesPersonreadsBAAN_SalesPerson:; no template in this set writesBAAN_SalesPerson:vw_CRM_AccountreadsPaymentTerm:,territory:,vw_CRM_Account:; no template in this set writesPaymentTerm:,territory:,vw_CRM_Account:vw_BAAN_Customerreadsvw_CRM_Account:,BAAN_SalesPerson:,BAAN_Customer:; no template in this set writesvw_CRM_Account:,BAAN_SalesPerson:,BAAN_Customer:vw_BAAN_ShipToAddressreadsvw_CRM_Account:,BAAN_Customer:,BAAN_ShipToAddress:; no template in this set writesvw_CRM_Account:,BAAN_Customer:,BAAN_ShipToAddress:vw_BAAN_SalesOrderHeaderreadsBAAN_SalesPerson:,vw_CRM_Account:,BAAN_Customer:,BAAN_SalesOrderHeader:; no template in this set writesBAAN_SalesPerson:,vw_CRM_Account:,BAAN_Customer:,BAAN_SalesOrderHeader:vw_BAAN_SalesOrderDetailreadsBAAN_SalesOrderHeader:,BAAN_SalesOrderDetail:; no template in this set writesBAAN_SalesOrderHeader:,BAAN_SalesOrderDetail:vw_BAAN_InvoiceHeaderreadsvw_CRM_Account:,BAAN_Customer:,BAAN_SalesPerson:,BAAN_InvoiceHeader:; no template in this set writesvw_CRM_Account:,BAAN_Customer:,BAAN_SalesPerson:,BAAN_InvoiceHeader:
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 |
|---|---|---|---|
| BAAN Sales Person | comrcint_baan_salesperson | 8 | t_emno → externalkey, t_nama → name, t_namb → name2, t_namc → address, t_namd → address2 |
| CRM Account | account | 35 | t_cuno → comrcint_arcustomercode, t_cuno → accountnumber, t_cuno → name, t_telp → address1_telephone1, t_namc → address1_line1 |
| BAAN Customer | comrcint_baan_customer | 41 | t_cuno → externalkey, t_nama → name, t_namb → name2, t_ctit → title, t_namc → address |
| BAAN ShipTo Address | comrcint_baan_shiptoaddress | 14 | t_cuno, t_cdel → comrcint_externalkey, t_cuno → Customer, t_cdel → Delivery_Address, t_cuno, t_cdel → Name, t_namb → Name_2 |
| CRM UOMSchedule | uomschedule | 2 | t_cuni → name, baseuomname → baseuomname |
| CRM UOM | uom | 2 | t_stgu → name, t_cuni → uomschedule__uomscheduleid__lookup |
| CRM Product | product | 6 | t_dsca → name, t_item → productnumber, t_item → comrcint_externalkey, t_dsca → description, DefaultUOMSchedule.SFDCID → uomschedule__DefaultUoMScheduleId__lookup |
| CRM PriceLevel | pricelevel | 4 | comrcint_externalkey → comrcint_externalkey, Name → Name, Description → Description, TimeStamp → TimeStamp |
| CRM salesorder | salesorder | 18 | t_orno → comrcint_externalkey, t_orno → Name, t_namc → billto_line1, t_namd → billto_line2, t_name → billto_city |
| CRM salesorderdetail | salesorderdetail | 11 | t_orno, t_pono → comrcint_externalkey, t_namc → shipto_line1, t_namd → shipto_line2, t_namf → shipto_line3, t_name → shipto_city |
| CRM invoice | invoice | 18 | t_namc → billto_line1, t_namd → billto_line2, t_name → billto_city, t_pstc → billto_postalcode, t_ccty → billto_country |
| BAAN SalesOrder | comrcint_baan_salesorder | 29 | t_orno → externalkey, t_orno → name, t_cuno → Customer, t_cpay → Terms_Of_Payment, t_cotp → Order_Type |
| BAAN SalesOrderDetail | comrcint_baan_salesorderdetail | 25 | t_orno, t_pono → comrcint_externalkey, t_orno, t_pono → name, t_orno → ordernumber, t_pono → Position_Number, t_drct → Direct_Delivery |
| BAAN Invoice | comrcint_baan_invoice | 23 | t_ttyp, t_ninv, t_line, t_tdoc, t_docn, t_lino → externalkey, t_ttyp, t_ninv, t_line, t_tdoc, t_docn, t_lino → name, t_ttyp → transaction_type, t_ninv → document, t_cuno → customer |
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:
UOMSchedule:UOM:vw_CRM_Product:CRM_PriceBook:vw_BAAN_STD_SalesOrder:vw_BAAN_STD_SalesDetail:vw_BAAN_STD_InvoiceHeader:BAAN_SalesPerson:vw_CRM_Account:BAAN_Customer:BAAN_ShipToAddress:BAAN_SalesOrderHeader:BAAN_SalesOrderDetail:BAAN_InvoiceHeader:
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 Baan → 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.