Using an external tool to manage products (PIM), orders (OMS), customers (CRM) etc is common for online businesses in 2021.
Since Chec/Commerce.js is a fully headless API-driven platform, you can easily connect anything you want both in and out of the platform.
While the specifics of each integration will vary depending on the external system, whether it has an API, whether it has webhooks/events etc, and how good their documentation is, here are a few example scenarios to get you started:
Integrating a PIM into Chec/Commerce.js
Ensure that your chosen PIM has an event system, webhooks, etc. Something that can cause a script to run when data changes in your system. For example, when you create a new product, or edit an existing one, you'd want to run a script on one of your servers somewhere.
Write a custom script somewhere that will accept the event/webhook from your PIM.
In your custom script, translate your external system's incoming data into the Chec API's format for the "create/update product" APIs.
Using your Chec secret API key (which has full system privileges), call the Chec API to create or update your product information accordingly.
In order to determine whether a product exists in Chec/Commerce.js already, you may need to look it up first using the "list products" API. Note that you can store any amount of arbitrary data on products in Chec/Commerce.js using the
meta attribute. This may be useful when needing to store externally generated ID fields.
Integrating Chec/Commerce.js orders into an external OMS
Ensure that your chosen OMS has an API that allows you to create or update orders.
Write a custom script somewhere that will accept a webhook event from Chec/Commerce.js.
Create a webhook in the Chec Dashboard (or using our API), select the
orders.updateevents, and provide your custom script URL.
In your custom script, validate the Chec webhook's signature to ensure its authenticity.
Convert the Chec order object into the data structure expected by your external OMS.
Use your external OMS's API to create or update the order as necessary.
As with the PIM example above, you may store arbitrary information on the order using the
meta attribute in Chec/Commerce.js. This may be useful when integrating with external systems that have their own unique ID fields.