> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.shopify.customers.UpdateCustomer

- Component: `appmixer.shopify.customers.UpdateCustomer`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.shopify 4.1.0](https://connectors.appmixer.com/connector/appmixer.shopify/4.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.shopify/4.1.0/component/appmixer.shopify.customers.UpdateCustomer>

Update a customer. Only the fields you fill in are changed.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Customer (`id`) | text | Pick a customer, or enter its ID — the global ID (gid://shopify/Customer/…) or the numeric ID. |
| First Name (`firstName`) | text | New first name. |
| Last Name (`lastName`) | text | New last name. |
| Email (`email`) | text | New email address. Must be unique in the store. |
| Phone (`phone`) | text | New phone number in E.164 format, for example +16135551111. Must be unique in the store. |
| Note (`note`) | textarea | New note about the customer. Replaces the current note. |
| Tags (`tags`) | text | Comma-separated tags, for example "VIP, wholesale". Replaces all current tags. |
| Email Marketing (`emailMarketingState`) | select | Change whether the customer receives marketing emails. Leave empty to keep the current consent. |
| Tax Exempt (`taxExempt`) | toggle | Whether the customer is exempt from paying taxes on their orders. Leave untouched to keep the current setting. |
| Tax Exemptions (`taxExemptions`) | multiselect | Specific tax exemptions (Canada, US resellers, EU reverse charge). Replaces the current exemptions. |
| Metafields (`metafields`) | expression | Custom data stored on the customer. A metafield with the same namespace and key is overwritten. |

## Output ports

### Port `out`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.shopify.customers.UpdateCustomer",
  "description": "Update a customer. Only the fields you fill in are changed.",
  "author": "Jimoh Damilola <jimoh@client.io>",
  "private": false,
  "auth": {
    "service": "appmixer:shopify",
    "scope": [
      "write_customers"
    ]
  },
  "quota": {
    "manager": "appmixer:shopify",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "tags": {
            "type": "string"
          },
          "emailMarketingState": {
            "type": "string"
          },
          "taxExempt": {
            "type": "boolean"
          },
          "taxExemptions": {
            "type": [
              "array",
              "string"
            ]
          },
          "metafields": {
            "type": "object"
          }
        },
        "required": [
          "id"
        ]
      },
      "inspector": {
        "inputs": {
          "id": {
            "type": "text",
            "label": "Customer",
            "index": 0,
            "tooltip": "Pick a customer, or enter its ID — the global ID (gid://shopify/Customer/…) or the numeric ID.",
            "source": {
              "url": "/component/appmixer/shopify/customers/FindCustomers?outPort=out",
              "data": {
                "properties": {
                  "isSource": true
                },
                "messages": {
                  "in/outputType": "array"
                },
                "transform": "./FindCustomers#customersToSelectArray"
              }
            }
          },
          "firstName": {
            "type": "text",
            "label": "First Name",
            "index": 1,
            "group": "overview",
            "tooltip": "New first name."
          },
          "lastName": {
            "type": "text",
            "label": "Last Name",
            "index": 2,
            "group": "overview",
            "tooltip": "New last name."
          },
          "email": {
            "type": "text",
            "label": "Email",
            "index": 3,
            "group": "overview",
            "tooltip": "New email address. Must be unique in the store."
          },
          "phone": {
            "type": "text",
            "label": "Phone",
            "index": 4,
            "group": "overview",
            "tooltip": "New phone number in E.164 format, for example +16135551111. Must be unique in the store."
          },
          "note": {
            "type": "textarea",
            "label": "Note",
            "index": 5,
            "group": "overview",
            "tooltip": "New note about the customer. Replaces the current note."
          },
          "tags": {
            "type": "text",
            "label": "Tags",
            "index": 6,
            "group": "overview",
            "tooltip": "Comma-separated tags, for example \"VIP, wholesale\". Replaces all current tags."
          },
          "emailMarketingState": {
            "type": "select",
            "label": "Email Marketing",
            "index": 7,
            "group": "overview",
            "tooltip": "Change whether the customer receives marketing emails. Leave empty to keep the current consent.",
            "options": [
              {
                "label": "Subscribed",
                "value": "SUBSCRIBED"
              },
              {
                "label": "Unsubscribed",
                "value": "UNSUBSCRIBED"
              }
            ]
          },
          "taxExempt": {
            "type": "toggle",
            "label": "Tax Exempt",
            "index": 8,
            "group": "tax",
            "tooltip": "Whether the customer is exempt from paying taxes on their orders. Leave untouched to keep the current setting."
          },
          "taxExemptions": {
            "type": "multiselect",
            "label": "Tax Exemptions",
            "index": 9,
            "group": "tax",
            "tooltip": "Specific tax exemptions (Canada, US resellers, EU reverse charge). Replaces the current exemptions.",
            "options": [
              {
                "label": "Canada: status card",
                "value": "CA_STATUS_CARD_EXEMPTION"
              },
              {
                "label": "Canada BC: reseller",
                "value": "CA_BC_RESELLER_EXEMPTION"
              },
              {
                "label": "Canada MB: reseller",
                "value": "CA_MB_RESELLER_EXEMPTION"
              },
              {
                "label": "Canada SK: reseller",
                "value": "CA_SK_RESELLER_EXEMPTION"
              },
              {
                "label": "Canada SK: VPT reseller",
                "value": "CA_SK_VPT_RESELLER_EXEMPTION"
              },
              {
                "label": "Canada NL: VPT reseller",
                "value": "CA_NL_VPT_RESELLER_EXEMPTION"
              },
              {
                "label": "Canada: diplomat",
                "value": "CA_DIPLOMAT_EXEMPTION"
              },
              {
                "label": "Canada BC: commercial fishery",
                "value": "CA_BC_COMMERCIAL_FISHERY_EXEMPTION"
              },
              {
                "label": "Canada MB: commercial fishery",
                "value": "CA_MB_COMMERCIAL_FISHERY_EXEMPTION"
              },
              {
                "label": "Canada NS: commercial fishery",
                "value": "CA_NS_COMMERCIAL_FISHERY_EXEMPTION"
              },
              {
                "label": "Canada PE: commercial fishery",
                "value": "CA_PE_COMMERCIAL_FISHERY_EXEMPTION"
              },
              {
                "label": "Canada SK: commercial fishery",
                "value": "CA_SK_COMMERCIAL_FISHERY_EXEMPTION"
              },
              {
                "label": "Canada BC: production and machinery",
                "value": "CA_BC_PRODUCTION_AND_MACHINERY_EXEMPTION"
              },
              {
                "label": "Canada SK: production and machinery",
                "value": "CA_SK_PRODUCTION_AND_MACHINERY_EXEMPTION"
              },
              {
                "label": "Canada BC: sub contractor",
                "value": "CA_BC_SUB_CONTRACTOR_EXEMPTION"
              },
              {
                "label": "Canada SK: sub contractor",
                "value": "CA_SK_SUB_CONTRACTOR_EXEMPTION"
              },
              {
                "label": "Canada BC: contractor",
                "value": "CA_BC_CONTRACTOR_EXEMPTION"
              },
              {
                "label": "Canada SK: contractor",
                "value": "CA_SK_CONTRACTOR_EXEMPTION"
              },
              {
                "label": "Canada ON: purchase",
                "value": "CA_ON_PURCHASE_EXEMPTION"
              },
              {
                "label": "Canada MB: farmer",
                "value": "CA_MB_FARMER_EXEMPTION"
              },
              {
                "label": "Canada NS: farmer",
                "value": "CA_NS_FARMER_EXEMPTION"
              },
              {
                "label": "Canada SK: farmer",
                "value": "CA_SK_FARMER_EXEMPTION"
              },
              {
                "label": "EU: reverse charge",
                "value": "EU_REVERSE_CHARGE_EXEMPTION_RULE"
              },
              {
                "label": "US AL: reseller",
                "value": "US_AL_RESELLER_EXEMPTION"
              },
              {
                "label": "US AK: reseller",
                "value": "US_AK_RESELLER_EXEMPTION"
              },
              {
                "label": "US AZ: reseller",
                "value": "US_AZ_RESELLER_EXEMPTION"
              },
              {
                "label": "US AR: reseller",
                "value": "US_AR_RESELLER_EXEMPTION"
              },
              {
                "label": "US CA: reseller",
                "value": "US_CA_RESELLER_EXEMPTION"
              },
              {
                "label": "US CO: reseller",
                "value": "US_CO_RESELLER_EXEMPTION"
              },
              {
                "label": "US CT: reseller",
                "value": "US_CT_RESELLER_EXEMPTION"
              },
              {
                "label": "US DE: reseller",
                "value": "US_DE_RESELLER_EXEMPTION"
              },
              {
                "label": "US FL: reseller",
                "value": "US_FL_RESELLER_EXEMPTION"
              },
              {
                "label": "US GA: reseller",
                "value": "US_GA_RESELLER_EXEMPTION"
              },
              {
                "label": "US HI: reseller",
                "value": "US_HI_RESELLER_EXEMPTION"
              },
              {
                "label": "US ID: reseller",
                "value": "US_ID_RESELLER_EXEMPTION"
              },
              {
                "label": "US IL: reseller",
                "value": "US_IL_RESELLER_EXEMPTION"
              },
              {
                "label": "US IN: reseller",
                "value": "US_IN_RESELLER_EXEMPTION"
              },
              {
                "label": "US IA: reseller",
                "value": "US_IA_RESELLER_EXEMPTION"
              },
              {
                "label": "US KS: reseller",
                "value": "US_KS_RESELLER_EXEMPTION"
              },
              {
                "label": "US KY: reseller",
                "value": "US_KY_RESELLER_EXEMPTION"
              },
              {
                "label": "US LA: reseller",
                "value": "US_LA_RESELLER_EXEMPTION"
              },
              {
                "label": "US ME: reseller",
                "value": "US_ME_RESELLER_EXEMPTION"
              },
              {
                "label": "US MD: reseller",
                "value": "US_MD_RESELLER_EXEMPTION"
              },
              {
                "label": "US MA: reseller",
                "value": "US_MA_RESELLER_EXEMPTION"
              },
              {
                "label": "US MI: reseller",
                "value": "US_MI_RESELLER_EXEMPTION"
              },
              {
                "label": "US MN: reseller",
                "value": "US_MN_RESELLER_EXEMPTION"
              },
              {
                "label": "US MS: reseller",
                "value": "US_MS_RESELLER_EXEMPTION"
              },
              {
                "label": "US MO: reseller",
                "value": "US_MO_RESELLER_EXEMPTION"
              },
              {
                "label": "US MT: reseller",
                "value": "US_MT_RESELLER_EXEMPTION"
              },
              {
                "label": "US NE: reseller",
                "value": "US_NE_RESELLER_EXEMPTION"
              },
              {
                "label": "US NV: reseller",
                "value": "US_NV_RESELLER_EXEMPTION"
              },
              {
                "label": "US NH: reseller",
                "value": "US_NH_RESELLER_EXEMPTION"
              },
              {
                "label": "US NJ: reseller",
                "value": "US_NJ_RESELLER_EXEMPTION"
              },
              {
                "label": "US NM: reseller",
                "value": "US_NM_RESELLER_EXEMPTION"
              },
              {
                "label": "US NY: reseller",
                "value": "US_NY_RESELLER_EXEMPTION"
              },
              {
                "label": "US NC: reseller",
                "value": "US_NC_RESELLER_EXEMPTION"
              },
              {
                "label": "US ND: reseller",
                "value": "US_ND_RESELLER_EXEMPTION"
              },
              {
                "label": "US OH: reseller",
                "value": "US_OH_RESELLER_EXEMPTION"
              },
              {
                "label": "US OK: reseller",
                "value": "US_OK_RESELLER_EXEMPTION"
              },
              {
                "label": "US OR: reseller",
                "value": "US_OR_RESELLER_EXEMPTION"
              },
              {
                "label": "US PA: reseller",
                "value": "US_PA_RESELLER_EXEMPTION"
              },
              {
                "label": "US RI: reseller",
                "value": "US_RI_RESELLER_EXEMPTION"
              },
              {
                "label": "US SC: reseller",
                "value": "US_SC_RESELLER_EXEMPTION"
              },
              {
                "label": "US SD: reseller",
                "value": "US_SD_RESELLER_EXEMPTION"
              },
              {
                "label": "US TN: reseller",
                "value": "US_TN_RESELLER_EXEMPTION"
              },
              {
                "label": "US TX: reseller",
                "value": "US_TX_RESELLER_EXEMPTION"
              },
              {
                "label": "US UT: reseller",
                "value": "US_UT_RESELLER_EXEMPTION"
              },
              {
                "label": "US VT: reseller",
                "value": "US_VT_RESELLER_EXEMPTION"
              },
              {
                "label": "US VA: reseller",
                "value": "US_VA_RESELLER_EXEMPTION"
              },
              {
                "label": "US WA: reseller",
                "value": "US_WA_RESELLER_EXEMPTION"
              },
              {
                "label": "US WV: reseller",
                "value": "US_WV_RESELLER_EXEMPTION"
              },
              {
                "label": "US WI: reseller",
                "value": "US_WI_RESELLER_EXEMPTION"
              },
              {
                "label": "US WY: reseller",
                "value": "US_WY_RESELLER_EXEMPTION"
              },
              {
                "label": "US DC: reseller",
                "value": "US_DC_RESELLER_EXEMPTION"
              }
            ]
          },
          "metafields": {
            "type": "expression",
            "label": "Metafields",
            "index": 10,
            "group": "metafields",
            "levels": [
              "ADD"
            ],
            "tooltip": "Custom data stored on the customer. A metafield with the same namespace and key is overwritten.",
            "fields": {
              "namespace": {
                "type": "text",
                "label": "Namespace",
                "index": 1,
                "tooltip": "Groups metafields, for example \"custom\". Defaults to the app's namespace when empty."
              },
              "key": {
                "type": "text",
                "label": "Key",
                "index": 2,
                "tooltip": "Name of the metafield within the namespace, for example \"loyalty_level\"."
              },
              "type": {
                "type": "select",
                "label": "Type",
                "index": 3,
                "defaultValue": "single_line_text_field",
                "tooltip": "Type of the value. Must match the metafield definition, if the store has one for this namespace and key.",
                "options": [
                  {
                    "label": "Single line text",
                    "value": "single_line_text_field"
                  },
                  {
                    "label": "Multi-line text",
                    "value": "multi_line_text_field"
                  },
                  {
                    "label": "Integer",
                    "value": "number_integer"
                  },
                  {
                    "label": "Decimal",
                    "value": "number_decimal"
                  },
                  {
                    "label": "True or false",
                    "value": "boolean"
                  },
                  {
                    "label": "Date",
                    "value": "date"
                  },
                  {
                    "label": "Date and time",
                    "value": "date_time"
                  },
                  {
                    "label": "URL",
                    "value": "url"
                  },
                  {
                    "label": "JSON",
                    "value": "json"
                  }
                ]
              },
              "value": {
                "type": "text",
                "label": "Value",
                "index": 4,
                "tooltip": "The value, as text (numbers, true/false, dates in ISO 8601, JSON as a string)."
              }
            }
          }
        },
        "groups": {
          "overview": {
            "label": "Customer",
            "index": 1
          },
          "tax": {
            "label": "Taxes",
            "index": 2
          },
          "metafields": {
            "label": "Metafields",
            "index": 3
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out"
    }
  ],
  "icon": "(data URI omitted)"
}
```
