Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiagomatos/0e1a62e8542ed87ea913b3eef415ae7e to your computer and use it in GitHub Desktop.
Save tiagomatos/0e1a62e8542ed87ea913b3eef415ae7e to your computer and use it in GitHub Desktop.
How to synchronize stocks between Jumpseller Store and my ERP system (using the API).
To design a proper architecture to sincronize product stocks between a Jumpseller store and a ERP (or any similar system), consider:
1. Define a storage system (a MySQL, SQLite or even a plain-text file works perfectly) to hold at least two columns: jumpseller_product_id and erp_id
2. Record each part of IDs, jumpseller_product_id and erp_id, using Jumpseller GET /products endpoint, like:
jumpseller_product_id, erp_id
123456, adidas-red-43
123457, adidas-red-44
123458, adidas-red-45
3. Once the matching of all products from Jumpseller Store and the ERP system is done,
4. You can start work on keeping stock updated, by adding a third column: synced_at, like:
jumpseller_product_id, erp_id, synced_at
123456, adidas-red-43, 2020-03-03 18:03:02
123457, adidas-red-44, 2020-03-03 18:03:03
123458, adidas-red-45, 2020-03-03 18:03:04
5. Now, you can decide to update your stock every day or every hour, according to the synced_at timestamp.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment