set_customer_metafield
Upsert a customer metafield in Shopify using customer ID, key, value, and optional namespace/type.
Instructions
Create or update a customer metafield using metafieldsSet (upsert).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"customer_id": "<customer_id>",
"key": "<key>",
"value": "<value>"
},
"name": "set_customer_metafield"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer_id | Yes | The numeric Shopify customer ID (or GID). | |
| namespace | No | Metafield namespace. | |
| key | Yes | Metafield key. | |
| value | Yes | Metafield value. | |
| type | No | Metafield type (required when creating new). |