Source ERP · 74 of 105

CRMPro → Salesforce — Sage 100 2017: what the shipped templates set up

Read it in the terminal with "dlake skills show dlake-crmpro-salesforce/erps/sage-100-2017". It extends the dlake-crmpro-salesforce skill, which holds what is true whatever the source ERP.

CRMPro → Salesforce — Sage 100 2017: 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-salesforce is the destination skill this page is a child of, and the authority for the Salesforce 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-salesforce/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 → Salesforce 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
GET USERThe templates push users to Salesforce. New records are created, existing ones updated, and records removed in the ERP are deleted.users
AccountIn addition to creating the Account record from your ERP customer records, Commercient syncs over the entire Accounting AR Customer record into a Commercient AR Customer object which is a Managed Custom Object (MCO). A lookup field is provided to lookup to the default AR Customer record MCO from the Account record. New records are created and existing ones updated; none are deleted.Account, Contact, CommercientSF8__AR_CUSTOMER__c, CommercientSF8__SAGE100_SalesPerson__cSF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS, SF_ERP_Salesforce_Clone_AR_CUSTOMERCONTACT, SF_ERP_Salesforce_Clone_AR_SALESPERSON
AR Invoice PaymentsCommercient Syncs the payment details that are held in the receivables file and held against an invoice in the ERP. The amount received from a customer, the date of payment, the method of payment, whether partial or full payment, etc New records are created and existing ones updated; none are deleted.CommercientSF8__AR_TRANSACTIONPAYMENTHISTORY__cSF_ERP_Salesforce_Clone_AR_TRANSACTIONPAYMENTHISTORY
CRM Opportunity and LineERP SO_SALESORDERHEADER, SO_SALESORDERDETAIL data becomes Opportunity, OpportunityLineItem in Salesforce. New records are created and existing ones updated; none are deleted.Opportunity, OpportunityLineItemSF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, CommercientFlags, SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL
CRM Quote and LineThe templates push Quote, QuoteLineItem to Salesforce. New records are created and existing ones updated; none are deleted.Quote, QuoteLineItemSF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, CommercientFlags, SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_CI_EXTENDEDDESCRIPTION
CRM VendorThe templates push Account to Salesforce. New records are created and existing ones updated; none are deleted.AccountSalesforce, SF_ERP_Salesforce_Clone_AP_VENDOR
Customer Multi Ship AddressesIf you are using multiple ship to addresses for a given AR Customer in your ERP system then you will be able to see all the addresses inside the CRM Account screen in a Commercient Multi Ship To Address MCO related list. New records are created and existing ones updated; none are deleted.CommercientSF8__SO_SHIPTOADDRESS__cSF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS
ProductThe templates push CommercientSF8__SAGE100_CI_Item__c, CommercientSF8__SAGE100_ITEMWAREHOUSE__c, Product2 to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF8__SAGE100_CI_Item__c, CommercientSF8__SAGE100_ITEMWAREHOUSE__c, Product2SF_ERP_Salesforce_Clone_CI_ITEM, SF_ERP_Salesforce_Clone_IM_ITEMWAREHOUSE
Invoice History HeadersInvoice line item details are synced in their entirety to the Commercient Invoice Details MCO or the Invoice History Details MCO based on your ERP system functionality. New records are created and existing ones updated; none are deleted.CommercientSF8__AR_INVOICEHISTORYDETAIL__c, CommercientSF8__AR_INVOICEHISTORYHEADER__cSF_ERP_Salesforce_Clone_AR_INVOICEHISTORYDETAIL, SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_AR_OPENINVOICE, SF_ERP_Salesforce_Clone_AR_SALESPERSON, CommercientFlags
Open AR Invoice HeaderBoth Open and Historical invoices are synchronized. Open invoice changes, such as a balance change, or a terms change are reflected in the CRM as they sync based on the frequency of the sync you have chosen (e.g. every hour for example). New records are created and existing ones updated; none are deleted.CommercientSF8__SAGE100_AR_OPENINVOICE__cSF_ERP_Salesforce_Clone_AR_OPENINVOICE
PricebookThe templates push PricebookEntry to Salesforce. New records are created and existing ones updated; none are deleted.PricebookEntrySF_ERP_Salesforce_Clone_CI_ITEM
Purchase Invoice/AP Invoice DetailsThe templates push CommercientSF8__SAGE100_AP_INVOICEHISTORYDETAIL__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF8__SAGE100_AP_INVOICEHISTORYDETAIL__cSF_ERP_Salesforce_Clone_AP_INVOICEHISTORYDETAIL
Purchase Invoice/AP Invoice HeaderThe templates push CommercientSF8__SAGE100_AP_INVOICEHISTORYHEADER__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF8__SAGE100_AP_INVOICEHISTORYHEADER__cSF_ERP_Salesforce_Clone_AP_INVOICEHISTORYHEADER, CommercientFlags
Purchase OrderThe templates push CommercientSF8__SAGE100_PO_PURCHASEORDERHEADER__c, CommercientSF8__SAGE100_PO_PURCHASEORDERDETAIL__c, PO_PurchaseOrderHistoryHeader__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF8__SAGE100_PO_PURCHASEORDERHEADER__c, CommercientSF8__SAGE100_PO_PURCHASEORDERDETAIL__c, PO_PurchaseOrderHistoryHeader__cSF_ERP_Salesforce_Clone_PO_PURCHASEORDERHEADER, SF_ERP_Salesforce_Clone_PO_PURCHASEORDERDETAIL, SF_ERP_Salesforce_Clone_PO_PURCHASEORDERHISTORYHEADER
Purchase Order LineThe templates push PO_PurchaseOrderHistoryDetail__c to Salesforce. New records are created and existing ones updated; none are deleted.PO_PurchaseOrderHistoryDetail__cSF_ERP_Salesforce_Clone_PO_PURCHASEORDERHISTORYDETAIL
SalesorderThe templates push CommercientSF8__SO_SALESORDERDETAIL__c, CommercientSF8__SAGE100_SALESORDERHISTORYDETAIL__c, CommercientSF8__SO_SALESORDERHEADER__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF8__SO_SALESORDERDETAIL__c, CommercientSF8__SAGE100_SALESORDERHISTORYDETAIL__c, CommercientSF8__SO_SALESORDERHEADER__c, CommercientSF8__SAGE100_SALESORDERHISTORYHEADER__cSF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, SF_ERP_Salesforce_Clone_SO_SalesOrderHistoryDetail, SF_ERP_Salesforce_Clone_SO_SalesOrderHistoryHeader, CommercientFlags, SF_ERP_Salesforce_Clone_AR_CUSTOMER
VendorThe templates push CommercientSF8__SAGE100_AP_VENDOR__c to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF8__SAGE100_AP_VENDOR__cSF_ERP_Salesforce_Clone_AP_VENDOR

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
GET USERusers0vw_SAGE1002017_User1=0'' / ''1
Sales PersonCommercientSF8__SAGE100_SalesPerson__cCommercientSF8__ExternalKey__c1vwSalesPersonvw_SAGE1002017_SalesPersonCommercientSF8__ / __C
AccountAccountCommercientSF__Commercient_ArCustomerCode__c2vw_SAGE1002017_Accountvw_SAGE1002017_Account'' / ''
CustomerCommercientSF8__AR_CUSTOMER__cCommercientSF8__ExternalKey__c3vw_SAGE1002017_Customervw_SAGE1002017_CustomerCommercientSF8__ / __C
AddressCommercientSF8__SO_SHIPTOADDRESS__cCommercientSF8__ExternalKey__c4vw_SAGE1002017_SO_SHIPTOADDRESSvw_SAGE1002017_SO_SHIPTOADDRESSCommercientSF8__ / __c
AccountCustomerLookupAccountCommercientSF__Commercient_ArCustomerCode__c5vw_SAGE1002017_CustomerToAccountLookupvw_SAGE1002017_CustomerToAccountLookup'' / ''
ProductProduct2CommercientSF__ExternalKey__c6vw_SAGE1002017_Productvw_SAGE1002017_Product'' / ''
CIItemCommercientSF8__SAGE100_CI_Item__cCommercientSF8__ExternalKeys__c7vw_SAGE1002017_CI_Item:vw_SAGE1002017_CI_ItemCommercientSF8__ / __c
SalesOrderCommercientSF8__SO_SALESORDERHEADER__cCommercientSF8__SALESORDERNO__c8vw_SAGE1002017_SalesOrderHeadervw_SAGE1002017_SalesOrderHeaderCommercientSF8__ / __c
SalesOrderLineCommercientSF8__SO_SALESORDERDETAIL__cCommercientSF8__ExternalKey__c9vw_SAGE1002017_SalesOrderLinevw_SAGE1002017_SalesOrderLineCommercientSF8__ / __c
SalesOrder History HeaderCommercientSF8__SAGE100_SALESORDERHISTORYHEADER__cCommercientSF8__ExternalKey__c10vw_SAGE1002017_SalesOrderHistoryHeadervw_SAGE1002017_SalesOrderHistoryHeaderCommercientSF8__ / __C
SalesOrder History LineCommercientSF8__SAGE100_SALESORDERHISTORYDETAIL__cCommercientSF8__ExternalKey__c11vw_SAGE1002017_SalesOrderHistoryLinevw_SAGE1002017_SalesOrderHistoryLineCommercientSF8__ / __C
Invoice HeaderCommercientSF8__AR_INVOICEHISTORYHEADER__cCommercientSF8__ExternalKey__c12vw_SAGE1002017_InvoiceHeadervw_SAGE1002017_InvoiceHeaderCommercientSF8__ / __C
Invoice DetailsCommercientSF8__AR_INVOICEHISTORYDETAIL__cCommercientSF8__ExternalKey__c13vw_SAGE1002017_InvoiceLinevw_SAGE1002017_InvoiceLineCommercientSF8__ / __C
Item WarehouseCommercientSF8__SAGE100_ITEMWAREHOUSE__cCommercientSF8__ExternalKey__c14vw_SAGE1002017_ITEMWAREHOUSEvw_SAGE1002017_ItemWarehouseCommercientSF8__ / __c
Transcation Payment HistoryCommercientSF8__AR_TRANSACTIONPAYMENTHISTORY__cCommercientSF8__ExternalKey__c18vw_InvoicePaymentvw_SAGE1002017_InvoicePaymentCommercientSF8__ / __C
Create Standard PriceBookPricebookEntryExternalKey__c19vw_SAGE1002017_PriceBookEntryvw_SAGE1002017_PriceBookEntryCreate'' / ''
Update Standard PriceBookPricebookEntryExternalKey__c20vw_SAGE1002017_PriceBookEntryvw_SAGE1002017_PriceBookEntryUpdate'' / ''
Opportunity HeaderOpportunityExternalKey__c21vw_Opportunity_Headervw_SAGE1002017_Opportunity_Header'' / ''
Opportunity LineOpportunityLineItemExternalKey__c22vw_Opportunity_Detailvw_SAGE1002222_Opportunity_Line'' / ''
SAGE100 Ar Open InvoiceCommercientSF8__SAGE100_AR_OPENINVOICE__cCommercientSF8__ExternalKey__c22vw_SAGE1002017_OpenInvoicevw_SAGE1002017_OpenInvoiceCommercientSF8__ / __c1
CONTACTContactCommercientSF8__ExternalKey__c23vw_SAGE1002017_Contactvw_SAGE1002017_Contact'' / ''1
Quote_HeaderQuoteExternalKey__c23vw_Quote_Headervw_SAGE1002017_Quote_Header'' / ''
Quote_LineItemQuoteLineItemExternalKey__c24vw_Quote_Detailvw_SAGE1002017_Quote_Line'' / ''
Vendor AccountAccountCommercientSF__Commercient_ArCustomerCode__c25vw_SAGE1002017_VendorAccountvw_SAGE1002017_VendorAccount'' / ''1
Vendor SyncCommercientSF8__SAGE100_AP_VENDOR__cCommercientSF8__ExternalKey__c26vw_SAGE1002017_Vendorvw_SAGE1002017_VendorCommercientSF8__ / __c1
PO HeaderCommercientSF8__SAGE100_PO_PURCHASEORDERHEADER__cCommercientSF8__ExternalKey__c27vw_SAGE1002017_PURCHASEORDERHEADERvw_SAGE1002017_PURCHASEORDERHEADERCommercientSF8__ / __c1
PO LineCommercientSF8__SAGE100_PO_PURCHASEORDERDETAIL__cCommercientSF8__ExternalKey__c28vw_SAGE1002017_PURCHASEORDERDETAILvw_SAGE1002017_PURCHASEORDERDETAILCommercientSF8__ / __c1
Sage 100 Purchase History HeaderPO_PurchaseOrderHistoryHeader__cExternalKey__c29vw_SAGE1002017_PO_PurchaseOrderHistoryHeadervw_SAGE1002017_PO_PurchaseOrderHistoryHeader'' / __c1
Sage 100 Purchase History DetailPO_PurchaseOrderHistoryDetail__cExternalKey__c30vw_SAGE1002017_PO_PurchaseOrderHistoryDetailvw_SAGE1002017_PO_PurchaseOrderHistoryDetail'' / __c1
Sage AP Invoice History HeaderCommercientSF8__SAGE100_AP_INVOICEHISTORYHEADER__cCommercientSF8__ExternalKey__c31vw_SAGE1002017_AP_INVOICEHISTORYHEADERvw_SAGE1002017_AP_INVOICEHISTORYHEADERCommercientSF8__ / __c1
Sage AP Invoice History LineCommercientSF8__SAGE100_AP_INVOICEHISTORYDETAIL__cCommercientSF8__ExternalKey__c32vw_SAGE1002017_AP_INVOICEHISTORYDETAILvw_SAGE1002017_AP_INVOICEHISTORYDETAILCommercientSF8__ / __c1

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, Sync_Batch_Size 200. Text columns a template does not use are inserted as '' rather than left NULL. Get_SOQL_Query carries a query on GET USER, Create Standard PriceBook — those rows read records back from Salesforce as well as pushing. On Opportunity Line the SQL_Query names a view the same template’s CreateViewQuery does not create (vw_SAGE1002222_Opportunity_Line against vw_SAGE1002017_Opportunity_Line), 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_SAGE1002017_SalesPersoninsert + updatevwSalesPerson:ExternalKeySF_ERP_Salesforce_Clone_AR_SALESPERSON
vw_SAGE1002017_Accountinsert + updatevw_SAGE1002017_Account:vw_SAGE1002017_User:CommercientSF__Commercient_ArCustomerCode__cSF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS
vw_SAGE1002017_Customerinsert + updatevw_SAGE1002017_Customer:vw_SAGE1002017_Account:, vwSalesPerson:SF_ERP_Salesforce_Clone_AR_CUSTOMER
vw_SAGE1002017_SO_SHIPTOADDRESSinsert + updatevw_SAGE1002017_SO_SHIPTOADDRESS:vw_SAGE1002017_Account:, vw_SAGE1002017_Customer:ExternalKeySF_ERP_Salesforce_Clone_SO_SHIPTOADDRESS
vw_SAGE1002017_CustomerToAccountLookupinsert + updatevw_SAGE1002017_CustomerToAccountLookup:vw_SAGE1002017_Customer:SF_ERP_Salesforce_Clone_AR_CUSTOMER
vw_SAGE1002017_Productinsert + updatevw_SAGE1002017_Product:SF_ERP_Salesforce_Clone_CI_ITEM
vw_SAGE1002017_CI_Iteminsert + updatevw_SAGE1002017_Product:, vw_SAGE1002017_CI_Item:ExternalKeysSF_ERP_Salesforce_Clone_CI_ITEM
vw_SAGE1002017_SalesOrderHeaderinsert + updatevw_SAGE1002017_SalesOrderHeader:vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vwSalesPerson:SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, CommercientFlags
vw_SAGE1002017_SalesOrderLineinsert + updatevw_SAGE1002017_SalesOrderLine:vw_SAGE1002017_CI_Item:, vw_SAGE1002017_SalesOrderHeader:SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER
vw_SAGE1002017_SalesOrderHistoryHeaderinsert + updatevw_SAGE1002017_SalesOrderHistoryHeader:vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:SF_ERP_Salesforce_Clone_SO_SalesOrderHistoryHeader, SF_ERP_Salesforce_Clone_AR_CUSTOMER
vw_SAGE1002017_SalesOrderHistoryLineinsert + updatevw_SAGE1002017_SalesOrderHistoryLine:vw_SAGE1002017_CI_Item:, vw_SAGE1002017_SalesOrderHistoryHeader:SF_ERP_Salesforce_Clone_SO_SalesOrderHistoryDetail, SF_ERP_Salesforce_Clone_SO_SalesOrderHistoryHeader
vw_SAGE1002017_InvoiceHeaderinsert + updatevw_SAGE1002017_InvoiceHeader:vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vwSalesPerson:SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYHEADER, SF_ERP_Salesforce_Clone_AR_CUSTOMER, SF_ERP_Salesforce_Clone_AR_OPENINVOICE, SF_ERP_Salesforce_Clone_AR_SALESPERSON, CommercientFlags
vw_SAGE1002017_InvoiceLineinsert + updatevw_SAGE1002017_InvoiceLine:vw_SAGE1002017_InvoiceHeader:, vw_SAGE1002017_CI_Item:SF_ERP_Salesforce_Clone_AR_INVOICEHISTORYDETAIL
vw_SAGE1002017_ItemWarehouseinsert + updatevw_SAGE1002017_ITEMWAREHOUSE:vw_SAGE1002017_CI_Item:, vw_SAGE1002017_Product:ExternalKeySF_ERP_Salesforce_Clone_IM_ITEMWAREHOUSE
vw_SAGE1002017_InvoicePaymentinsert + updatevw_InvoicePayment:vw_Customer:, vw_Account:, vw_InvoiceHeader:SF_ERP_Salesforce_Clone_AR_TRANSACTIONPAYMENTHISTORY
vw_SAGE1002017_PriceBookEntryCreateinsert-onlyvw_SAGE1002017_PriceBookEntry:vw_SAGE1002017_Product:ExternalKey__cSF_ERP_Salesforce_Clone_CI_ITEM
vw_SAGE1002017_PriceBookEntryUpdateinsert + updatevw_SAGE1002017_PriceBookEntry:vw_SAGE1002017_Product:ExternalKey__cSF_ERP_Salesforce_Clone_CI_ITEM
vw_SAGE1002017_Opportunity_Headerinsert + updatevw_Opportunity_Header:vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vwSO_SALESORDERHEADER:, vwSalesPerson:SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, CommercientFlags
vw_SAGE1002017_Opportunity_Lineinsert-onlyvw_Opportunity_Detail:vw_Opportunity_Header:, vw_SAGE1002017_Product:, vw_SAGE1002017_PriceBookEntry:SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL
vw_SAGE1002017_OpenInvoiceinsert + updatevw_SAGE1002017_OpenInvoice:vw_SAGE1002017_Account:, vw_SAGE1002017_Customer:, vwSalesPerson:ExternalKeySF_ERP_Salesforce_Clone_AR_OPENINVOICE
vw_SAGE1002017_Contactinsert + updatevw_SAGE1002017_Contact:vw_SAGE1002017_Account:SF_ERP_Salesforce_Clone_AR_CUSTOMERCONTACT
vw_SAGE1002017_Quote_Headerinsert + updatevw_Quote_Header:vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vw_Opportunity_Header:, vw_SAGE1002017_Terms:, vwSalesPerson:SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER, CommercientFlags
vw_SAGE1002017_Quote_Lineinsert-onlyvw_Quote_Detail:vw_Quote_Header:, vw_SAGE1002017_Product:, vw_SAGE1002017_PriceBookEntry:SF_ERP_Salesforce_Clone_SO_SALESORDERDETAIL, SF_ERP_Salesforce_Clone_CI_EXTENDEDDESCRIPTION, SF_ERP_Salesforce_Clone_SO_SALESORDERHEADER
vw_SAGE1002017_VendorAccountinsert + updatevw_SAGE1002017_VendorAccount:CommercientSF__Commercient_ArCustomerCode__cSalesforce, SF_ERP_Salesforce_Clone_AP_VENDOR
vw_SAGE1002017_Vendorinsert + updatevw_SAGE1002017_Vendor:vw_SAGE1002017_VendorAccount:SF_ERP_Salesforce_Clone_AP_VENDOR
vw_SAGE1002017_PURCHASEORDERHEADERinsert + updatevw_SAGE1002017_PURCHASEORDERHEADER:vw_SAGE1002017_Vendor:, vw_SAGE1002017_VendorAccount:, vw_SAGE1002017_SO_SHIPTOADDRESS:SF_ERP_Salesforce_Clone_PO_PURCHASEORDERHEADER
vw_SAGE1002017_PURCHASEORDERDETAILinsert + updatevw_SAGE1002017_PURCHASEORDERDETAIL:vw_SAGE1002017_PURCHASEORDERHEADER:, vw_SAGE1002017_CI_Item:SF_ERP_Salesforce_Clone_PO_PURCHASEORDERDETAIL
vw_SAGE1002017_PO_PurchaseOrderHistoryHeaderinsert + updatevw_SAGE1002017_PO_PurchaseOrderHistoryHeader:vw_SAGE1002017_VendorAccount:, vw_SAGE1002017_Vendor:SF_ERP_Salesforce_Clone_PO_PURCHASEORDERHISTORYHEADER
vw_SAGE1002017_PO_PurchaseOrderHistoryDetailinsert + updatevw_SAGE1002017_PO_PurchaseOrderHistoryDetail:vw_SAGE1002017_CI_Item:, vw_SAGE1002017_PO_PurchaseOrderHistoryHeader:SF_ERP_Salesforce_Clone_PO_PURCHASEORDERHISTORYDETAIL
vw_SAGE1002017_AP_INVOICEHISTORYHEADERinsert + updatevw_SAGE1002017_AP_INVOICEHISTORYHEADER:vw_SAGE1002017_Vendor:, vw_SAGE1002017_VendorAccount:SF_ERP_Salesforce_Clone_AP_INVOICEHISTORYHEADER, CommercientFlags
vw_SAGE1002017_AP_INVOICEHISTORYDETAILinsert + updatevw_SAGE1002017_AP_INVOICEHISTORYDETAIL:vw_SAGE1002017_AP_INVOICEHISTORYHEADER:SF_ERP_Salesforce_Clone_AP_INVOICEHISTORYDETAIL

