Inbound Process TRANSFER

Learn about the transfer process for the inbound process.

Can be called with parameter “OneKey.exe TRANSFER”. The Function “U8Import_DB” imports from staging table to update tables.

11. WORKPLACE (U053)  Accounts (FI)

  • Import from Staging to FI

    The script is calling function TransferStagingArea_2_CRM() and is executing the import format “TE_IMP_OneKey_Transfer_FI_Account” which transfers data from staging to the FI-table. The mapping of fields is defined here. Several transformations for field values are handled in this import format.

    Error code column is field U053.5101 “error code”. (Column in the database to which error codes are written.)

    Tip: Please customize the importformat in your project. This is seen as an example. Not all field-mappings are covered by this importformat.


  • Trigger on FI

    The trigger “TE_OneKey_FI_UPD_SetPoolClearingStateForValidation” is running on NEW and UPD (of master data fields) of FI and sets the field “Pool clearing State” to “For Validation”. Condition is handled by variable “TE_Clearing.AccountIncludeTypes” which has a condition on field “Account type” (currently all LSI-template values with tenant 9004).

  • Info: Export of Workplace Validation Requests

    The script is calling function REQUEST()…

    WORKPLACE VALIDATION REQUEST:

    Export from FI (where Pool Clearing state == zu clearen)

    EXP_Format_FI_ACCOUNTS_FOR_VALIDATION

    Re-Import to C026

    IMP_Format_STAGINGAREA_ACCOUNTS_FOR_VALIDATION

    Export of C026  OneKey

    EXP_Format_STAGINGAREA_ACCOUNTS_FOR_VALIDATION

    Re-Import to C026 (set Pool Clearing state = sent to clearing)

    IMP_Format_STAGINGAREA_ACCOUNTS_STATE_VALIDATION_REQUEST

  • Info: Import of Opening Hours (CT)

    Import format “TE_IMP_OneKey_CT_OpeningHours_Monday” is used to import workplace opening hours to table “CT”.

12. INDIVIDUAL (U057)  Person (PE)

  • Import from Staging to PE

    The script is calling function TransferStagingArea_2_CRM() and is executing the import format “TE_IMP_OneKey_Transfer_PE_Person” which transfers data from staging to the PE-table. The mapping of fields is defined here. Several transformations for field values are handled in this import format.

    Error code column is field U057.5077 “error code”. (Column in the database to which error codes are written.)

    Tip: Please customize the importformat in your project. This is seen as an example. Not all field-mappings are covered by this importformat.
  • Triggers on PE

    The trigger “TE_OneKey_PE_UPD_SetPoolClearingStateForValidation” is running on NEW and UPD (of master data fields) of PE and sets the field “Pool clearing State” to “For Validation”.

    Tip: The original OneKey Catalog values is imported into shadow fields – having the postfix “(OK Orig. IND)”. So the original value persists in my CRM-record. That is sensible for sending requests to onekey and guarantees that we are sending correct data.

    The value is no longer transformed in the importformat. We are using triggers to map the onekey-value to our crm-values. This is an advantage for the customizer and offers more possibilities.



    The OneKey catalog values are already delivered by the template. They have no tenant which makes import and match-up easier. The external key is identical to the CATALOG_BASE_LANGUAGE. So we can guarantee the correct value on sending requests to OneKey. The readable value is imported to column description.

  • Info: Export of Person Validation Requests

    The script.au3 is calling function REQUEST()…

    PERSON VALIDATION REQUEST:

    Export from KP (where Pool Clearing state == zu clearen)

    EXP_Format_KP_PERSONS_FOR_VALIDATION

    Re-Import to C027

    IMP_Format_STAGINGAREA_PERSONS_FOR_VALIDATION

    Export of C027  OneKey

    EXP_Format_STAGINGAREA_ACCOUNTS_FOR_VALIDATION

    Re-Import to C027 (set Pool Clearing state = sent to clearing)

    IMP_Format_STAGINGAREA_PERSONS_STATE_VALIDATION_REQUEST

