Source ERP · 25 of 27

CRMPro → Zoho CRM — SAP B1: what the shipped templates set up

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

CRMPro → Zoho CRM — SAP B1: 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-zohocrm is the destination skill this page is a child of, and the authority for the Zoho 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-zohocrm/erps/sap-b1.md, and that skill’s ERP table is what points at it. What follows is only what the shipped SAP B1 → Zoho 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
AccountsThe templates push Accounts to Zoho CRM.AccountsSF_ERP_Salesforce_Clone_OCRD, SF_ERP_Salesforce_Clone_CRD1, SF_ERP_Salesforce_Clone_OCRG
CustomerThe templates push commercientsapb1__SAPB1_Customer to Zoho CRM.commercientsapb1__SAPB1_CustomerSF_ERP_Salesforce_Clone_OCRD
AddressThe templates push commercientsapb1__SAPB1_Address to Zoho CRM.commercientsapb1__SAPB1_AddressSF_ERP_Salesforce_Clone_CRD1
ProductsThe templates push Products to Zoho CRM.ProductsSF_ERP_Salesforce_Clone_OITM, SF_ERP_Salesforce_Clone_ITM1
Item MasterThe templates push commercientsapb1__SAPB1_Item to Zoho CRM.commercientsapb1__SAPB1_ItemSF_ERP_Salesforce_Clone_OITM
Sales OrderThe templates push commercientsapb1__SAPB1_Sales_Order_Header to Zoho CRM.commercientsapb1__SAPB1_Sales_Order_HeaderSF_ERP_Salesforce_Clone_ORDR
Sales Order LineThe templates push commercientsapb1__SAPB1_Sales_Order_Detail to Zoho CRM.commercientsapb1__SAPB1_Sales_Order_DetailSF_ERP_Salesforce_Clone_RDR1, R, SF_ERP_Salesforce_Clone_ORDR
InvoiceThe templates push commercientsapb1__SAPB1_Invoice_Header to Zoho CRM.commercientsapb1__SAPB1_Invoice_HeaderSF_ERP_Salesforce_Clone_OINV
Invoice DetailThe templates push commercientsapb1__SAPB1_Invoice_Detail to Zoho CRM.commercientsapb1__SAPB1_Invoice_DetailSF_ERP_Salesforce_Clone_INV1, a, T, SF_ERP_Salesforce_Clone_OINV, ITS, selfID
PriceBooksThe templates push commercientsapb1__SAPB1_PriceBooks to Zoho CRM.commercientsapb1__SAPB1_PriceBooksSF_ERP_Salesforce_Clone_OPLN
ItemPriceBooksThe templates push commercientsapb1__SAPB1_Item_PriceBooks to Zoho CRM.commercientsapb1__SAPB1_Item_PriceBooksSF_ERP_Salesforce_Clone_ITM1
Price__BookThe templates push Price_Books to Zoho CRM.Price_BooksSF_ERP_Salesforce_Clone_OPLN
SAPB1__Product_PricebooksThe templates push Products:Price_Books to Zoho CRM.Products:Price_BooksSF_ERP_Salesforce_Clone_ITM1, SF_ERP_Salesforce_Clone_OPLN
ContactsThe templates push Contacts to Zoho CRM.ContactsSF_ERP_Salesforce_Clone_OCPR
SAPB1__QuotesThe templates push commercientsapb1__SAPB1_Quotes to Zoho CRM.commercientsapb1__SAPB1_QuotesSF_ERP_Salesforce_Clone_OQUT
SAPB1 Quotes DetailsThe templates push commercientsapb1__SAPB1_Quotes_Details to Zoho CRM.commercientsapb1__SAPB1_Quotes_DetailsSF_ERP_Salesforce_Clone_QUT1, SF_ERP_Salesforce_Clone_ORDR

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 / postfix
AccountsAccountsBP_Code1Account:vw_SAPB1_Account'' / __c
Customercommercientsapb1__SAPB1_CustomerCommercient_ExternalKey2SAPB1Customer:vw_SAPB1_Customercommercientsapb1__ / __c
Addresscommercientsapb1__SAPB1_AddressCommercient_ExternalKey3SAPB1Address:vw_SAPB1_Addresscommercientsapb1__ / __c
ProductsProductsCommercient_ExternalKey4Products:vw_SAPB1_Products'' / __c
Item Mastercommercientsapb1__SAPB1_ItemCommercient_ExternalKey5SAPB1ItemMaster:vw_SAPB1_Itemcommercientsapb1__ / __c
Sales Ordercommercientsapb1__SAPB1_Sales_Order_HeaderCommercient_ExternalKey6SAPB1SalesOrder:vw_SAPB1_SalesOrdercommercientsapb1__ / __c
Sales Order Linecommercientsapb1__SAPB1_Sales_Order_DetailCommercient_ExternalKey7SAPB1SalesOrderLine:vw_SAPB1_SalesOrderLinecommercientsapb1__ / __c
Invoicecommercientsapb1__SAPB1_Invoice_HeaderCommercient_ExternalKey8SAPB1Invoice:vw_SAPB1_Invoicecommercientsapb1__ / __c
Invoice Detailcommercientsapb1__SAPB1_Invoice_DetailCommercient_ExternalKey9SAPB1InvoiceLine:vw_SAPB1_InvoiceLinecommercientsapb1__ / __c
PriceBookscommercientsapb1__SAPB1_PriceBooksCommercient_ExternalKey10SAPB1PriceBooks:vw_SAPB1_PriceBookscommercientsapb1__ / __c
ItemPriceBookscommercientsapb1__SAPB1_Item_PriceBooksCommercient_ExternalKey11SAPB1ItemPriceBooks:vw_SAPB1_Item_PriceBookscommercientsapb1__ / ''
Price__BookPrice_BooksCommercient_ExternalKey12PriceBooks:vw_SAPB1_ZOHO_PriceBooks'' / __c
SAPB1__Product_PricebooksProducts:Price_BooksCommercient_ExternalKey13SAPB1_Product_PriceList:vw_SAPB1_ProductPriceList'' / __c
ContactsContactsCommercient_ExternalKey14vw_SAPB1_Contact:vw_SAPB1_Contacts'' / __c
SAPB1__Quotescommercientsapb1__SAPB1_QuotesCommercient_ExternalKey15SAPB1Quotes:vw_SAPB1_Quotescommercientsapb1__ / ''
SAPB1 Quotes Detailscommercientsapb1__SAPB1_Quotes_DetailsCommercient_ExternalKey16SAPB1QuotesDetails:vw_SAPB1_QuotesDetailscommercientsapb1__ / ''

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. The insert column lists do not include Sync_Operation_Type, Sync_Batch_Size, IsAccountMatching, Document_Source_Path, so those columns take their CRM_Configuration defaults. Text columns a template does not use are inserted as '' rather than left NULL. Get_SOQL_Query carries a query on Accounts, Products, Contacts — those rows read records back from Zoho CRM as well as pushing.

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_SAPB1_Accountinsert-onlyAccount:Commercient_ExternalKey__c, BP_CodeSF_ERP_Salesforce_Clone_OCRD, SF_ERP_Salesforce_Clone_CRD1, SF_ERP_Salesforce_Clone_OCRG
vw_SAPB1_Customerinsert-onlyaccount:, SAPB1Customer:Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKeySF_ERP_Salesforce_Clone_OCRD
vw_SAPB1_Addressinsert-onlyaccount:, SAPB1Customer:, SAPB1Address:Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKeySF_ERP_Salesforce_Clone_CRD1
vw_SAPB1_Productsinsert-onlyProducts:Commercient_ExternalKeySF_ERP_Salesforce_Clone_OITM, SF_ERP_Salesforce_Clone_ITM1
vw_SAPB1_Iteminsert-onlyProducts:, SAPB1ItemMaster:Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKeySF_ERP_Salesforce_Clone_OITM
vw_SAPB1_SalesOrderinsert-onlyaccount:, SAPB1Customer:, SAPB1SalesOrder:ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKeySF_ERP_Salesforce_Clone_ORDR
vw_SAPB1_SalesOrderLineinsert-onlySAPB1SalesOrder:, SAPB1ItemMaster:, SAPB1SalesOrderLine:ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKeySF_ERP_Salesforce_Clone_RDR1, R, SF_ERP_Salesforce_Clone_ORDR
vw_SAPB1_Invoiceinsert-onlyaccount:, SAPB1Customer:, SAPB1Invoice:ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKeySF_ERP_Salesforce_Clone_OINV
vw_SAPB1_InvoiceLineinsert-onlySAPB1InvoiceLine:, SAPB1Invoice:, SAPB1ItemMaster:ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKeySF_ERP_Salesforce_Clone_INV1, a, T, SF_ERP_Salesforce_Clone_OINV, ITS
vw_SAPB1_PriceBooksinsert-onlySAPB1PriceBooks:Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKeySF_ERP_Salesforce_Clone_OPLN
vw_SAPB1_Item_PriceBooksinsert-onlySAPB1ItemMaster:, SAPB1PriceBooks:, SAPB1ItemPriceBooks:Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKeySF_ERP_Salesforce_Clone_ITM1
vw_SAPB1_ZOHO_PriceBooksinsert-onlyPriceBooks:Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKeySF_ERP_Salesforce_Clone_OPLN
vw_SAPB1_ProductPriceListinsert + updatePriceBooks:, Products:, SAPB1_Product_PriceList:Commercient_ExternalKeySF_ERP_Salesforce_Clone_ITM1, SF_ERP_Salesforce_Clone_OPLN
vw_SAPB1_Contactsinsert-onlyaccount:, vw_SAPB1_Contact:SF_ERP_Salesforce_Clone_OCPR
vw_SAPB1_Quotesinsert-onlyaccount:, SAPB1Customer:, SAPB1Quotes:ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKeySF_ERP_Salesforce_Clone_OQUT
vw_SAPB1_QuotesDetailsinsert-onlySAPB1Quotes:, SAPB1ItemMaster:, SAPB1QuotesDetails:ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKeySF_ERP_Salesforce_Clone_QUT1, SF_ERP_Salesforce_Clone_ORDR

