A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Introduction: For a customer we're integrating our ERP software with their Shopify store. Their store is live! We use the GraphQL Admin api to interface with Shopify. At this moment we implemented order fulfillment and would like to test this. I read about test orders, but don't seem to be able to create a test order through GraphQL api (only REST api). Then I read about creating draft orders and completing them which will turn them into orders , but I don't know if these can be used as test orders.
Question: How to test the fulfillment proces while the store is live and not creating side effects on real customer orders, payments, fees, shipments, etc?
Solved! Go to the solution
This is an accepted solution.
To answer my own question and for people finding this post:
It seems that this document is the way to go:
https://shopify.dev/apps/fulfillment which describes 2 options for fulfilment that you have to choose from.
Both these documents refer to this document:
https://shopify.dev/api/examples/order-testing for creating test orders, which uses REST api!
Good luck!
This is an accepted solution.
To answer my own question and for people finding this post:
It seems that this document is the way to go:
https://shopify.dev/apps/fulfillment which describes 2 options for fulfilment that you have to choose from.
Both these documents refer to this document:
https://shopify.dev/api/examples/order-testing for creating test orders, which uses REST api!
Good luck!
@Cartwright wrote:How to test the fulfillment process while the store is live and not creating side effects on real customer orders, payments, fees, shipments, etc?
The "best practice" answer is you do not do this against a production(live) store at this phase of exploring.
Use a dedicated staging/test/development store that is setup as a mock of the production store.
For Shopify Plus merchants use a sandbox or expansion store.
Use tools like postman/insomnia when feeling your way around part of an api for the first time on said dev store.
When exploratory/unit testing is done then inform stakeholders of a scheduled time for manned test orders on the production store.
Do it under an umbrella of: integration/UI/acceptance/QA/etc -testing while being prepared to address side-effects.
Preferably scheduled in three tests: off-hours, light traffic, primetime.
Decide whether to archive test orders, or delete them noting this will leave a gap in order numbers for audits.
If test orders will be archived they should aggressively and obnoxiously self contain info indicating it was a test such as the product names, customer info, cart attributes, etc. do not rely on external documents or indicators even metafields.
Of course the above is easier said than done though once apps are involved as those are not programmatically cloneable and come with the issues of additional subscriptions fees , or the complication of integration pains(ERPs,analytics,etc).
When you must test raw-to-finish on a live production store assume you WILL create side effects, be frank with stakeholders. Block time with a healthy padding for follow up support or remediation.
The only way to avoid stepping on landmines 95% of the time requires making sure the existing business processes are communicated/documented to you. The other 5% someone loses toes regardless and you might not even be around when that happens nor may even any realize what set it off if enough time has passed.
Shopify just isn't setup in a way to avoid this 100% when we muck with production.
But again when poking an api , strive do so on a dev shop first that's as close as possible to the live one.
Examples of some of the things to watch out for:
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org