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. 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-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

GroupBusiness outcomeObjectsSource tables and views
CRM UOMScheduleThe templates push uomschedule to MDC.uomscheduleSF_ERP_Salesforce_Clone_ttiitm001400
CRM UOMThe templates push uom to MDC.uomSF_ERP_Salesforce_Clone_ttiitm001400
CRM ProductThe templates push product to MDC.productSF_ERP_Salesforce_Clone_ttiitm001400
CRM PriceLevelThe templates push pricelevel to MDC.pricelevel
CRM salesorderThe templates push salesorder to MDC.salesorderSF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls040400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres
CRM salesorderdetailThe templates push salesorderdetail to MDC.salesorderdetailSF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls041400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres
CRM invoiceThe templates push invoice to MDC.invoiceSF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttfacr200400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres
BAAN Sales PersonThe templates push comrcint_baan_salesperson to MDC.comrcint_baan_salespersonSF_ERP_Salesforce_Clone_ttccom001400
CRM AccountThe templates push account to MDC.accountSF_ERP_Salesforce_Clone_ttccom010400, cetPaymentTerm, cetDefaultPaymentTerm
BAAN CustomerThe templates push comrcint_baan_customer to MDC.comrcint_baan_customerSF_ERP_Salesforce_Clone_ttccom010400
BAAN ShipTo AddressThe templates push comrcint_baan_shiptoaddress to MDC.comrcint_baan_shiptoaddressSF_ERP_Salesforce_Clone_ttccom013400
BAAN SalesOrderThe templates push comrcint_baan_salesorder to MDC.comrcint_baan_salesorderSF_ERP_Salesforce_Clone_ttdsls040400
BAAN SalesOrderDetailThe templates push comrcint_baan_salesorderdetail to MDC.comrcint_baan_salesorderdetailSF_ERP_Salesforce_Clone_ttdsls041400
BAAN InvoiceThe templates push comrcint_baan_invoice to MDC.comrcint_baan_invoiceSF_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 nameCRM_Object_API_NameCRM_PK_API_NameSync_OrderTimeStamp_PrefixSQL_Query targetfield prefix / postfixSync_Operation_Type
BAAN Sales Personcomrcint_baan_salespersoncomrcint_externalkey4BAAN_SalesPerson:vw_BAAN_SalesPersoncomrcint_ / ''1
CRM Accountaccountcomrcint_arcustomercode5vw_CRM_Account:vw_CRM_Account'' / ''1
BAAN Customercomrcint_baan_customercomrcint_externalkey6BAAN_Customer:vw_BAAN_Customercomrcint_ / ''1
BAAN ShipTo Addresscomrcint_baan_shiptoaddresscomrcint_externalkey7BAAN_ShipToAddress:vw_BAAN_ShipToAddresscomrcint_ / ''1
CRM UOMScheduleuomschedulename8UOMSchedule:vw_CRM_UOMSchedule'' / ''1
CRM UOMuomname9UOM:vw_CRM_UOM'' / ''1
CRM Productproductcomrcint_externalkey10vw_CRM_Product:vw_CRM_Product'' / ''1
CRM PriceLevelpricelevelcomrcint_externalkey22CRM_PriceBook:vw_BAAN_CRM_PriceLevel'' / ''1
CRM salesordersalesordercomrcint_externalkey24vw_BAAN_STD_SalesOrder:vw_BAAN_STD_SalesOrder'' / ''1
CRM salesorderdetailsalesorderdetailcomrcint_externalkey25vw_BAAN_STD_SalesDetail:vw_BAAN_STD_SalesDetail'' / ''1
CRM invoiceinvoicecomrcint_externalkey26vw_BAAN_STD_InvoiceHeader:vw_BAAN_STD_InvoiceHeader'' / ''1
BAAN SalesOrdercomrcint_baan_salesordercomrcint_externalkey27BAAN_SalesOrderHeader:vw_BAAN_SalesOrderHeadercomrcint_ / ''1
BAAN SalesOrderDetailcomrcint_baan_salesorderdetailcomrcint_externalkey28BAAN_SalesOrderDetail:vw_BAAN_SalesOrderDetailcomrcint_ / ''1
BAAN Invoicecomrcint_baan_invoicecomrcint_externalkey29BAAN_InvoiceHeader:vw_BAAN_InvoiceHeadercomrcint_ / ''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.