4. Order of work

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

  • 1 — Accounts
  • 2 — Customer
  • 3 — Address
  • 4 — Products
  • 5 — Item Master
  • 6 — Sales Order
  • 7 — Sales Order Line
  • 8 — Invoice
  • 9 — Invoice Detail
  • 10 — PriceBooks
  • 11 — ItemPriceBooks
  • 12 — Price__Book
  • 13 — SAPB1__Product_Pricebooks
  • 14 — Contacts
  • 15 — SAPB1__Quotes
  • 16 — SAPB1 Quotes Details

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_SAPB1_Account reads Account:; no template in this set writes Account:
  • vw_SAPB1_Customer reads account:, SAPB1Customer:; no template in this set writes account:, SAPB1Customer:
  • vw_SAPB1_Address reads account:, SAPB1Customer:, SAPB1Address:; no template in this set writes account:, SAPB1Customer:, SAPB1Address:
  • vw_SAPB1_Products reads Products:; no template in this set writes Products:
  • vw_SAPB1_Item reads Products:, SAPB1ItemMaster:; no template in this set writes Products:, SAPB1ItemMaster:
  • vw_SAPB1_SalesOrder reads account:, SAPB1Customer:, SAPB1SalesOrder:; no template in this set writes account:, SAPB1Customer:, SAPB1SalesOrder:
  • vw_SAPB1_SalesOrderLine reads SAPB1SalesOrder:, SAPB1ItemMaster:, SAPB1SalesOrderLine:; no template in this set writes SAPB1SalesOrder:, SAPB1ItemMaster:, SAPB1SalesOrderLine:
  • vw_SAPB1_Invoice reads account:, SAPB1Customer:, SAPB1Invoice:; no template in this set writes account:, SAPB1Customer:, SAPB1Invoice:
  • vw_SAPB1_InvoiceLine reads SAPB1InvoiceLine:, SAPB1Invoice:, SAPB1ItemMaster:; no template in this set writes SAPB1InvoiceLine:, SAPB1Invoice:, SAPB1ItemMaster:
  • vw_SAPB1_PriceBooks reads SAPB1PriceBooks:; no template in this set writes SAPB1PriceBooks:
  • vw_SAPB1_Item_PriceBooks reads SAPB1ItemMaster:, SAPB1PriceBooks:, SAPB1ItemPriceBooks:; no template in this set writes SAPB1ItemMaster:, SAPB1PriceBooks:, SAPB1ItemPriceBooks:
  • vw_SAPB1_ZOHO_PriceBooks reads PriceBooks:; no template in this set writes PriceBooks:
  • vw_SAPB1_ProductPriceList reads PriceBooks:, Products:, SAPB1_Product_PriceList:; no template in this set writes PriceBooks:, Products:, SAPB1_Product_PriceList:
  • vw_SAPB1_Contacts reads account:, vw_SAPB1_Contact:; no template in this set writes account:, vw_SAPB1_Contact:
  • vw_SAPB1_Quotes reads account:, SAPB1Customer:, SAPB1Quotes:; no template in this set writes account:, SAPB1Customer:, SAPB1Quotes:
  • vw_SAPB1_QuotesDetails reads SAPB1Quotes:, SAPB1ItemMaster:, SAPB1QuotesDetails:; no template in this set writes SAPB1Quotes:, SAPB1ItemMaster:, SAPB1QuotesDetails:

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 → Zoho CRM pairs
AccountsAccounts16CardCodeCommercient_ExternalKey__c, CardCodecommercientsapb1__Commercient_ArCustomer_Code, CardCodeBP_Code, CardNameAccount_Name, U_BP_TERRTerritory
Customercommercientsapb1__SAPB1_Customer125SFDCIDAccount, CardCodeCommercient_ExternalKey__c, CardCodeExternalKey, CardCodeName, AddIDAdd_ID
Addresscommercientsapb1__SAPB1_Address33Address,CardCode,AdresTypeCommercient_ExternalKey__c, Address,CardCode,AdresTypeExternalKey, AddressAddress, Address,CardCode,AdresTypeName, AddrTypeAddress_Type
ProductsProducts8ItemCodeCommercient_ExternalKey, ItemNameProduct_Name, ItemCodeProduct_Code, PriceUnitUnit_Price, ProductSrcProduct_Category
Sales Ordercommercientsapb1__SAPB1_Sales_Order_Header97DocEntryCommercient_ExternalKey__c, DocEntryName, AddressAddress, Address2Address_2, AtcEntryAtc_Entry
Sales Order Linecommercientsapb1__SAPB1_Sales_Order_Detail117DocEntry,LineNumCommercient_ExternalKey__c, AcctCodeAccount_Code, AddressAddress, BackOrdrBack_Order, BaseCardBase_Card
Invoicecommercientsapb1__SAPB1_Invoice_Header111DocEntryCommercient_ExternalKey__c, DocEntryName, AddressAddress, Address2Address2, AgentCodeAgent_Code
Invoice Detailcommercientsapb1__SAPB1_Invoice_Detail119invlineKeyCommercient_ExternalKey__c, AcctCodeAccount_Code__c, AddressAddress__c, BackOrdrBack_Order__c, BaseCardBase_Card__c
PriceBookscommercientsapb1__SAPB1_PriceBooks28ListNumCommercient_ExternalKey__c, ListNumExternalKey, AddCurr1Add_Currency_1, AddCurr2Add_Currency_2, BASE_NUMBase_Number
ItemPriceBookscommercientsapb1__SAPB1_Item_PriceBooks21AddPrice1Add_Price1, AddPrice2Add_Price2, BasePLNumBase_PL_Number, CurrencyCurrency_Name, Currency1Currency1
Price__BookPrice_Books5ListNumCommercient_ExternalKey__c, ListNumExternalKey, ListNamePrice Book Name, ListNamePrice_Book_Name, ValidForActive
SAPB1__Product_PricebooksProducts:Price_Books5ItemCode,PriceListCommercient_ExternalKey, ListNamePriceBookName, Pricelist_price, PriceListZOHO_PriceBookID, ItemCodePRODUCT_ID
ContactsContacts10CntctCodeCommercient_ExternalKey, CardCodeAccount_Name, PositionRole, NameLast_Name, NameFirst_Name

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:

  • Account:
  • SAPB1Customer:
  • SAPB1Address:
  • Products:
  • SAPB1ItemMaster:
  • SAPB1SalesOrder:
  • SAPB1SalesOrderLine:
  • SAPB1Invoice:
  • SAPB1InvoiceLine:
  • SAPB1PriceBooks:
  • SAPB1ItemPriceBooks:
  • PriceBooks:
  • SAPB1_Product_PriceList:
  • vw_SAPB1_Contact:
  • SAPB1Quotes:
  • SAPB1QuotesDetails:

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 SAP B1 → Zoho CRM templates set up. dlake-crmpro-zohocrm is the destination skill this page sits under: its own text is the authority for the Zoho 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.