Testing fulfilment through GraphQL Admin api on live store

Solved

Testing fulfilment through GraphQL Admin api on live store

Cartwright
Tourist
3 1 1

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?

Accepted Solution (1)

Cartwright
Tourist
3 1 1

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!

 

View solution in original post

Replies 3 (3)

Cartwright
Tourist
3 1 1

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!

 

PaulNewton
Shopify Partner
6350 582 1356

@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?


Best Practice

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.

 

The Live Reality

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.

Production Gotchas

Examples of some of the things to watch out for:

  • do you have a test email to monitor for this test you can then ignore email automation like newsletters
  • is there anything setup to auto reject/delete/modify orders <-- super annoying if undocumented  
  • are there any other custom-fulfillments setups
  • is all staff aware of test orders and know to ignore them(fulfill and print a paid shipping label for something that doesn't exist, either in a test order by your or an actual order placed by a customer containing a test product)
  • are there custom notifications that will consume staff(s) time , or kick off processes(pick lists)
  • are there any apps, automation apps, or third party services that kick things off when a product or order is created even if test/fake
  • if there's any marketplace/multi-vendor aspect, will vendors get confused/interrupted.
  • Will test products show to customers on the frontend. is the theme modified to avoid this if so by what conventions/config.
  • Will a test product get put in a "new" collection or kick off an email
  • Will  a test purchase affect reporting, etc etc etc.
  • Will  a test purchase of a product affect the inventory or stock display frontend/merchandising.
  • If you interact through the frontend for some reason this can affect analytics.
  • etc
  • In practice you'll find most businesses are not documented rigorously until after a time/money gets lost if ever.

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


Cartwright
Tourist
3 1 1

Thanks, @PaulNewton, for the extensive explanation. I'll take it into account.