Data export to ERPNext from custom application

Hi,

I am looking at integrating an application with ERPNext. So I need to sync/export the data from application(mainly customer/sales information) to erpnext. The application will be running on the same system as ERPNext, so I have two ways of doing it

  1. Map the relevant fields and update the database directly
  2. Add a REST API and use the API to export the data from application

I initially preferred API approach over database as it will work at a higher level reducing some effort. I thought it might work better for upgrades where underlying database schema might change. But not really sure whether it is a real concern as most of the upgrade patches work at providing a smooth upgrade path. Also, the schema changes are usually triggered by doctype changes, so both will need code changes to the data export logic. Is there any specific reason for me to avoid database updates directly?

Regards
Sathish

1 Like

Post a job to erpnext.org/jobs

@JoEz,
Sorry, not sure I understood your comment. I am not asking anyone to work on this. Just asking a suggestion on best practices between two alternatives.