-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shopify: Add new sources for fulfillment orders (request accepted/rejected) #7122
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @colinmollenhour. Thanks for your contribution! LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @colinmollenhour. Thanks for your contribution! LGTM!
Hi @colinmollenhour, I got errors while creating the sources as below: Fulfillment Request Accepted (Instant) Fulfillment Request Rejected (Instant) Would you mind checking again? |
@vunguyenhung These topics were added in API version 2023-01 but based on here it appears Pipedream is using 2023-04 already so that shouldn't be a problem. The docs indicate that you need certain scopes, perhaps your app or API key is lacking these? I tested adding a webhook for that topic to my own test store with an HTTP client and it worked without issue:
|
Hi @colinmollenhour, I have authorized pipedream to have full permission to Shopify. Did you tried to create the source with your shopify account? |
I've not tried the code in this PR, not sure how to run it myself? |
Hi @colinmollenhour. You can test out the components using the Pipedream CLI. |
Without more information, I'm going to close this issue. Feel free to reopen and add more details, if you'd like. |
I did some debugging, it appears this is due to the node library used for Shopify is missing a lot of webhook topics in it's enum. I opened a PR here: MONEI/Shopify-api-node#621 Can you re-open and once it is updated I will continue testing? |
The node library was updated but I still get the same error.. Not able to look into it further at this time... |
WHAT
This adds constants for the many new webhook event topics that were added in Shopify with the Fulfillment Order update. It also adds two new sources for when a fulfillment order is rejected or accepted.
WHY
The event topics are useful in cases where a user wants to perform an action when a fulfillment request is rejected (an error condition prevents the order from being accepted) or accepted (in which case take another follow-up action like update the status or send an email).
HOW
Example payload:
I don't know how to test this code exactly.. Looks very straightofrward so will test after it is merged unless there is another way to test sources but there is a lot of setup involved.