Add a metafield to customer

Add a metafield to customer

tj56
Shopify Partner
1 0 1

From a registration form where I ask for the customer's favorite color, I want to automatically assign them an existing metaobject (from a list of two choices: "warm colors" and "cool colors").

Example: The customer selects the color red, and the "color group" metafield displays "warm colors."

How is this possible with Flow?

Replies 2 (2)

Promer
Shopify Partner
86 6 40

Hi @tj56 

 

You can automate this by setting up a workflow that checks the selected color and assigns the correct metaobject reference. Here's how:

  1. Trigger: Use the "Customer Created" or "Customer Updated" trigger (depending on when the color is chosen).
  2. Condition: Add a condition that checks the customer’s selected color. If the color is red, orange, or yellow, assign "Warm Colors"; if blue, green, or purple, assign "Cool Colors."
  3. Action: Use the "Update Customer Metafield" action to set the correct metaobject reference based on the condition.

Since Flow doesn’t directly support metaobject references yet, you might need a custom Shopify Function or an app like Mechanic to handle it

Benjamen
Shopify Partner
136 8 16

Hello 👋

Quick question: are you using Customer Accounts or Legacy Customer Accounts?

Benjamen @ Helium
- Customer Fields ✪✪✪✪✪ (357+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (299+ reviews)
- Strike Automatic Discounts NEW!