Missing functionality in functions

Specifically, we have 2 issues:

  1. There is no ability to base product discounts on the shipping method selected

  2. There is no ability to add line item properties.

How do we transition this functionality?

It would be very helpful to understand what business problem the merchant is trying to solve that you used to use these two Scripts features for, then we can suggest solutions using the features that exist in Functions or that are in the roadmap.

We have a program where we pay back previous shipping on orders being bundled together if all orders in the bundle go over the free shipping limit. We can only do this when a certain shipping method is present. Shipping is already being discounted to free for this shipping method, and this is an additional discount.

As for line item properties, we built many of our reporting processes around line item properties we add via scripts.

For line item properties, you would need to do this client-side via a UI extension or Theme extension or with a custom cart in your theme.

A workaround for informing your Discount Function’s cart lines target about the selected shipping method would also involve client-side code, using a UI extension or Theme extension to set a cart attribute when you observe a change to the shipping method.