The repository key these templates build is <TimeStamp_Prefix>:<key>. The literal in the view and the TimeStamp_Prefix on the configuration row have to be the same string, case included.

4. Order of work

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

  • 0 — GET USER
  • 1 — Sales Person
  • 2 — Account
  • 3 — Customer
  • 4 — Address
  • 5 — AccountCustomerLookup
  • 6 — Product
  • 7 — CIItem
  • 8 — SalesOrder
  • 9 — SalesOrderLine
  • 10 — SalesOrder History Header
  • 11 — SalesOrder History Line
  • 12 — Invoice Header
  • 13 — Invoice Details
  • 14 — Item Warehouse
  • 18 — Transcation Payment History
  • 19 — Create Standard PriceBook
  • 20 — Update Standard PriceBook
  • 21 — Opportunity Header
  • 22 — Opportunity Line, SAGE100 Ar Open Invoice
  • 23 — CONTACT, Quote_Header
  • 24 — Quote_LineItem
  • 25 — Vendor Account
  • 26 — Vendor Sync
  • 27 — PO Header
  • 28 — PO Line
  • 29 — Sage 100 Purchase History Header
  • 30 — Sage 100 Purchase History Detail
  • 31 — Sage AP Invoice History Header
  • 32 — Sage AP Invoice History Line

