Bulk metafield writes against the Admin API cost limit. This page is ready

Bulk metafield writes against the Admin API cost limit

The same job, run by two implementations, against a simulated shop that enforces Shopify's cost bucket.

metafieldsSet takes 25 per call at 10 points each.
Determines how fast the bucket refills.
Runs both implementations against the same shop, one after the other.

naive

Not run

Chunks the writes and fires them. A throttled batch is counted as a failure and never sent again.

No run for 10,000 writes on this plan yet.

cost-aware

Not run

Predicts the bucket, waits for the points it needs, and corrects itself from the throttle status on every response.

No run for 10,000 writes on this plan yet.

Result

ImplementationLandedLostThrottledRequestsSimulated time
naive
cost-aware

The cost-aware run takes longer on purpose. The bucket refills at a fixed rate, so that time is the floor for this many writes on this plan — the naive run finishes sooner because it stops trying. A lost write is a product left holding its old value while the job reports success.

What those values are for is on the Shopify Function page: volume pricing tiers written by this job, read back at checkout by the extension that applies them.