This chapter describes the logic used to make this integration.
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
ERP.Customer.updated
field
ERP.Customer
that have been created or updated AFTER this date field (using milliseconds)
“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).
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)
Guid
on his cache
“ERP.Customer.updated”
field
To synchronize the data from Wello to MyERP, the following steps are executed
Wello.Company.modified_dateutc
fieldWello.Company
have been created or updated AFTER this date field (using milliseconds) Wello.Company.code
is filledWello.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
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.sync_cache
“Wello.Company.modified_dateutc”
field