How to store post-purchase survey results in customer metafields

M_DriverDigital
Shopify Partner
1 0 0

I'm following the Shopify Tutorial to add a checkout extension post-purchase survey to thank-you and order-status pages.  The tutorial is based on an extension-only app (no external app server).  

Within the tutorial, in this section, the text states "This sample code simulates storing the survey response by logging to your console. In a production-ready application, you should store the survey response in a database, or in metafields."

Ok, so metafields would be awesome.  I would like to store my survey results as customer metafield values.  When I explore the APIs however, it seems like purchase.thank-you and customer-account.order-status extension targets (the two targets used in the tutorial) only support the StandardAPI, not the CheckoutAPI.  The StandardAPI does not appear to have any ability to write to metafields.  It is also not currently possible (as far as I'm aware) to write a GraphQL Admin API mutation within a checkout extension app. 

Is there a way to store my survey results in some field so that I can access them, without having to build a standard app with a database?    

Replies 0 (0)