ViewChange detectionRepository keyReads other prefixesIdentity columnSource tables
vw_BAAN_SalesPersoninsert + updateBAAN_SalesPerson:externalkeySF_ERP_Salesforce_Clone_ttccom001400
vw_CRM_Accountinsert + updatePaymentTerm:, territory:, vw_CRM_Account:SF_ERP_Salesforce_Clone_ttccom010400, cetPaymentTerm, cetDefaultPaymentTerm
vw_BAAN_Customerinsert + updatevw_CRM_Account:, BAAN_SalesPerson:, BAAN_Customer:externalkeySF_ERP_Salesforce_Clone_ttccom010400
vw_BAAN_ShipToAddressinsert + updatevw_CRM_Account:, BAAN_Customer:, BAAN_ShipToAddress:SF_ERP_Salesforce_Clone_ttccom013400
vw_CRM_UOMScheduleinsert + updateUOMSchedule:nameSF_ERP_Salesforce_Clone_ttiitm001400
vw_CRM_UOMinsert + updateUOMSchedule:, UOM:nameSF_ERP_Salesforce_Clone_ttiitm001400
vw_BAAN_CRM_Productinsert + updatevw_BAAN_CRM_Product:comrcint_externalkeySF_ERP_Salesforce_Clone_ttiitm001400
vw_BAAN_CRM_PriceLevelcomrcint_externalkey
vw_BAAN_STD_SalesOrderinsert + updatevw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_SalesOrder:comrcint_externalkeySF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls040400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres
vw_BAAN_STD_SalesDetailinsert + updatevw_BAAN_STD_SalesOrder:, vw_CRM_Product:, vw_BAAN_STD_SalesDetail:comrcint_externalkeySF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttdsls041400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres
vw_BAAN_STD_InvoiceHeaderinsert + updatevw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_InvoiceHeader:comrcint_externalkeySF_ERP_Salesforce_Clone_ttccom013400, SF_ERP_Salesforce_Clone_ttfacr200400, SF_ERP_Salesforce_Clone_ttccom010400, cteshipaddres
vw_BAAN_SalesOrderHeaderinsert + updateBAAN_SalesPerson:, vw_CRM_Account:, BAAN_Customer:, BAAN_SalesOrderHeader:externalkeySF_ERP_Salesforce_Clone_ttdsls040400
vw_BAAN_SalesOrderDetailinsert + updateBAAN_SalesOrderHeader:, BAAN_SalesOrderDetail:externalkeySF_ERP_Salesforce_Clone_ttdsls041400
vw_BAAN_InvoiceHeaderinsert + updatevw_CRM_Account:, BAAN_Customer:, BAAN_SalesPerson:, BAAN_InvoiceHeader:externalkeySF_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 Person
  • 5 — CRM Account
  • 6 — BAAN Customer
  • 7 — BAAN ShipTo Address
  • 8 — CRM UOMSchedule
  • 9 — CRM UOM
  • 10 — CRM Product
  • 22 — CRM PriceLevel
  • 24 — CRM salesorder
  • 25 — CRM salesorderdetail
  • 26 — CRM invoice
  • 27 — BAAN SalesOrder
  • 28 — BAAN SalesOrderDetail
  • 29 — 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_UOMSchedule reads UOMSchedule:; no template in this set writes UOMSchedule:
  • vw_CRM_UOM reads UOMSchedule:, UOM:; no template in this set writes UOMSchedule:, UOM:
  • vw_BAAN_CRM_Product reads vw_BAAN_CRM_Product:; no template in this set writes vw_BAAN_CRM_Product:
  • vw_BAAN_STD_SalesOrder reads vw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_SalesOrder:; no template in this set writes vw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_SalesOrder:
  • vw_BAAN_STD_SalesDetail reads vw_BAAN_STD_SalesOrder:, vw_CRM_Product:, vw_BAAN_STD_SalesDetail:; no template in this set writes vw_BAAN_STD_SalesOrder:, vw_CRM_Product:, vw_BAAN_STD_SalesDetail:
  • vw_BAAN_STD_InvoiceHeader reads vw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_InvoiceHeader:; no template in this set writes vw_CRM_Account:, vw_BAAN_Customer:, vw_BAAN_STD_InvoiceHeader:
  • vw_BAAN_SalesPerson reads BAAN_SalesPerson:; no template in this set writes BAAN_SalesPerson:
  • vw_CRM_Account reads PaymentTerm:, territory:, vw_CRM_Account:; no template in this set writes PaymentTerm:, territory:, vw_CRM_Account:
  • vw_BAAN_Customer reads vw_CRM_Account:, BAAN_SalesPerson:, BAAN_Customer:; no template in this set writes vw_CRM_Account:, BAAN_SalesPerson:, BAAN_Customer:
  • vw_BAAN_ShipToAddress reads vw_CRM_Account:, BAAN_Customer:, BAAN_ShipToAddress:; no template in this set writes vw_CRM_Account:, BAAN_Customer:, BAAN_ShipToAddress:
  • vw_BAAN_SalesOrderHeader reads BAAN_SalesPerson:, vw_CRM_Account:, BAAN_Customer:, BAAN_SalesOrderHeader:; no template in this set writes BAAN_SalesPerson:, vw_CRM_Account:, BAAN_Customer:, BAAN_SalesOrderHeader:
  • vw_BAAN_SalesOrderDetail reads BAAN_SalesOrderHeader:, BAAN_SalesOrderDetail:; no template in this set writes BAAN_SalesOrderHeader:, BAAN_SalesOrderDetail:
  • vw_BAAN_InvoiceHeader reads vw_CRM_Account:, BAAN_Customer:, BAAN_SalesPerson:, BAAN_InvoiceHeader:; no template in this set writes vw_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.

