Source ERP · 36 of 105

CRMPro → Salesforce — Infor Fourth Shift: what the shipped templates set up

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

CRMPro → Salesforce — Infor Fourth Shift: 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/infor-fourth-shift.md, and that skill’s ERP table is what points at it. What follows is only what the shipped Infor Fourth Shift → 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
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, CommercientSF18__SA_Customer__cSF_ERP_Salesforce_Clone_SA_Customer, SF_ERP_Salesforce_Clone_SA_ShipToDeliveryLocation
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.CommercientSF18__SA_ShipToDeliveryLocation__cSF_ERP_Salesforce_Clone_SA_ShipToDeliveryLocation, SF_ERP_Salesforce_Clone_SA_Customer
ProductThe templates push CommercientSF18__SA_Item__c, CommercientSF18__SA_InventoryAdjustment__c, Product2 to Salesforce. New records are created and existing ones updated; none are deleted.CommercientSF18__SA_Item__c, CommercientSF18__SA_InventoryAdjustment__c, Product2SF_ERP_Salesforce_Clone_SA_Item, SF_ERP_Salesforce_Clone_SA_InventoryAdjustment
InvoiceBoth 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.CommercientSF18__FS_ARInvoiceHeader__c, CommercientSF18__FS_ARInvoiceLine__cSF_ERP_Salesforce_Clone_FS_COHeader, SF_ERP_Salesforce_Clone_SA_Customer, SF_ERP_Salesforce_Clone_FS_COLine, SF_ERP_Salesforce_Clone_FS_ARInvoiceHeader, CommercientFlags, SF_ERP_Salesforce_Clone_FS_ARInvoiceLine
SalesorderCommercient will sync the Sales Orders from the ERP Sales Order Entry module to the Commercient Sales Order Header (MCO) objects in CRM. In the CRM, customer service and sales people can visualize the status of the order such as on hold, backorder, forward order, scheduled for delivery, whether it has shipped, and completion status. New records are created and existing ones updated; none are deleted.CommercientSF18__FS_COHeader__c, CommercientSF18__FS_COLine__cSF_ERP_Salesforce_Clone_FS_COHeader, SF_ERP_Salesforce_Clone_SA_Customer, SF_ERP_Salesforce_Clone_FS_COLine

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
AccountAccountCommercientSF__Commercient_ArCustomerCode__c1vw_INFORFOURTHSHIFT_Accountvw_INFORFOURTHSHIFT_Account'' / ''
Customer MasterCommercientSF18__SA_Customer__cCommercientSF18__ExternalKey__c2vw_INFORFOURTHSHIFT_Customervw_INFORFOURTHSHIFT_CustomerCommercientSF18__ / __c
Customer to Account Reverse LookupAccountCommercientSF__Commercient_ArCustomerCode__c3vw_INFORFOURTHSHIFT_CustomerToAccountLookupvw_INFORFOURTHSHIFT_CustomerToAccountLookup'' / ''
Item MasterCommercientSF18__SA_Item__cCommercientSF18__ExternalKey__c4vw_Itemvw_INFORFOURTHSHIFT_ItemCommercientSF18__ / __c
ProductProduct2CommercientSF__ExternalKey__c5vw_Productvw_INFORFOURTHSHIFT_Product'' / ''
Product to Item Master Reverse LookupCommercientSF18__SA_Item__cCommercientSF18__ExternalKey__c6vw_ProductReverseLookupvw_INFORFOURTHSHIFT_Product_ReverseLookupCommercientSF18__ / __c
Sales Order HeaderCommercientSF18__FS_COHeader__cCommercientSF18__ExternalKey__c7vw_INFORFOURTHSHIFT_SalesOrderHeadervw_INFORFOURTHSHIFT_FS_SalesOrderHeaderCommercientSF18__ / __c
Sales Order LineCommercientSF18__FS_COLine__cCommercientSF18__ExternalKey__c8vw_INFORFOURTHSHIFT_SalesOrderLinevw_INFORFOURTHSHIFT_FS_SalesOrderLineCommercientSF18__ / __c
Invoice HeaderCommercientSF18__FS_ARInvoiceHeader__cCommercientSF18__ExternalKey__c9vw_INFORFOURTHSHIFT_InvoiceHeadervw_INFORFOURTHSHIFT_FS_InvoiceHeaderCommercientSF18__ / __c
Invoice LineCommercientSF18__FS_ARInvoiceLine__cCommercientSF18__ExternalKey__c10vw_INFORFOURTHSHIFT_InvoiceLinevw_INFORFOURTHSHIFT_FS_InvoiceLineCommercientSF18__ / __c
WarehouseCommercientSF18__SA_InventoryAdjustment__cCommercientSF18__ExternalKey__c11vw_Warehousevw_INFORFOURTHSHIFT_WarehouseCommercientSF18__ / __c
ShipToDeliveryLocationCommercientSF18__SA_ShipToDeliveryLocation__cCommercientSF18__ExternalKey__c12vw_INFORFOURTHSHIFT_ShipToDeliveryLocationvw_INFORFOURTHSHIFT_ShipToDeliveryLocationCommercientSF18__ / __c

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 1. The insert column lists do not include Sync_Operation_Type, Sync_Batch_Size, 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 Account — those rows read records back from Salesforce as well as pushing. On Invoice Header the SQL_Query names a view the same template’s CreateViewQuery does not create (vw_INFORFOURTHSHIFT_FS_InvoiceHeader against vw_INFORFOURTHSHIFT_FS_SalesOrderHeader), 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_INFORFOURTHSHIFT_Accountinsert + updatevw_INFORFOURTHSHIFT_Account:SF_ERP_Salesforce_Clone_SA_Customer, SF_ERP_Salesforce_Clone_SA_ShipToDeliveryLocation
vw_INFORFOURTHSHIFT_Customerinsert + updatevw_INFORFOURTHSHIFT_Customer:vw_INFORFOURTHSHIFT_Account:SF_ERP_Salesforce_Clone_SA_Customer
vw_INFORFOURTHSHIFT_CustomerToAccountLookupinsert + updatevw_INFORFOURTHSHIFT_CustomerToAccountLookup:vw_INFORFOURTHSHIFT_Customer:SF_ERP_Salesforce_Clone_SA_Customer
vw_INFORFOURTHSHIFT_Iteminsert + updatevw_Item:SF_ERP_Salesforce_Clone_SA_Item
vw_INFORFOURTHSHIFT_Productinsert + updatevw_Product:vw_Item:CommercientSF__ExternalKey__cSF_ERP_Salesforce_Clone_SA_Item
vw_INFORFOURTHSHIFT_Product_ReverseLookupinsert + updatevw_ProductReverseLookup:vw_Product:SF_ERP_Salesforce_Clone_SA_Item
vw_INFORFOURTHSHIFT_FS_SalesOrderHeaderinsert + updatevw_INFORFOURTHSHIFT_SalesOrderHeader:vw_INFORFOURTHSHIFT_Account:, vw_INFORFOURTHSHIFT_Customer:SF_ERP_Salesforce_Clone_FS_COHeader, SF_ERP_Salesforce_Clone_SA_Customer
vw_INFORFOURTHSHIFT_FS_SalesOrderLineinsert + updatevw_INFORFOURTHSHIFT_SalesOrderLine:vw_INFORFOURTHSHIFT_SalesOrderHeader:, vw_Item:SF_ERP_Salesforce_Clone_FS_COLine
vw_INFORFOURTHSHIFT_FS_SalesOrderHeaderinsert + updatevw_INFORFOURTHSHIFT_InvoiceHeader:vw_INFORFOURTHSHIFT_Account:, vw_INFORFOURTHSHIFT_Customer:, vw_INFORFOURTHSHIFT_SalesOrderHeader:, vw_Item:, vw_INFORFOURTHSHIFT_SalesOrderLine:SF_ERP_Salesforce_Clone_FS_COHeader, SF_ERP_Salesforce_Clone_SA_Customer, SF_ERP_Salesforce_Clone_FS_COLine, SF_ERP_Salesforce_Clone_FS_ARInvoiceHeader, CommercientFlags
vw_INFORFOURTHSHIFT_FS_InvoiceLineinsert + updatevw_INFORFOURTHSHIFT_InvoiceLine:vw_INFORFOURTHSHIFT_InvoiceHeader:, vw_Item:SF_ERP_Salesforce_Clone_FS_ARInvoiceLine
vw_INFORFOURTHSHIFT_Warehouseinsert + updatevw_Warehouse:SF_ERP_Salesforce_Clone_SA_InventoryAdjustment
vw_INFORFOURTHSHIFT_ShipToDeliveryLocationinsert + updatevw_INFORFOURTHSHIFT_ShipToDeliveryLocation:vw_INFORFOURTHSHIFT_Account:, vw_INFORFOURTHSHIFT_Customer:ExternalKeySF_ERP_Salesforce_Clone_SA_ShipToDeliveryLocation, SF_ERP_Salesforce_Clone_SA_Customer

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 1 to 12. A run processes active rows in ascending Sync_Order, which is the order the templates put them in:

  • 1 — Account
  • 2 — Customer Master
  • 3 — Customer to Account Reverse Lookup
  • 4 — Item Master
  • 5 — Product
  • 6 — Product to Item Master Reverse Lookup
  • 7 — Sales Order Header
  • 8 — Sales Order Line
  • 9 — Invoice Header
  • 10 — Invoice Line
  • 11 — Warehouse
  • 12 — ShipToDeliveryLocation

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_INFORFOURTHSHIFT_CustomerToAccountLookup reads vw_INFORFOURTHSHIFT_Customer:
  • vw_INFORFOURTHSHIFT_Customer reads vw_INFORFOURTHSHIFT_Account:
  • vw_INFORFOURTHSHIFT_ShipToDeliveryLocation reads vw_INFORFOURTHSHIFT_Account:, vw_INFORFOURTHSHIFT_Customer:
  • vw_INFORFOURTHSHIFT_Product_ReverseLookup reads vw_Product:
  • vw_INFORFOURTHSHIFT_FS_SalesOrderHeader reads vw_INFORFOURTHSHIFT_Account:, vw_INFORFOURTHSHIFT_Customer:, vw_INFORFOURTHSHIFT_SalesOrderHeader:, vw_Item:, vw_INFORFOURTHSHIFT_SalesOrderLine:
  • vw_INFORFOURTHSHIFT_FS_InvoiceLine reads vw_INFORFOURTHSHIFT_InvoiceHeader:, vw_Item:
  • vw_INFORFOURTHSHIFT_Product reads vw_Item:
  • vw_INFORFOURTHSHIFT_FS_SalesOrderHeader reads vw_INFORFOURTHSHIFT_Account:, vw_INFORFOURTHSHIFT_Customer:
  • vw_INFORFOURTHSHIFT_FS_SalesOrderLine reads vw_INFORFOURTHSHIFT_SalesOrderHeader:, vw_Item:

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
AccountAccount10CustomerIDCommercientSF__Commercient_ArCustomerCode__c, CustomerNameName, BillToNameBillingStreet, BillToStateBillingState, BillToZipBillingPostalCode
Customer MasterCommercientSF18__SA_Customer__c28CustomerKeyCommercientSF18__ExternalKey__c, CustomerNameName, CustomerIDCustomerID, CustomerNameCustomerName, CustomerStatusCustomerStatus
Customer to Account Reverse LookupAccount2CustomerIDCommercientSF__Commercient_ArCustomerCode__c, SFDCIDCommercientSF18__Fourth_Shift_SA_Customer__c
Item MasterCommercientSF18__SA_Item__c34ItemKeyCommercientSF18__Name__c, ItemKeyCommercientSF18__ExternalKey__c, ItemClassDefinition1KeyCommercientSF18__ItemClassDefinition1Key__c, ItemClassDefinition2KeyCommercientSF18__ItemClassDefinition2Key__c, ItemClassDefinition3KeyCommercientSF18__ItemClassDefinition3Key__c
ProductProduct27ItemKeyCommercientSF__ExternalKey__c, ItemKey, ItemNumberName, ItemNumberProductCode, ItemDescriptionDescription, ItemStatusIsActive
Product to Item Master Reverse LookupCommercientSF18__SA_Item__c2ItemKeyCommercientSF18__ExternalKey__c, SFDCIDCommercientSF18__Product__c
Sales Order HeaderCommercientSF18__FS_COHeader__c4CONumberName, CustomerIDAccount, CustomerKeyFourth_Shift_SA_Customer, COHeaderKeyExternalKey
Sales Order LineCommercientSF18__FS_COLine__c4COHeaderKey, COLineNumberName, COLineKeyCommercientSF18__ExternalKey__c, COHeaderKeyFourth_Shift_FS_Sales_Order_Header, ItemKeyFourth_Shift_SA_Item
Invoice HeaderCommercientSF18__FS_ARInvoiceHeader__c98ARInvoiceHeaderKeyCommercientSF18__ExternalKey__c, CustomerIDCommercientSF18__Account__c, CustomerKeyCommercientSF18__Fourth_Shift_SA_Customer__c, InvoiceNumberCommercientSF18__Name__c, CONumberCommercientSF18__CONumber__c
Invoice LineCommercientSF18__FS_ARInvoiceLine__c3ARInvoiceHeaderKey,InvoiceLineNumberCommercientSF18__ExternalKey__c, SFDCIDCommercientSF18__Fourth_Shift_SA_Item__c, SFDCIDCommercientSF18__Fourth_Shift_FS_Invoice_Header__c
WarehouseCommercientSF18__SA_InventoryAdjustment__c37IsAppliedCommercientSF18__IsApplied__c, AppliedDateTimeCommercientSF18__AppliedDateTime__c, UserIDCommercientSF18__UserID__c, TransactionDateTimeCommercientSF18__TransactionDateTime__c, DocumentNumberCommercientSF18__DocumentNumber__c
ShipToDeliveryLocationCommercientSF18__SA_ShipToDeliveryLocation__c11ShipToDeliveryLocationKeyCommercientSF18__ExternalKey__c, ShipToDeliveryLocationNameName, SFDCIDAccount, SFDCIDFourth_Shift_SA_Customer, ShipToDeliveryLocationIDShipToDeliveryLocationID

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:

  • vw_INFORFOURTHSHIFT_CustomerToAccountLookup
  • vw_INFORFOURTHSHIFT_Account
  • vw_INFORFOURTHSHIFT_Customer
  • vw_INFORFOURTHSHIFT_ShipToDeliveryLocation
  • vw_Item
  • vw_ProductReverseLookup
  • vw_Warehouse
  • vw_INFORFOURTHSHIFT_InvoiceHeader
  • vw_INFORFOURTHSHIFT_InvoiceLine
  • vw_Product
  • vw_INFORFOURTHSHIFT_SalesOrderHeader
  • vw_INFORFOURTHSHIFT_SalesOrderLine

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 Infor Fourth Shift → 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.