How can I automate metafield updates when changing shipping rates?

Hi there,

I want to create a rule that whenever I change the shipping rate for a product variant > a metafield of this variant will change automatically.

I have multiple products with multiple lead times. Each product variant haד a unique metafield called “delivery” that mentions the lead time. This metafield is shown in each of my product pages. In addition, I have custom shipping rates with different lead times. i.e. 6-8 weeks, 8-10 weeks, etc. I want to create a rule that when I change the shipping rate of a product variant (i.e. from 6-8 weeks to 8-10 weeks), the metafield will also change automatically.

My store:

www.mycozmo.com

Thanks!