Implementation logic blocks
Implementation logic blocks are called to change data before it goes into the integration table and/or the Nextworld table. These logic blocks are very specific to the solution being integrated and are likely custom in nature. Logic blocks are called from the Data Import Definitions application and are used on integrations which have integration tables and for those integrations that do not. To learn more, see the Data imports topic.
An example is to take an account number from one system and strip off the components to get the account structure in Nextworld. In this example the integration might have an account number which looks like 78-001-60074-20 where the second segment 001 is the organizational unit in Nextworld and the 60074 is the Nextworld account number. The implementation logic block is responsible for getting the account number into the proper format.
Implementation logic blocks should not be used as a replacement for integrate logic blocks but rather to augment the integration solution by providing implementation specific logic.
Process logic blocks
Process logic blocks are used to move the data stored in the integration table into the destination table. The rules that these follow can depend upon the table structure, whether action blocks or table triggers are involved, and requirements associated with the data. Historical data and current data may follow different integration rules.
Validation logic blocks
When the table being integrated to handles multi-currency transactions, these validation standards should be followed.
The Transaction Currency should always be required, whether the transaction is single or multi-currency.
If the Company Currency is not provided, it should be defaulted from the Company's default currency in the directory.
If the Company Currency is provided, it should be validated that it is the same as the Company's currency in the directory. If it is not, an error should be thrown.
The Transaction Amounts and Company Amounts should be required for historical transactions. Never recalculate Company Amounts for historical transactions.
The Exchange Rate should always be required for any historical or multi-currency transactions. If one is not provided for an active multi-currency transaction, one can be retrieved from the system. If the Transaction Currency equals the Company Currency, the Exchange Rate should be defaulted to 1.
The Company Amount should not be required for active orders and should always be recalculated. When calculating the Company Amounts, the exchange rate tolerance should be taken into account. The exchange rate used should be validated using the logic block
ValidateExchangeRateTolerance. This logic block validates if the exchange rate can be used based on the Exchange Rate Tolerance defined by area (Subledger) and Company (Multi Currency Integrations Settings App). If the exchange rate is within the tolerance, that rate will be used to recalulate the Company Amounts. If it is not within the tolerance limit, an error should be set. If an Exchange Rate Tolerance is not found, the rate passed in can be used.
When the table being integrated to handles primary and transaction unit of measure for quantity fields, these validation standards should be followed:
Transaction UOM and Transaction Quantity fields should always be required.
Primary UOM field should not be required for active orders and should always be defaulted, even if it is populated.
Primary Quantity fields should not be required for active orders and should always be recalculated, even if they are populated. The Primary Quantities should be calculated using the existing logic blocks that calculate quantities based on the Transaction UOM and Primary UOM defined for the transactions.
Transaction UOM, Primary UOM, Transaction Quantity and Primary Quantity fields should be required for historical transactions. Never recalculate the Primary Quantities for historical transactions.
Tracking errors through logic blocks for header detail integrations
The integration application is configured to show error messages that occurred during the process and display them in the IntegrationsErrorLog. In order to tie the errors to the right integration row, the nwImportRunNumber and nwImportRowNumber are used track the error's origination and associate the error with the correct row. This works seemlessly as one logic block calls another logic block using the same data source and the nwImportRowNumber and nwImportRunNumber fields were mapped from the origination data source. For example, in the CreateSalesOrder logic block, wherever it inserts a SalesOrderHeader record it passes the nwImportRunNumber and nwImportRowNumber from the SalesOrderIntegration data source. As the logic blocks pass around the Sales Order Header Detail data source, the nwImportRunNumber and nwImportRowNumber are being used to track any errors when the logic blocks have used the ErrorSource in their Create Message action. See the Create Message action for more details.
However, when a logic block in the process needs to call another logic block and it does not use the same data source you should map, in the Field Mappings section of the Call Logic Block action, the nwImportRunNumber and nwImportRowNumber from the parent logic block into the child logic block. If this is not done, the error message will appear in the IntegrationsErrorLog, but it will not be tied to the correct nwImportRowNumber, and the end user won't know the exact row that caused the error.