Bulk Deletion of Customer Metafields: Any alternative to unsupported metafieldsDelete?

Concern:
We need to efficiently clear or delete a large number of customer metafields. While metafieldsSet is supported for bulk setting via bulkOperationRunMutation, metafieldsDelete is not listed among the supported mutations for bulkOperationRunMutation. This limitation makes bulk deletion challenging.

Question:
It seems that metafieldsDelete isn’t supported by bulkOperationRunMutation — is that correct?
If confirmed, is there any alternative bulk method to set customer metafield values to null? We are assuming metafieldsSet cannot achieve deletion by setting values to empty or null.

Hi @ayaMatsu_Rewire

From digging into this it does seem that you can’t use bulkOperationRunMutation with metafieldsDelete and setting values to empty/null with metafieldsSet won’t delete the metafield. You’re best option might be to create a script that will loop through metafieldsDelete to delete the metafields you no longer require.

Hi Liam,

Thank you for looking into this.
We plan to process a large number of metafields with both metafieldsSet and metafieldsDelete, so it would be great if metafieldsDelete could also be supported in bulk operations in a future update. :blush:

I really appreciate your quick reply! :folded_hands: