API User Guide

This chapter describes the logic used to make this integration.

Sync ERP to Wello

The table Customer contains a datetime field (name=”updated”).

Each time a record is added or updated (CustomerAdd,CustomerUpdate) the ERP Layer ensure that the field is updated with a GETDATE().

To synchronize the data from MyERP to Wello, the following steps are executed

  • 1) Get the highest last proceeded ERP.Customer.updated field
  • 2) List all ERP.Customer that have been created or updated AFTER this date field (using milliseconds)
  • 3) Foreach of these records, it serialize the “ERP.Customer” to an object and verify on the sync_cache that he is well modified (Imagine that you have a field on your ERP that is not Sync. In this case, modify this field doesn’t mean you need to sync a new time this object to Wello).
    • 4) If modified (not in the sync_cache or serialized object is different), it verify if this object has been already sent to Wello (to know if a POST or PUT is needed)
    • 5) It send the object to Wello and store the Wello Guid on his cache
  • 6) When all data are proceeded, it stores the new highest “ERP.Customer.updated” field



Sync Wello to ERP

To synchronize the data from Wello to MyERP, the following steps are executed

  • 1) Get the highest last proceeded Wello.Company.modified_dateutc field
  • 2) List all Wello.Company have been created or updated AFTER this date field (using milliseconds)
  • 3) Foreach of these records
    • 4) it verify if the Wello.Company.code is filled
    • 5)Wello.Company.code empty : it add it on MyERP, receive the new ERP.Customer.id and make an API update on Wello.Company.code and add it on my sync_cache
    • 6)Wello.Company.code filled : this customer comes from MyERP. Need to see if the value of the field “name” is different than on my ERP.
      • 7)If different, update on MyERP and update my sync_cache
    • 8) When all data are proceeded, it stores the new highest “Wello.Company.modified_dateutc” field