lightward / mechanic-tasks

Public task repository for Mechanic (https://mechanic.dev)
https://tasks.mechanic.dev/
MIT License
62 stars 33 forks source link

address deprecation of Publication.name #270

Open isaacbowen opened 1 year ago

isaacbowen commented 1 year ago

Concerning Publication.title, Shopify says:

Name of the publication. Use Catalog.title instead.

The task library uses publications in many places. (As an example, this issue came up re: Auto-tag customers by sales channel.)

Screenshot 2023-08-10 at 8 41 56 AM
isaacbowen commented 1 year ago

@tekhaus do you have space to look this over?

tekhaus commented 1 year ago

Catalog currently returns null on the order resource (notice the unstable api in their deprecation notice even). So this would be a bit of a workaround (see linked slack thread) to put in place for all of those tasks. And of course Shopify then might come back and fix the bug.

https://shopifypartners.slack.com/archives/CB9K9FDTJ/p1681835379562709

Thoughts?

tekhaus commented 11 months ago

Update: as of 2023-10, the catalog field still returns nulls on the publication resource. The only known way to get the catalog to publication mapping is by iterating over the catalogs connection and checking the paired publication ID.

This is likely moot anyways, as here are some example catalog titles for their respective publication names:

Clearly, using those esoteric catalog titles in task configuration fields is not ideal, and without access to the API, I don't believe a merchant would be able to retrieve the catalog titles anyways.

Another interesting thing about this deprecation notice is that it does not include a "resolve by" date, so it's unknown how long this can be deferred.

I'll likely switch the relevant tasks to use the publication ID instead, but first I'll need to research how a merchant would be able to get this ID from the admin UI.

tekhaus commented 9 months ago

Update: waiting to see what 2024-01 API will bring.

Turns out the only way (currently) for a merchant to get the publication ID of sales channels from the admin UI, is to open the sales channels modal, view the page source, and search for "Online Store" etc.

tekhaus commented 8 months ago

Update: no updates in the 2024-01 API except that now the resolution deadline has been set for 2024-10. Recommend suppressing this deprecation until 2024-07 release.

tekhaus commented 1 month ago

Update: nothing changed as of 2024-07 API