Open cgsmith opened 1 year ago
Adding a warehouse identifier will be helpful to making sure upstream orders can be updated or deleted: https://github.com/CGSmith-LLC/shipwise-api/issues/98
Some questions about the schema:
For stability and traceability it may be useful to decouple webhook receiving and webhook processing. This is also good for performance in case we receive a lot of webhook calls. They do not need to be processed directly.
received
-> processing
-> success
/failed
Webhook table should include:
received
, processing
, success
, failed
)@samdark
- In "Update Delete Order Job" what if upstread service isn't available? What if Cancelling failed?
- In the "General Job Workflow":
- what's meant by "Order Open?"
- are webooks sent by upstream services? If so, won't an update at the upstream cause a webhook to fire that would cause update at the upstread etc.?
- What's "3pl"?
Update/Delete Order Job: If cancelling or updating fails upstream then a notification should be sent (maybe a summary of failures since this may be spammy?
Webhooks: Webhooks are currently not sent by upstream services but will send if an order is updated. We would then need to send an update to the 3PL or service upstream from us. Might be best as a separate job.
3PL: Third party logistics center. These are warehouses that Shipwise customers contract to ship their products Order Open: Means the order was created in Shipwise and needs to be sent to the warehouse
For stability and traceability it may be useful to decouple webhook receiving and webhook processing.
Yes I'll include this in the main description. I was just thinking this after reading @samdark reply.
Do you think adding a rawContents to the webhook table would make sense? This may help troubleshooting in the future. Could always truncate or purge data older than 90 days.
Just saw the payload
. Ignore my last question :slightly_smiling_face:
Separate webhooks is a very good idea as well as queue for processing these.
Is your feature request related to a problem? Please describe. Currently there is a separate set of scripts that pulls from Shopify, Amazon, WooCommerce, etc. This request will resolve this by creating the necessary jobs to allow webhooks to push orders into the Shipwise system. We will also be able to leverage this logic in the future for any ecommerce customers that still need us to pull in data (FTP adapters for example).
Describe the solution you'd like The solution should take into account the following that I have seen over the years. For example, WooCommerce will fire only one webhook - even if it has a 500, it will not retry. Here are the other points:
Additional context Here is a current workflow I'd like your comments on.
https://whimsical.com/shipwise-integration-flow-8NqqbeSAWSHWL4uCahqj6Z
Considerations
Possible Schema