13. ACTIVITY (U056) ➔ Role (CP)

  • Import from Staging to CP

    The script is calling function TransferStagingArea_2_CRM() and is executing the import format “TE_IMP_OneKey_Transfer_CP_Role” which transfers data from staging to the CP-table. The mapping of fields is defined here. Several transformations for field values are handled in this import format.

    Error code column is field U056.5134 “error code”. (Column in the database to which error codes are written.)

    Tip: Please customize the importformat in your project. This is seen as an example. Not all field-mappings are covered by this importformat.
  • Trigger on CP

    The trigger “TE_OneKey_CP_UPD_SetPoolClearingStateForValidation” is running on NEW and UPD (of master data fields) of CP and sets the field “Pool clearing State” to “For Validation”.

  • Info: Import of Visit Times (CT)

    Import format “TE_IMP_OneKey_CT_VisitTimes_Monday” is used to import visit times (for Monday) to table “CT”.

14.A. RELATION (U072) WORKPLACE ➔ Relation (PB)

Import from Staging to PB

The script is calling function TransferStagingArea_2_CRM() and is executing the import format “TE_IMP_OneKey_Transfer_PB_Relations_FI-FI” which transfers data from staging to the PB-table. The mapping of fields is defined here. Several transformations for field values are handled in this import format.

Match and Update via external key account. Conditions for import are not active!

Tip: Please customize the importformat in your project. This is seen as an example. Not all field-mappings are covered by this importformat.
Tip: We are importing no duplicates! (F5001='W' AND F5005!='ENTITIES_LINK.WDE.DOU')


14.B: RELATION (U072) INDIVIDUAL ➔ Relation (PB)

Import from Staging to PB

The script is calling function TransferStagingArea_2_CRM() and is executing the import format “TE_IMP_OneKey_Transfer_PB_Relations_PE-PE”which transfers data from staging to the PB-table. The mapping of fields is defined here. Several transformations for field values are handled in this import format.

Match and Update via external key person. Conditions for import are not active!

Tip: We are importing no duplicates! (F5001='I' AND F5005!='ENTITIES_LINK.WDE.DOU')


14.C: RELATION (U072) ACTIVITY  RELATION (PB)

Import from Staging to PB

The script is calling function TransferStagingArea_2_CRM() and is executing the import format “TE_IMP_OneKey_Transfer_PB_Relations_CP-CP”which transfers data from staging to the PB-table. The mapping of fields is defined here. Several transformations for field values are handled in this import format.

Match and Update via external key account and external key person. Conditions for import are not active!

Tip: We are importing no duplicates! (F5001='A' AND F5005!='ENTITIES_LINK.WDE.DOU')


15: DUPLICATE U058

16 – 19: Import Error Handling Workplace

The infoareas U071 has a generic link, which is used for U053, U057 or U056.

The field “error code” holds the information coming from the import module.



The import table WKP, IND, ACT is imported to FI, PE, CP by database import from table (Process Transfer).

If a new import table record has been created, it gets the status “new/initial”.

If the import/transfer was successful the field “status” is set to “transferred”.

If any data field has changed (due to updates from onekey), the “status” is set to “to transfer”, which means there are pending updates.

If an error occurs, the import module sets the field “Error Code” in the source table. This field is set in SQL and therefore we can’t fire triggers on that event.

Therefore we have the following steps in Func TransferStagingArea_2_CRM

  1. Export WKP with condition “ErrorCode = empty AND Status <> transferred/error”
  2. Import the “successful” WKPs and set the status “transferred”
  3. Export WKP with condition “ErrorCode <> empty”
  4. Import the “failed” WKPs and set the status “error” and set the field “Import Error” to “J”.

If the field “Import Error” is set to “J” the trigger “TE_U071_NEW_LinkToU053” creates a new Import Error record.

Note: Error Handling datamodel has been implemented for U053, U057 and U056. The following steps are only available for Workplace (U053)!

Please define step 16, 17, 18, 19 in the same way for U056 and U057 if you need it in projects.

Tip: A more elegant way of setting the status field could be done via database views on the “error code” field.

Button “Transfer Again”

The button 'TE_U071_TransferAgain' is calling trigger ‘TE_U071_UPD_SetParentStatus_ToTransfer’ which sets a dummy field in U071. A trigger runs this field’s change and set the status in the parent linked record to “to transfer”. In the next nightly run, this record is transported/imported to FI again.