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.
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-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
| Group | Business outcome | Objects | Source tables and views |
|---|---|---|---|
| Accounts | The templates push Accounts to Zoho CRM. | Accounts | SF_ERP_Salesforce_Clone_OCRD, SF_ERP_Salesforce_Clone_CRD1, SF_ERP_Salesforce_Clone_OCRG |
| Customer | The templates push commercientsapb1__SAPB1_Customer to Zoho CRM. | commercientsapb1__SAPB1_Customer | SF_ERP_Salesforce_Clone_OCRD |
| Address | The templates push commercientsapb1__SAPB1_Address to Zoho CRM. | commercientsapb1__SAPB1_Address | SF_ERP_Salesforce_Clone_CRD1 |
| Products | The templates push Products to Zoho CRM. | Products | SF_ERP_Salesforce_Clone_OITM, SF_ERP_Salesforce_Clone_ITM1 |
| Item Master | The templates push commercientsapb1__SAPB1_Item to Zoho CRM. | commercientsapb1__SAPB1_Item | SF_ERP_Salesforce_Clone_OITM |
| Sales Order | The templates push commercientsapb1__SAPB1_Sales_Order_Header to Zoho CRM. | commercientsapb1__SAPB1_Sales_Order_Header | SF_ERP_Salesforce_Clone_ORDR |
| Sales Order Line | The templates push commercientsapb1__SAPB1_Sales_Order_Detail to Zoho CRM. | commercientsapb1__SAPB1_Sales_Order_Detail | SF_ERP_Salesforce_Clone_RDR1, R, SF_ERP_Salesforce_Clone_ORDR |
| Invoice | The templates push commercientsapb1__SAPB1_Invoice_Header to Zoho CRM. | commercientsapb1__SAPB1_Invoice_Header | SF_ERP_Salesforce_Clone_OINV |
| Invoice Detail | The templates push commercientsapb1__SAPB1_Invoice_Detail to Zoho CRM. | commercientsapb1__SAPB1_Invoice_Detail | SF_ERP_Salesforce_Clone_INV1, a, T, SF_ERP_Salesforce_Clone_OINV, ITS, selfID |
| PriceBooks | The templates push commercientsapb1__SAPB1_PriceBooks to Zoho CRM. | commercientsapb1__SAPB1_PriceBooks | SF_ERP_Salesforce_Clone_OPLN |
| ItemPriceBooks | The templates push commercientsapb1__SAPB1_Item_PriceBooks to Zoho CRM. | commercientsapb1__SAPB1_Item_PriceBooks | SF_ERP_Salesforce_Clone_ITM1 |
| Price__Book | The templates push Price_Books to Zoho CRM. | Price_Books | SF_ERP_Salesforce_Clone_OPLN |
| SAPB1__Product_Pricebooks | The templates push Products:Price_Books to Zoho CRM. | Products:Price_Books | SF_ERP_Salesforce_Clone_ITM1, SF_ERP_Salesforce_Clone_OPLN |
| Contacts | The templates push Contacts to Zoho CRM. | Contacts | SF_ERP_Salesforce_Clone_OCPR |
| SAPB1__Quotes | The templates push commercientsapb1__SAPB1_Quotes to Zoho CRM. | commercientsapb1__SAPB1_Quotes | SF_ERP_Salesforce_Clone_OQUT |
| SAPB1 Quotes Details | The templates push commercientsapb1__SAPB1_Quotes_Details to Zoho CRM. | commercientsapb1__SAPB1_Quotes_Details | SF_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 name | CRM_Object_API_Name | CRM_PK_API_Name | Sync_Order | TimeStamp_Prefix | SQL_Query target | field prefix / postfix |
|---|---|---|---|---|---|---|
| Accounts | Accounts | BP_Code | 1 | Account: | vw_SAPB1_Account | '' / __c |
| Customer | commercientsapb1__SAPB1_Customer | Commercient_ExternalKey | 2 | SAPB1Customer: | vw_SAPB1_Customer | commercientsapb1__ / __c |
| Address | commercientsapb1__SAPB1_Address | Commercient_ExternalKey | 3 | SAPB1Address: | vw_SAPB1_Address | commercientsapb1__ / __c |
| Products | Products | Commercient_ExternalKey | 4 | Products: | vw_SAPB1_Products | '' / __c |
| Item Master | commercientsapb1__SAPB1_Item | Commercient_ExternalKey | 5 | SAPB1ItemMaster: | vw_SAPB1_Item | commercientsapb1__ / __c |
| Sales Order | commercientsapb1__SAPB1_Sales_Order_Header | Commercient_ExternalKey | 6 | SAPB1SalesOrder: | vw_SAPB1_SalesOrder | commercientsapb1__ / __c |
| Sales Order Line | commercientsapb1__SAPB1_Sales_Order_Detail | Commercient_ExternalKey | 7 | SAPB1SalesOrderLine: | vw_SAPB1_SalesOrderLine | commercientsapb1__ / __c |
| Invoice | commercientsapb1__SAPB1_Invoice_Header | Commercient_ExternalKey | 8 | SAPB1Invoice: | vw_SAPB1_Invoice | commercientsapb1__ / __c |
| Invoice Detail | commercientsapb1__SAPB1_Invoice_Detail | Commercient_ExternalKey | 9 | SAPB1InvoiceLine: | vw_SAPB1_InvoiceLine | commercientsapb1__ / __c |
| PriceBooks | commercientsapb1__SAPB1_PriceBooks | Commercient_ExternalKey | 10 | SAPB1PriceBooks: | vw_SAPB1_PriceBooks | commercientsapb1__ / __c |
| ItemPriceBooks | commercientsapb1__SAPB1_Item_PriceBooks | Commercient_ExternalKey | 11 | SAPB1ItemPriceBooks: | vw_SAPB1_Item_PriceBooks | commercientsapb1__ / '' |
| Price__Book | Price_Books | Commercient_ExternalKey | 12 | PriceBooks: | vw_SAPB1_ZOHO_PriceBooks | '' / __c |
| SAPB1__Product_Pricebooks | Products:Price_Books | Commercient_ExternalKey | 13 | SAPB1_Product_PriceList: | vw_SAPB1_ProductPriceList | '' / __c |
| Contacts | Contacts | Commercient_ExternalKey | 14 | vw_SAPB1_Contact: | vw_SAPB1_Contacts | '' / __c |
| SAPB1__Quotes | commercientsapb1__SAPB1_Quotes | Commercient_ExternalKey | 15 | SAPB1Quotes: | vw_SAPB1_Quotes | commercientsapb1__ / '' |
| SAPB1 Quotes Details | commercientsapb1__SAPB1_Quotes_Details | Commercient_ExternalKey | 16 | SAPB1QuotesDetails: | vw_SAPB1_QuotesDetails | commercientsapb1__ / '' |
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.
| View | Change detection | Repository key | Reads other prefixes | Identity column | Source tables |
|---|---|---|---|---|---|
vw_SAPB1_Account | insert-only | — | Account: | Commercient_ExternalKey__c, BP_Code | SF_ERP_Salesforce_Clone_OCRD, SF_ERP_Salesforce_Clone_CRD1, SF_ERP_Salesforce_Clone_OCRG |
vw_SAPB1_Customer | insert-only | — | account:, SAPB1Customer: | Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OCRD |
vw_SAPB1_Address | insert-only | — | account:, SAPB1Customer:, SAPB1Address: | Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_CRD1 |
vw_SAPB1_Products | insert-only | — | Products: | Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OITM, SF_ERP_Salesforce_Clone_ITM1 |
vw_SAPB1_Item | insert-only | — | Products:, SAPB1ItemMaster: | Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OITM |
vw_SAPB1_SalesOrder | insert-only | — | account:, SAPB1Customer:, SAPB1SalesOrder: | ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_ORDR |
vw_SAPB1_SalesOrderLine | insert-only | — | SAPB1SalesOrder:, SAPB1ItemMaster:, SAPB1SalesOrderLine: | ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_RDR1, R, SF_ERP_Salesforce_Clone_ORDR |
vw_SAPB1_Invoice | insert-only | — | account:, SAPB1Customer:, SAPB1Invoice: | ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OINV |
vw_SAPB1_InvoiceLine | insert-only | — | SAPB1InvoiceLine:, SAPB1Invoice:, SAPB1ItemMaster: | ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_INV1, a, T, SF_ERP_Salesforce_Clone_OINV, ITS |
vw_SAPB1_PriceBooks | insert-only | — | SAPB1PriceBooks: | Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OPLN |
vw_SAPB1_Item_PriceBooks | insert-only | — | SAPB1ItemMaster:, SAPB1PriceBooks:, SAPB1ItemPriceBooks: | Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_ITM1 |
vw_SAPB1_ZOHO_PriceBooks | insert-only | — | PriceBooks: | Commercient_ExternalKey__c, ExternalKey, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OPLN |
vw_SAPB1_ProductPriceList | insert + update | — | PriceBooks:, Products:, SAPB1_Product_PriceList: | Commercient_ExternalKey | SF_ERP_Salesforce_Clone_ITM1, SF_ERP_Salesforce_Clone_OPLN |
vw_SAPB1_Contacts | insert-only | — | account:, vw_SAPB1_Contact: | — | SF_ERP_Salesforce_Clone_OCPR |
vw_SAPB1_Quotes | insert-only | — | account:, SAPB1Customer:, SAPB1Quotes: | ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKey | SF_ERP_Salesforce_Clone_OQUT |
vw_SAPB1_QuotesDetails | insert-only | — | SAPB1Quotes:, SAPB1ItemMaster:, SAPB1QuotesDetails: | ExternalKey, Commercient_ExternalKey__c, Commercient_ExternalKey | SF_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— Accounts2— Customer3— Address4— Products5— Item Master6— Sales Order7— Sales Order Line8— Invoice9— Invoice Detail10— PriceBooks11— ItemPriceBooks12— Price__Book13— SAPB1__Product_Pricebooks14— Contacts15— SAPB1__Quotes16— 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_AccountreadsAccount:; no template in this set writesAccount:vw_SAPB1_Customerreadsaccount:,SAPB1Customer:; no template in this set writesaccount:,SAPB1Customer:vw_SAPB1_Addressreadsaccount:,SAPB1Customer:,SAPB1Address:; no template in this set writesaccount:,SAPB1Customer:,SAPB1Address:vw_SAPB1_ProductsreadsProducts:; no template in this set writesProducts:vw_SAPB1_ItemreadsProducts:,SAPB1ItemMaster:; no template in this set writesProducts:,SAPB1ItemMaster:vw_SAPB1_SalesOrderreadsaccount:,SAPB1Customer:,SAPB1SalesOrder:; no template in this set writesaccount:,SAPB1Customer:,SAPB1SalesOrder:vw_SAPB1_SalesOrderLinereadsSAPB1SalesOrder:,SAPB1ItemMaster:,SAPB1SalesOrderLine:; no template in this set writesSAPB1SalesOrder:,SAPB1ItemMaster:,SAPB1SalesOrderLine:vw_SAPB1_Invoicereadsaccount:,SAPB1Customer:,SAPB1Invoice:; no template in this set writesaccount:,SAPB1Customer:,SAPB1Invoice:vw_SAPB1_InvoiceLinereadsSAPB1InvoiceLine:,SAPB1Invoice:,SAPB1ItemMaster:; no template in this set writesSAPB1InvoiceLine:,SAPB1Invoice:,SAPB1ItemMaster:vw_SAPB1_PriceBooksreadsSAPB1PriceBooks:; no template in this set writesSAPB1PriceBooks:vw_SAPB1_Item_PriceBooksreadsSAPB1ItemMaster:,SAPB1PriceBooks:,SAPB1ItemPriceBooks:; no template in this set writesSAPB1ItemMaster:,SAPB1PriceBooks:,SAPB1ItemPriceBooks:vw_SAPB1_ZOHO_PriceBooksreadsPriceBooks:; no template in this set writesPriceBooks:vw_SAPB1_ProductPriceListreadsPriceBooks:,Products:,SAPB1_Product_PriceList:; no template in this set writesPriceBooks:,Products:,SAPB1_Product_PriceList:vw_SAPB1_Contactsreadsaccount:,vw_SAPB1_Contact:; no template in this set writesaccount:,vw_SAPB1_Contact:vw_SAPB1_Quotesreadsaccount:,SAPB1Customer:,SAPB1Quotes:; no template in this set writesaccount:,SAPB1Customer:,SAPB1Quotes:vw_SAPB1_QuotesDetailsreadsSAPB1Quotes:,SAPB1ItemMaster:,SAPB1QuotesDetails:; no template in this set writesSAPB1Quotes:,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.
| Template | Object | Mapped fields | First ERP → Zoho CRM pairs |
|---|---|---|---|
| Accounts | Accounts | 16 | CardCode → Commercient_ExternalKey__c, CardCode → commercientsapb1__Commercient_ArCustomer_Code, CardCode → BP_Code, CardName → Account_Name, U_BP_TERR → Territory |
| Customer | commercientsapb1__SAPB1_Customer | 125 | SFDCID → Account, CardCode → Commercient_ExternalKey__c, CardCode → ExternalKey, CardCode → Name, AddID → Add_ID |
| Address | commercientsapb1__SAPB1_Address | 33 | Address,CardCode,AdresType → Commercient_ExternalKey__c, Address,CardCode,AdresType → ExternalKey, Address → Address, Address,CardCode,AdresType → Name, AddrType → Address_Type |
| Products | Products | 8 | ItemCode → Commercient_ExternalKey, ItemName → Product_Name, ItemCode → Product_Code, PriceUnit → Unit_Price, ProductSrc → Product_Category |
| Sales Order | commercientsapb1__SAPB1_Sales_Order_Header | 97 | DocEntry → Commercient_ExternalKey__c, DocEntry → Name, Address → Address, Address2 → Address_2, AtcEntry → Atc_Entry |
| Sales Order Line | commercientsapb1__SAPB1_Sales_Order_Detail | 117 | DocEntry,LineNum → Commercient_ExternalKey__c, AcctCode → Account_Code, Address → Address, BackOrdr → Back_Order, BaseCard → Base_Card |
| Invoice | commercientsapb1__SAPB1_Invoice_Header | 111 | DocEntry → Commercient_ExternalKey__c, DocEntry → Name, Address → Address, Address2 → Address2, AgentCode → Agent_Code |
| Invoice Detail | commercientsapb1__SAPB1_Invoice_Detail | 119 | invlineKey → Commercient_ExternalKey__c, AcctCode → Account_Code__c, Address → Address__c, BackOrdr → Back_Order__c, BaseCard → Base_Card__c |
| PriceBooks | commercientsapb1__SAPB1_PriceBooks | 28 | ListNum → Commercient_ExternalKey__c, ListNum → ExternalKey, AddCurr1 → Add_Currency_1, AddCurr2 → Add_Currency_2, BASE_NUM → Base_Number |
| ItemPriceBooks | commercientsapb1__SAPB1_Item_PriceBooks | 21 | AddPrice1 → Add_Price1, AddPrice2 → Add_Price2, BasePLNum → Base_PL_Number, Currency → Currency_Name, Currency1 → Currency1 |
| Price__Book | Price_Books | 5 | ListNum → Commercient_ExternalKey__c, ListNum → ExternalKey, ListName → Price Book Name, ListName → Price_Book_Name, ValidFor → Active |
| SAPB1__Product_Pricebooks | Products:Price_Books | 5 | ItemCode,PriceList → Commercient_ExternalKey, ListName → PriceBookName, Price → list_price, PriceList → ZOHO_PriceBookID, ItemCode → PRODUCT_ID |
| Contacts | Contacts | 10 | CntctCode → Commercient_ExternalKey, CardCode → Account_Name, Position → Role, Name → Last_Name, Name → First_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.