Several of these rows share a Sync_Order value: each template group carries its own numbering, so give the imported processes an order across the whole set rather than taking the template values as one.

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_Account reads vw_SAGE1002017_User:
  • vw_SAGE1002017_CustomerToAccountLookup reads vw_SAGE1002017_Customer:
  • vw_SAGE1002017_InvoicePayment reads vw_Customer:, vw_Account:, vw_InvoiceHeader:; no template in this set writes vw_Customer:, vw_Account:, vw_InvoiceHeader:
  • vw_SAGE1002017_Contact reads vw_SAGE1002017_Account:
  • vw_SAGE1002017_Opportunity_Header reads vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vwSO_SALESORDERHEADER:, vwSalesPerson:; no template in this set writes vwSO_SALESORDERHEADER:
  • vw_SAGE1002017_Opportunity_Line reads vw_Opportunity_Header:, vw_SAGE1002017_Product:, vw_SAGE1002017_PriceBookEntry:
  • vw_SAGE1002017_Quote_Header reads vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vw_Opportunity_Header:, vw_SAGE1002017_Terms:, vwSalesPerson:; no template in this set writes vw_SAGE1002017_Terms:
  • vw_SAGE1002017_Quote_Line reads vw_Quote_Header:, vw_SAGE1002017_Product:, vw_SAGE1002017_PriceBookEntry:
  • vw_SAGE1002017_Customer reads vw_SAGE1002017_Account:, vwSalesPerson:
  • vw_SAGE1002017_SO_SHIPTOADDRESS reads vw_SAGE1002017_Account:, vw_SAGE1002017_Customer:
  • vw_SAGE1002017_CI_Item reads vw_SAGE1002017_Product:, vw_SAGE1002017_CI_Item:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_ItemWarehouse reads vw_SAGE1002017_CI_Item:, vw_SAGE1002017_Product:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_InvoiceLine reads vw_SAGE1002017_InvoiceHeader:, vw_SAGE1002017_CI_Item:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_InvoiceHeader reads vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vwSalesPerson:
  • vw_SAGE1002017_OpenInvoice reads vw_SAGE1002017_Account:, vw_SAGE1002017_Customer:, vwSalesPerson:
  • vw_SAGE1002017_PriceBookEntryCreate reads vw_SAGE1002017_Product:
  • vw_SAGE1002017_PriceBookEntryUpdate reads vw_SAGE1002017_Product:
  • vw_SAGE1002017_AP_INVOICEHISTORYDETAIL reads vw_SAGE1002017_AP_INVOICEHISTORYHEADER:
  • vw_SAGE1002017_AP_INVOICEHISTORYHEADER reads vw_SAGE1002017_Vendor:, vw_SAGE1002017_VendorAccount:
  • vw_SAGE1002017_PURCHASEORDERHEADER reads vw_SAGE1002017_Vendor:, vw_SAGE1002017_VendorAccount:, vw_SAGE1002017_SO_SHIPTOADDRESS:
  • vw_SAGE1002017_PURCHASEORDERDETAIL reads vw_SAGE1002017_PURCHASEORDERHEADER:, vw_SAGE1002017_CI_Item:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_PO_PurchaseOrderHistoryHeader reads vw_SAGE1002017_VendorAccount:, vw_SAGE1002017_Vendor:
  • vw_SAGE1002017_PO_PurchaseOrderHistoryDetail reads vw_SAGE1002017_CI_Item:, vw_SAGE1002017_PO_PurchaseOrderHistoryHeader:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_SalesOrderLine reads vw_SAGE1002017_CI_Item:, vw_SAGE1002017_SalesOrderHeader:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_SalesOrderHistoryLine reads vw_SAGE1002017_CI_Item:, vw_SAGE1002017_SalesOrderHistoryHeader:; no template in this set writes vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_SalesOrderHeader reads vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:, vwSalesPerson:
  • vw_SAGE1002017_SalesOrderHistoryHeader reads vw_SAGE1002017_Customer:, vw_SAGE1002017_Account:
  • vw_SAGE1002017_Vendor reads vw_SAGE1002017_VendorAccount:

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 → Salesforce pairs
Sales PersonCommercientSF8__SAGE100_SalesPerson__c25SALESPERSONDIVISIONNO,SALESPERSONNOCommercientSF8__ExternalKey__c, SALESPERSONNAME,SALESPERSONDIVISIONNO,SALESPERSONNOName, SALESPERSONDIVISIONNOCommercientSF8__SalespersonDivisionNo__c, SALESPERSONNOCommercientSF8__SalespersonNo__c, SALESPERSONNAMECommercientSF8__SALESPERSONNAME__c
AccountAccount13ARDIVISIONNO, CUSTOMERNOCommercientSF__Commercient_ArCustomerCode__c, CUSTOMERNAME, ARDIVISIONNO, CUSTOMERNOName, TELEPHONENOPhone, ADDRESSLINE1, ADDRESSLINE2, ADDRESSLINE3BillingStreet, CITYBillingCity
AddressCommercientSF8__SO_SHIPTOADDRESS__c33ARDIVISIONNO, CUSTOMERNO, SHIPTOCODECommercientSF8__ExternalKey__c, ARDIVISIONNO, CUSTOMERNO, SHIPTOCODECommercientSF8__Name__c, ARDIVISIONNO, CUSTOMERNOAccount, ARDIVISIONNO, CUSTOMERNOCommercientSF8__Sage100_Customer_Records__c, ARDIVISIONNOARDIVISIONNO
AccountCustomerLookupAccount2ARDIVISIONNO,CUSTOMERNOCommercientSF__Commercient_ArCustomerCode__c, SFDCIDCommercientSF8__Sage_Customer_Record__c
ProductProduct25ITEMCODECommercientSF__ExternalKey__c, ITEMCODEName, ITEMCODEDESCDescription, ITEMCODEProductCode, INACTIVEITEMIsActive
CIItemCommercientSF8__SAGE100_CI_Item__c85ITEMCODECommercientSF8__ExternalKeys__c, ITEMCODECommercientSF8__Name__c, ITEMTYPECommercientSF8__ItemType__c, ITEMCODEDESCCommercientSF8__ItemCodeDesc__c, EXTENDEDDESCRIPTIONKEYCommercientSF8__ExtendedDescriptionKey__c
SalesOrderLineCommercientSF8__SO_SALESORDERDETAIL__c63SALESORDERNO,LINEKEYCommercientSF8__ExternalKey__c, SALESORDERNO,LINEKEYCommercientSF8__Name__c, SALESORDERNOCommercientSF8__SALESORDERNO__c, LINEKEYCommercientSF8__LINEKEY__c, LINESEQNOCommercientSF8__LINESEQNO__c
SalesOrder History HeaderCommercientSF8__SAGE100_SALESORDERHISTORYHEADER__c66SALESORDERNOCommercientSF8__ExternalKey__c, SALESORDERNOName, SFDCIDAccount, SFDCIDCustomer, ORDERSTATUSOrderStatus
SalesOrder History LineCommercientSF8__SAGE100_SALESORDERHISTORYDETAIL__c50SALESORDERNO, SEQUENCENOCommercientSF8__ExternalKey__c, SALESORDERNO, SEQUENCENOCommercientSF8__Name__c, SFDCIDCommercientSF8__Salesorder_History_Header__c, SEQUENCENOCommercientSF8__SEQUENCENO__c, LINEKEYCommercientSF8__LineKey__c
Invoice HeaderCommercientSF8__AR_INVOICEHISTORYHEADER__c86INVOICENO,HEADERSEQNOCommercientSF8__ExternalKey__c, INVOICENO,HEADERSEQNOCommercientSF8__Name__c, ARDIVISIONNO,CUSTOMERNOCommercientSF8__Account__c, ARDIVISIONNO,CUSTOMERNOCommercientSF8__Sage100_Customer_Record__c, SALESPERSONDIVISIONNO,SALESPERSONNOCommercientSF8__SalesPerson__c
Invoice DetailsCommercientSF8__AR_INVOICEHISTORYDETAIL__c60INVOICENO, HEADERSEQNO, DETAILSEQNOCommercientSF8__ExternalKey__c, INVOICENO, HEADERSEQNO, DETAILSEQNOCommercientSF8__Name__c, SFDCIDSage100_Invoice, SFDCIDSage100_Item, INVOICENOCommercientSF8__INVOICENO__c
Item WarehouseCommercientSF8__SAGE100_ITEMWAREHOUSE__c28ITEMCODECommercientSF8__CIItem__c, ITEMCODECommercientSF8__Product__c, ITEMCODE, WAREHOUSECODECommercientSF8__ExternalKey__c, ITEMCODE, WAREHOUSECODEName, ITEMCODECommercientSF8__ItemCode__c
Transcation Payment HistoryCommercientSF8__AR_TRANSACTIONPAYMENTHISTORY__c38ARDIVISIONNO, CUSTOMERNOAccount, ARDIVISIONNO, CUSTOMERNOSage100_Customer_Record, INVOICENO, INVOICEHISTORYHEADERSEQNOSage100_Invoice, ARDIVISIONNOARDIVISIONNO, CUSTOMERNOCUSTOMERNO
Create Standard PriceBookPricebookEntry5ITEMCODEExternalKey__c, IsActiveIsActive, STANDARDUNITPRICEUnitPrice, SFDCIDPricebook2ID, SFDCIDProduct2ID
Update Standard PriceBookPricebookEntry3ITEMCODEExternalKey__c, IsActiveIsActive, STANDARDUNITPRICEUnitPrice
Opportunity HeaderOpportunity9SALESORDERNOExternalKey__c, SALESORDERNOName, SFDCIDAccountId, TAXABLEAMTAmount, SFDCIDPricebook2ID
Opportunity LineOpportunityLineItem6SALESORDERNO, LINEKEYExternalKey__c, QuantityQuantity, UNITPRICEUnitPrice, ITEMCODEDESCDescription, SFDCIDOpportunityId
SAGE100 Ar Open InvoiceCommercientSF8__SAGE100_AR_OPENINVOICE__c46ARDIVISIONNO, CUSTOMERNO, INVOICENO, INVOICETYPECommercientSF8__ExternalKey__c, INVOICENO, INVOICETYPEName, SALESPERSONDIVISIONNO, SALESPERSONNOSAGE100_SalesPerson, ARDIVISIONNO, CUSTOMERNOAccount, ARDIVISIONNO, CUSTOMERNOSage100_Customer_Records
CONTACTContact14ARDIVISIONNO, CUSTOMERNO, CONTACTCODECommercientSF8__ExternalKey__c, CONTACTNAMEFIRSTNAME, CONTACTNAMELASTNAME, ADDRESSLINE1, ADDRESSLINE2, ADDRESSLINE3MailingStreet, CITYMailingCity
Quote_HeaderQuote23SALESORDERNOExternalKey__c, SALESORDERNOName, SALESORDERNOOpportunityId, SALESPERSONDIVISIONNO,SALESPERSONNOSAGE100_SalesPerson__c, TERMSCODESAGE100V5_Term__c
Quote_LineItemQuoteLineItem8SALESORDERNO, LINEKEYExternalKey__c, SALESORDERNOQuoteId, ITEMCODEProduct2Id, ITEMCODEPricebookEntryId, PROMISEDATEServiceDate
Vendor SyncCommercientSF8__SAGE100_AP_VENDOR__c50APDIVISIONNO, VENDORNOCommercientSF8__ExternalKey__c, VENDORNAMEName, TSAccount.SFDCIDCommercientSF8__Account__c, APDIVISIONNOCommercientSF8__APDivisionNo__c, VENDORNOCommercientSF8__VendorNo__c
PO LineCommercientSF8__SAGE100_PO_PURCHASEORDERDETAIL__c23PURCHASEORDERNO, LINEKEYCommercientSF8__ExternalKey__c, PURCHASEORDERNO, LINEKEYCommercientSF8__Name__c, PURCHASEORDERNOCommercientSF8__PURCHASEORDERNO__c, LINEKEYCommercientSF8__LINEKEY__c, LINESEQNOCommercientSF8__LINESEQNO__c
Sage 100 Purchase History DetailPO_PurchaseOrderHistoryDetail__c55PURCHASEORDERNO, SEQUENCENOExternalKey__c, PURCHASEORDERNO, SEQUENCENOName, PURCHASEORDERNOPURCHASEORDERNO, SEQUENCENOSEQUENCENO, LINEKEYLINEKEY
Sage AP Invoice History HeaderCommercientSF8__SAGE100_AP_INVOICEHISTORYHEADER__c81INVOICENO, HEADERSEQNOCommercientSF8__ExternalKey__c, INVOICENO, HEADERSEQNOCommercientSF8__Name__c, APDIVISIONNOAPDIVISIONNO, APDIVISIONNO, VENDORNOAccount__c, APDIVISIONNO, VENDORNOAP_Vendor
Sage AP Invoice History LineCommercientSF8__SAGE100_AP_INVOICEHISTORYDETAIL__c46INVOICENO, HEADERSEQNO, DETAILSEQNOCommercientSF8__ExternalKey__c, INVOICENO, HEADERSEQNO, DETAILSEQNOCommercientSF8__Name__c, SFDCIDCommercientSF8__AP_INVOICE_HISTORY_HEADER__c, ASSETTEMPLATECommercientSF8__ASSETTEMPLATE__c, COMMENTTEXTCommercientSF8__COMMENTTEXT__c

