Creating a dropdown list in product admin page, populated from an external API call

Creating a dropdown list in product admin page, populated from an external API call

nick-h
Visitor
2 0 1

Hi all,

 

We're needing to add a dropdown list (well, ideally a checkbox list, allowing the selection of potentially multiple list items) to the product admin page.  This list needs to be populated based on the JSON response from a call to our company API.  The response will just contain a key/name and a value.  The selected value(s) will need to be persisted when saving the product, so that they can be retrieved from an order complete webhook (this process is currently working, but relies on a product admin manually entering a comma separated list of GUIDs into a metafield, which is obviously less than ideal.

 

Is this possible via an extension, and if not, how else could we achieve this functionality?

Reply 1 (1)
nick-h
Visitor
2 0 1

Hi Punya, thanks for the quick reply.

 

The ScriptTag approach sounds like a fast solution to this problem, but this Shopify link suggests that it's only really used in the storefront or on the order status page of the checkout.  Do you have a link to some documentation on how to inject this into admin pages?

 

If this isn't possible then I'll also look into the creation of a custom app.

 

Thanks