TemplateObjectMapped fieldsFirst ERP → MDC pairs
BAAN Sales Personcomrcint_baan_salesperson8t_emnoexternalkey, t_namaname, t_nambname2, t_namcaddress, t_namdaddress2
CRM Accountaccount35t_cunocomrcint_arcustomercode, t_cunoaccountnumber, t_cunoname, t_telpaddress1_telephone1, t_namcaddress1_line1
BAAN Customercomrcint_baan_customer41t_cunoexternalkey, t_namaname, t_nambname2, t_ctittitle, t_namcaddress
BAAN ShipTo Addresscomrcint_baan_shiptoaddress14t_cuno, t_cdelcomrcint_externalkey, t_cunoCustomer, t_cdelDelivery_Address, t_cuno, t_cdelName, t_nambName_2
CRM UOMScheduleuomschedule2t_cuniname, baseuomnamebaseuomname
CRM UOMuom2t_stguname, t_cuniuomschedule__uomscheduleid__lookup
CRM Productproduct6t_dscaname, t_itemproductnumber, t_itemcomrcint_externalkey, t_dscadescription, DefaultUOMSchedule.SFDCIDuomschedule__DefaultUoMScheduleId__lookup
CRM PriceLevelpricelevel4comrcint_externalkeycomrcint_externalkey, NameName, DescriptionDescription, TimeStampTimeStamp
CRM salesordersalesorder18t_ornocomrcint_externalkey, t_ornoName, t_namcbillto_line1, t_namdbillto_line2, t_namebillto_city
CRM salesorderdetailsalesorderdetail11t_orno, t_ponocomrcint_externalkey, t_namcshipto_line1, t_namdshipto_line2, t_namfshipto_line3, t_nameshipto_city
CRM invoiceinvoice18t_namcbillto_line1, t_namdbillto_line2, t_namebillto_city, t_pstcbillto_postalcode, t_cctybillto_country
BAAN SalesOrdercomrcint_baan_salesorder29t_ornoexternalkey, t_ornoname, t_cunoCustomer, t_cpayTerms_Of_Payment, t_cotpOrder_Type
BAAN SalesOrderDetailcomrcint_baan_salesorderdetail25t_orno, t_ponocomrcint_externalkey, t_orno, t_pononame, t_ornoordernumber, t_ponoPosition_Number, t_drctDirect_Delivery
BAAN Invoicecomrcint_baan_invoice23t_ttyp, t_ninv, t_line, t_tdoc, t_docn, t_linoexternalkey, t_ttyp, t_ninv, t_line, t_tdoc, t_docn, t_linoname, t_ttyptransaction_type, t_ninvdocument, t_cunocustomer

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.