6. Community templates

The catalogue carries 493 community templates for this pair. A community template is authored in a tenant rather than shipped with the product, and it imports the same way as any other. Its own names, notes, field mapping and SQL are tenant content, so what this section states is what the set amounts to: how many templates there are, what they default to doing, which destination objects they write and which groups they fall in. They are not part of the shipped set described above.

  • Templates: 493
  • Default operations: insert on 493, update on 493, delete on 493
  • Marked circular-sync: 8
  • Licence groups they span: 17
  • Destination objects: Account, CommercientSF8__AR_CUSTOMER__c, CommercientSF8__AR_INVOICEHISTORYHEADER__c, CommercientSF8__AR_INVOICEHISTORYDETAIL__c, CommercientSF8__SO_SALESORDERDETAIL__c, CommercientSF8__SO_SALESORDERHEADER__c, CommercientSF8__SAGE100_SalesPerson__c, CommercientSF8__SO_SHIPTOADDRESS__c, Product2, PricebookEntry, CommercientSF8__SAGE100_CI_Item__c, CommercientSF8__AR_TRANSACTIONPAYMENTHISTORY__c, CommercientSF8__SAGE100_SALESORDERHISTORYDETAIL__c, CommercientSF8__SAGE100_SALESORDERHISTORYHEADER__c, Contact, CommercientSF8__SAGE100_AR_OPENINVOICE__c, CommercientSF8__SAGE100_TermsCode__c, CommercientSF8__SAGE100_ItemWarehouse__c, PriceBookEntry, Opportunity, 33 more and 6 custom objects
  • Object display names: Account, Customer, Invoice Header, Invoice Details, AccountCustomerLookup, Sales Person, SalesOrderLine, Address, SalesOrder, Product, SalesOrder History Header, SalesOrder History Line, 133 more and 12 further templates
  • Template groups: Account, Salesorder, Product, Invoice, Customer Multi Ship Addresses, Invoice History Headers, CRM Quote and Line, CRM Opportunity and Line, Purchase Order, Pricebook, CRM Order and Line

A community template is imported the way a shipped one is, and the same rules apply to what it creates: read the process it creates with crmpro_get_process, its mapping with crmpro_field_mapping, and the view it selects from, before activating it.

7. 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_User
  • vw_SAGE1002017_Account
  • vw_SAGE1002017_CustomerToAccountLookup
  • vw_InvoicePayment
  • vw_SAGE1002017_Contact
  • vw_Opportunity_Header
  • vw_Opportunity_Detail
  • vw_Quote_Header
  • vw_Quote_Detail
  • vw_SAGE1002017_VendorAccount
  • vw_SAGE1002017_Customer
  • vw_SAGE1002017_SO_SHIPTOADDRESS
  • vw_SAGE1002017_CI_Item:
  • vw_SAGE1002017_ITEMWAREHOUSE
  • vw_SAGE1002017_InvoiceLine
  • vw_SAGE1002017_InvoiceHeader
  • vw_SAGE1002017_OpenInvoice
  • vw_SAGE1002017_PriceBookEntry
  • vw_SAGE1002017_Product
  • vw_SAGE1002017_AP_INVOICEHISTORYDETAIL
  • vw_SAGE1002017_AP_INVOICEHISTORYHEADER
  • vw_SAGE1002017_PURCHASEORDERHEADER
  • vw_SAGE1002017_PURCHASEORDERDETAIL
  • vw_SAGE1002017_PO_PurchaseOrderHistoryHeader
  • vw_SAGE1002017_PO_PurchaseOrderHistoryDetail
  • vw_SAGE1002017_SalesOrderLine
  • vw_SAGE1002017_SalesOrderHistoryLine
  • vw_SAGE1002017_SalesOrderHeader
  • vw_SAGE1002017_SalesOrderHistoryHeader
  • vwSalesPerson
  • vw_SAGE1002017_Vendor

8. 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 → Salesforce templates set up. dlake-crmpro-salesforce is the destination skill this page sits under: its own text is the authority for the Salesforce 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.